mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-26 13:25:20 +00:00
frappe/frappe#478 erpnext install works
This commit is contained in:
@@ -10,6 +10,7 @@ from frappe import _
|
||||
from frappe.model.document import Document
|
||||
|
||||
class BackupManager(Document):
|
||||
pass
|
||||
|
||||
def take_backups_daily():
|
||||
take_backups_if("Daily")
|
||||
|
||||
@@ -8,7 +8,8 @@ from frappe import throw, _
|
||||
from frappe.model.document import Document
|
||||
|
||||
class Currency(Document):
|
||||
|
||||
pass
|
||||
|
||||
def validate_conversion_rate(currency, conversion_rate, conversion_rate_label, company):
|
||||
"""common validation for currency and price list currency"""
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ from frappe import msgprint
|
||||
|
||||
from frappe.utils.nestedset import DocTypeNestedSet
|
||||
class CustomerGroup(DocTypeNestedSet):
|
||||
self.nsm_parent_field = 'parent_customer_group';
|
||||
nsm_parent_field = 'parent_customer_group';
|
||||
|
||||
def validate(self):
|
||||
if frappe.db.sql("select name from `tabCustomer Group` where name = %s and docstatus = 2",
|
||||
@@ -19,7 +19,7 @@ class CustomerGroup(DocTypeNestedSet):
|
||||
|
||||
def on_update(self):
|
||||
self.validate_name_with_customer()
|
||||
super(DocType, self).on_update()
|
||||
super(CustomerGroup, self).on_update()
|
||||
self.validate_one_root()
|
||||
|
||||
def validate_name_with_customer(self):
|
||||
@@ -44,4 +44,4 @@ class CustomerGroup(DocTypeNestedSet):
|
||||
You can not trash/cancel/delete this customer group.", raise_exception=1)
|
||||
|
||||
# rebuild tree
|
||||
super(DocType, self).on_trash()
|
||||
super(CustomerGroup, self).on_trash()
|
||||
|
||||
@@ -471,7 +471,6 @@ class EmailDigest(DocListController):
|
||||
self.get_next_sending()
|
||||
|
||||
def send():
|
||||
from frappe.utils import getdate
|
||||
now_date = now_datetime().date()
|
||||
|
||||
for ed in frappe.db.sql("""select name from `tabEmail Digest`
|
||||
|
||||
@@ -12,6 +12,6 @@ class FeaturesSetup(Document):
|
||||
"""
|
||||
from frappe.model import default_fields
|
||||
from frappe.utils import set_default
|
||||
for key in self.fields:
|
||||
for key in self.meta.get_valid_columns():
|
||||
if key not in default_fields:
|
||||
set_default(key, self.get(key))
|
||||
|
||||
@@ -55,7 +55,7 @@ class NamingSeries(Document):
|
||||
default = options[0]
|
||||
|
||||
# update in property setter
|
||||
prop_dict = {'options': "\n".join(options), 'default': default}
|
||||
prop_dict = {'options': "\n".join(options), 'default': default}
|
||||
for prop in prop_dict:
|
||||
ps_exists = frappe.db.sql("""SELECT name FROM `tabProperty Setter`
|
||||
WHERE doc_type = %s AND field_name = 'naming_series'
|
||||
|
||||
@@ -8,7 +8,7 @@ from frappe.utils import flt
|
||||
from frappe.utils.nestedset import DocTypeNestedSet
|
||||
|
||||
class SalesPerson(DocTypeNestedSet):
|
||||
self.nsm_parent_field = 'parent_sales_person';
|
||||
nsm_parent_field = 'parent_sales_person';
|
||||
|
||||
def validate(self):
|
||||
for d in self.get('target_details'):
|
||||
@@ -16,7 +16,7 @@ class SalesPerson(DocTypeNestedSet):
|
||||
frappe.throw(_("Either target qty or target amount is mandatory."))
|
||||
|
||||
def on_update(self):
|
||||
super(DocType, self).on_update()
|
||||
super(SalesPerson, self).on_update()
|
||||
self.validate_one_root()
|
||||
|
||||
def get_email_id(self):
|
||||
|
||||
@@ -6,5 +6,5 @@ import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
class SmsParameter(Document):
|
||||
class SMSParameter(Document):
|
||||
pass
|
||||
@@ -6,5 +6,5 @@ import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
class SmsSettings(Document):
|
||||
class SMSSettings(Document):
|
||||
pass
|
||||
@@ -19,5 +19,5 @@ class Territory(DocTypeNestedSet):
|
||||
raise Exception
|
||||
|
||||
def on_update(self):
|
||||
super(DocType, self).on_update()
|
||||
super(Territory, self).on_update()
|
||||
self.validate_one_root()
|
||||
|
||||
@@ -6,5 +6,5 @@ import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
class Uom(Document):
|
||||
class UOM(Document):
|
||||
pass
|
||||
Reference in New Issue
Block a user