feat: add field Purchase Order Item
in SCO Item
This commit is contained in:
parent
7e4dd33ab0
commit
a2ede7d6d5
@ -123,8 +123,6 @@ class SubcontractingOrder(SubcontractingController):
|
||||
stock_bin.update_reserved_qty_for_sub_contracting()
|
||||
|
||||
def populate_items_table(self):
|
||||
items = []
|
||||
|
||||
for si in self.service_items:
|
||||
if si.fg_item:
|
||||
item = frappe.get_doc("Item", si.fg_item)
|
||||
@ -134,7 +132,8 @@ class SubcontractingOrder(SubcontractingController):
|
||||
)
|
||||
or item.default_bom
|
||||
)
|
||||
items.append(
|
||||
self.append(
|
||||
"items",
|
||||
{
|
||||
"item_code": item.item_code,
|
||||
"item_name": item.item_name,
|
||||
@ -143,6 +142,7 @@ class SubcontractingOrder(SubcontractingController):
|
||||
"qty": si.fg_item_qty,
|
||||
"stock_uom": item.stock_uom,
|
||||
"bom": bom,
|
||||
"purchase_order_item": si.purchase_order_item,
|
||||
},
|
||||
)
|
||||
else:
|
||||
@ -151,11 +151,8 @@ class SubcontractingOrder(SubcontractingController):
|
||||
si.item_name or si.item_code
|
||||
)
|
||||
)
|
||||
else:
|
||||
for item in items:
|
||||
self.append("items", item)
|
||||
else:
|
||||
self.set_missing_values()
|
||||
|
||||
self.set_missing_values()
|
||||
|
||||
def update_status(self, status=None, update_modified=True):
|
||||
if self.docstatus >= 1 and not status:
|
||||
|
@ -45,7 +45,8 @@
|
||||
"dimension_col_break",
|
||||
"project",
|
||||
"section_break_34",
|
||||
"page_break"
|
||||
"page_break",
|
||||
"purchase_order_item"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
@ -332,13 +333,22 @@
|
||||
"fieldtype": "Link",
|
||||
"label": "Project",
|
||||
"options": "Project"
|
||||
},
|
||||
{
|
||||
"fieldname": "purchase_order_item",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"label": "Purchase Order Item",
|
||||
"no_copy": 1,
|
||||
"read_only": 1,
|
||||
"search_index": 1
|
||||
}
|
||||
],
|
||||
"idx": 1,
|
||||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2023-11-14 18:38:37.640677",
|
||||
"modified": "2023-11-23 16:56:22.182698",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Subcontracting",
|
||||
"name": "Subcontracting Order Item",
|
||||
|
Loading…
x
Reference in New Issue
Block a user