[status updater] managed by controllers and commonified for sales and purchase

This commit is contained in:
Nabin Hait
2013-06-03 16:45:38 +05:30
parent df33532280
commit 0feebc1a67
14 changed files with 406 additions and 140 deletions

View File

@@ -213,10 +213,11 @@ class DocType(BuyingController):
msgprint("Please check Item %s is not present in %s %s ." % (d.item_code, d.prevdoc_doctype, d.prevdoc_docname))
raise Exception
# Check if Warehouse has been modified.
if not cstr(data[0]['warehouse']) == cstr(d.warehouse):
msgprint("Please check warehouse %s of Item %s which is not present in %s %s ." % (d.warehouse, d.item_code, d.prevdoc_doctype, d.prevdoc_docname))
raise Exception
if cstr(data[0]['warehouse']) and \
not cstr(data[0]['warehouse']) == cstr(d.warehouse):
msgprint("""Please check warehouse %s of Item %s
which is not present in %s %s""" % (d.warehouse, d.item_code,
d.prevdoc_doctype, d.prevdoc_docname), raise_exception=1)
# Check if UOM has been modified.
if not cstr(data[0]['uom']) == cstr(d.uom) and not cstr(d.prevdoc_doctype) == 'Material Request':

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-03-07 11:42:55",
"docstatus": 0,
"modified": "2013-05-22 11:59:52",
"modified": "2013-05-31 14:26:22",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -377,15 +377,12 @@
"read_only": 1
},
{
"default": "0.00",
"doctype": "DocField",
"fieldname": "billed_qty",
"fieldtype": "Float",
"hidden": 0,
"label": "Billed Quantity",
"fieldname": "billed_amt",
"fieldtype": "Currency",
"label": "Billed Amt",
"no_copy": 1,
"oldfieldname": "billed_qty",
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"read_only": 1
},