[buying controller] [fix] fixed message for company warehouse mismatch validation

This commit is contained in:
Anand Doshi 2013-05-02 18:10:19 +05:30
parent cd772daf1d
commit eb41ffd24e
2 changed files with 3 additions and 3 deletions

View File

@ -50,8 +50,7 @@ class BuyingController(StockController):
for warehouse, company in webnotes.conn.get_values("Warehouse", for warehouse, company in webnotes.conn.get_values("Warehouse",
self.doclist.get_distinct_values("warehouse"), "company").items(): self.doclist.get_distinct_values("warehouse"), "company").items():
if company and company != self.doc.company: if company and company != self.doc.company:
webnotes.msgprint(_("Warehouse must belong to company") + \ webnotes.msgprint(_("Company mismatch for Warehouse") + (": %s" % (warehouse,)),
(": %s (%s, %s)" % (warehouse, company, self.doc.company)),
raise_exception=WrongWarehouseCompany) raise_exception=WrongWarehouseCompany)
def validate_stock_or_nonstock_items(self): def validate_stock_or_nonstock_items(self):

View File

@ -2,6 +2,7 @@ test_records = [
[{ [{
"doctype": "Price List", "doctype": "Price List",
"price_list_name": "_Test Price List", "price_list_name": "_Test Price List",
"currency": "INR" "currency": "INR",
"valid_for_all_countries": 1
}] }]
] ]