mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-03 13:38:27 +00:00
[material requests] [tests]
This commit is contained in:
@@ -34,6 +34,9 @@ class BuyingController(StockController):
|
||||
|
||||
def validate(self):
|
||||
super(BuyingController, self).validate()
|
||||
if self.doc.supplier and not self.doc.supplier_name:
|
||||
self.doc.supplier_name = webnotes.conn.get_value("Supplier",
|
||||
self.doc.supplier, "supplier_name")
|
||||
self.validate_stock_or_nonstock_items()
|
||||
self.validate_warehouse_belongs_to_company()
|
||||
|
||||
@@ -47,7 +50,7 @@ class BuyingController(StockController):
|
||||
for fieldname, val in self.get_default_address_and_contact("supplier").items():
|
||||
if not self.doc.fields.get(fieldname) and self.meta.get_field(fieldname):
|
||||
self.doc.fields[fieldname] = val
|
||||
|
||||
|
||||
self.set_missing_item_details(get_item_details)
|
||||
|
||||
def set_supplier_defaults(self):
|
||||
|
||||
Reference in New Issue
Block a user