[buying, selling] [refactor] get item details

This commit is contained in:
Anand Doshi
2013-05-15 21:15:57 +05:30
parent c99853c8d4
commit 1dde46aff0
10 changed files with 327 additions and 104 deletions

View File

@@ -353,3 +353,10 @@ class SellingController(StockController):
del tax.fields[fieldname]
tax.item_wise_tax_detail = json.dumps(tax.item_wise_tax_detail)
def validate_order_type(self):
valid_types = ["Sales", "Maintenance"]
if self.doc.order_type not in valid_types:
msgprint(_(self.meta.get_label("order_type")) + " " +
_("must be one of") + ": " + comma_or(valid_types),
raise_exception=True)