[feature] Ability to set UOM as Integer-only and related validations.

This commit is contained in:
Rushabh Mehta
2013-07-25 17:45:59 +05:30
parent 966c9f6a8e
commit 4dca40195e
39 changed files with 153 additions and 78 deletions

View File

@@ -58,6 +58,7 @@ class DocType(BuyingController):
self.check_for_acc_head_of_supplier()
self.check_for_stopped_status()
self.validate_with_previous_doc()
self.validate_uom_is_integer("uom", "qty")
if not self.doc.is_opening:
self.doc.is_opening = 'No'

View File

@@ -60,6 +60,8 @@ class DocType(SellingController):
self.so_dn_required()
self.validate_proj_cust()
self.validate_with_previous_doc()
self.validate_uom_is_integer("stock_uom", "qty")
sales_com_obj = get_obj('Sales Common')
sales_com_obj.check_stop_sales_order(self)
sales_com_obj.check_active_sales_items(self)

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-06-04 11:02:19",
"docstatus": 0,
"modified": "2013-07-10 14:54:19",
"modified": "2013-07-25 16:32:10",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -107,9 +107,10 @@
{
"doctype": "DocField",
"fieldname": "stock_uom",
"fieldtype": "Data",
"fieldtype": "Link",
"in_list_view": 0,
"label": "UOM",
"options": "UOM",
"read_only": 1
},
{