Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added Stock UOM field for RM in work order (backport #44185) #44237

Open
wants to merge 1 commit into
base: version-15-hotfix
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"include_item_in_manufacturing",
"qty_section",
"required_qty",
"stock_uom",
"rate",
"amount",
"column_break_11",
Expand Down Expand Up @@ -138,11 +139,32 @@
"in_list_view": 1,
"label": "Returned Qty ",
"read_only": 1
<<<<<<< HEAD
=======
},
{
"fieldname": "operation_row_id",
"fieldtype": "Int",
"label": "Operation Row Id",
"read_only": 1
},
{
"fetch_from": "item_code.stock_uom",
"fieldname": "stock_uom",
"fieldtype": "Link",
"label": "Stock UOM",
"options": "UOM",
"read_only": 1
>>>>>>> cc571aca8f (fix: added Stock UOM field for RM in work order (#44185))
}
],
"istable": 1,
"links": [],
<<<<<<< HEAD
"modified": "2024-02-11 15:45:32.318374",
=======
"modified": "2024-11-19 15:48:16.823384",
>>>>>>> cc571aca8f (fix: added Stock UOM field for RM in work order (#44185))
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Work Order Item",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ class WorkOrderItem(Document):
item_code: DF.Link | None
item_name: DF.Data | None
operation: DF.Link | None
operation_row_id: DF.Int
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
rate: DF.Currency
required_qty: DF.Float
returned_qty: DF.Float
source_warehouse: DF.Link | None
stock_uom: DF.Link | None
transferred_qty: DF.Float
# end: auto-generated types

Expand Down
5 changes: 5 additions & 0 deletions erpnext/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -380,5 +380,10 @@ erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1
erpnext.patches.v15_0.set_standard_stock_entry_type
erpnext.patches.v15_0.link_purchase_item_to_asset_doc
erpnext.patches.v14_0.update_currency_exchange_settings_for_frankfurter
<<<<<<< HEAD
erpnext.patches.v15_0.update_task_assignee_email_field_in_asset_maintenance_log
erpnext.patches.v15_0.update_sub_voucher_type_in_gl_entries
=======
erpnext.patches.v15_0.migrate_old_item_wise_tax_detail_data_format
erpnext.patches.v14_0.update_stock_uom_in_work_order_item
>>>>>>> cc571aca8f (fix: added Stock UOM field for RM in work order (#44185))
15 changes: 15 additions & 0 deletions erpnext/patches/v14_0/update_stock_uom_in_work_order_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import frappe


def execute():
frappe.db.sql(
"""
UPDATE
`tabWork Order Item`, `tabItem`
SET
`tabWork Order Item`.stock_uom = `tabItem`.stock_uom
WHERE
`tabWork Order Item`.item_code = `tabItem`.name
AND `tabWork Order Item`.docstatus = 1
"""
)
Loading