mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
Merge branch 'master' of github.com:webnotes/erpnext into website-wip
This commit is contained in:
@@ -40,13 +40,15 @@ class DocType:
|
|||||||
msgprint(_("Expense Account is mandatory"), raise_exception=1)
|
msgprint(_("Expense Account is mandatory"), raise_exception=1)
|
||||||
|
|
||||||
def validate_all_link_fields(self):
|
def validate_all_link_fields(self):
|
||||||
accounts = {"Account": [self.doc.cash_bank_account, self.doc.income_account, self.doc.expense_account], \
|
accounts = {"Account": [self.doc.cash_bank_account, self.doc.income_account,
|
||||||
"Cost Center": [self.doc.cost_center], "Warehouse": [self.doc.warehouse]}
|
self.doc.expense_account], "Cost Center": [self.doc.cost_center],
|
||||||
|
"Warehouse": [self.doc.warehouse]}
|
||||||
|
|
||||||
for link_dt, dn_list in accounts.items():
|
for link_dt, dn_list in accounts.items():
|
||||||
for link_dn in dn_list:
|
for link_dn in dn_list:
|
||||||
if not webnotes.conn.exists({"doctype": link_dt, "company": self.doc.company, "name": link_dn}):
|
if link_dn and not webnotes.conn.exists({"doctype": link_dt,
|
||||||
msgprint(link_dn +_(" does not belong to ") + self.doc.company)
|
"company": self.doc.company, "name": link_dn}):
|
||||||
|
webnotes.throw(link_dn +_(" does not belong to ") + self.doc.company)
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
webnotes.defaults.clear_default("is_pos")
|
webnotes.defaults.clear_default("is_pos")
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-01-10 16:34:24",
|
"creation": "2013-01-10 16:34:24",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-05 14:55:50",
|
"modified": "2013-09-10 17:20:25",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
"parenttype": "DocType",
|
"parenttype": "DocType",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 0,
|
||||||
"role": "System Manager",
|
"role": "System Manager",
|
||||||
"submit": 0,
|
"submit": 0,
|
||||||
"write": 1
|
"write": 1
|
||||||
@@ -78,7 +78,6 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "static_parameters",
|
"fieldname": "static_parameters",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"label": "Static Parameters",
|
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -86,7 +85,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "static_parameter_details",
|
"fieldname": "static_parameter_details",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"label": "SMS Parameters",
|
"label": "Static Parameters",
|
||||||
"options": "SMS Parameter"
|
"options": "SMS Parameter"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user