mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 13:39:18 +00:00
[doclist] new pattern / [item] pricelist must be unique / [formatter] show null floats as empty string
This commit is contained in:
@@ -47,13 +47,13 @@ class BuyingController(StockController):
|
||||
self.set_total_in_words()
|
||||
|
||||
def validate_warehouse_belongs_to_company(self):
|
||||
for d in self.doclist.get({"warehouse": True}):
|
||||
warehouse_company = webnotes.conn.get_value("Warehouse", d.warehouse, "company")
|
||||
if warehouse_company and warehouse_company != self.doc.company:
|
||||
for warehouse, company in webnotes.conn.get_values("Warehouse",
|
||||
self.doclist.get_distinct_values("warehouse"), "company").items():
|
||||
if company and company != self.doc.company:
|
||||
webnotes.msgprint(_("Warehouse must belong to company") + \
|
||||
(": %s (%s, %s)" % (d.warehouse, warehouse_company, self.doc.company)),
|
||||
(": %s (%s, %s)" % (warehouse, company, self.doc.company)),
|
||||
raise_exception=WrongWarehouseCompany)
|
||||
|
||||
|
||||
def validate_stock_or_nonstock_items(self):
|
||||
items = [d.item_code for d in self.doclist.get({"parentfield": self.fname})]
|
||||
if self.stock_items:
|
||||
|
||||
Reference in New Issue
Block a user