fix: added supplier warehouse field back again (#24827)
This commit is contained in:
parent
202ef92fa1
commit
0623a34210
@ -58,6 +58,7 @@
|
|||||||
"rejected_warehouse",
|
"rejected_warehouse",
|
||||||
"col_break_warehouse",
|
"col_break_warehouse",
|
||||||
"set_from_warehouse",
|
"set_from_warehouse",
|
||||||
|
"supplier_warehouse",
|
||||||
"is_subcontracted",
|
"is_subcontracted",
|
||||||
"items_section",
|
"items_section",
|
||||||
"update_stock",
|
"update_stock",
|
||||||
@ -1350,7 +1351,7 @@
|
|||||||
"options": "Company"
|
"options": "Company"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"depends_on": "eval:doc.update_stock && (doc.is_subcontracted==\"Yes\" || doc.is_internal_supplier)",
|
"depends_on": "eval:doc.update_stock && doc.is_internal_supplier",
|
||||||
"description": "Sets 'From Warehouse' in each row of the items table.",
|
"description": "Sets 'From Warehouse' in each row of the items table.",
|
||||||
"fieldname": "set_from_warehouse",
|
"fieldname": "set_from_warehouse",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@ -1360,13 +1361,24 @@
|
|||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_width": "50px",
|
"print_width": "50px",
|
||||||
"width": "50px"
|
"width": "50px"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "eval:doc.update_stock && doc.is_subcontracted==\"Yes\"",
|
||||||
|
"fieldname": "supplier_warehouse",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Supplier Warehouse",
|
||||||
|
"no_copy": 1,
|
||||||
|
"options": "Warehouse",
|
||||||
|
"print_hide": 1,
|
||||||
|
"print_width": "50px",
|
||||||
|
"width": "50px"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-file-text",
|
"icon": "fa fa-file-text",
|
||||||
"idx": 204,
|
"idx": 204,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-12-26 20:49:03.305063",
|
"modified": "2021-03-09 21:56:28.748582",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Invoice",
|
"name": "Purchase Invoice",
|
||||||
|
|||||||
@ -288,7 +288,7 @@ class BuyingController(StockController):
|
|||||||
|
|
||||||
if self.is_subcontracted == "Yes":
|
if self.is_subcontracted == "Yes":
|
||||||
if self.doctype in ["Purchase Receipt", "Purchase Invoice"] and not self.supplier_warehouse:
|
if self.doctype in ["Purchase Receipt", "Purchase Invoice"] and not self.supplier_warehouse:
|
||||||
frappe.throw(_("Supplier Warehouse mandatory for sub-contracted Purchase Receipt"))
|
frappe.throw(_("Supplier Warehouse mandatory for sub-contracted {0}").format(self.doctype))
|
||||||
|
|
||||||
for item in self.get("items"):
|
for item in self.get("items"):
|
||||||
if item in self.sub_contracted_items and not item.bom:
|
if item in self.sub_contracted_items and not item.bom:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user