[mapper] quotation-sales order for mapping in parent + child items

This commit is contained in:
Rushabh Mehta
2013-07-04 15:27:04 +05:30
parent 8aded138c7
commit 080fcc8fcd
6 changed files with 66 additions and 25 deletions

View File

@@ -262,7 +262,9 @@ class SellingController(StockController):
def validate_order_type(self):
valid_types = ["Sales", "Maintenance", "Shopping Cart"]
if self.doc.order_type not in valid_types:
if not self.doc.order_type:
self.doc.order_type = "Sales"
elif 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)