Merge pull request #2488 from neilLasrado/bom-currency-fix
Bom Currency Fix
This commit is contained in:
commit
f4ec673a06
@ -129,15 +129,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "raw_material_cost",
|
"fieldname": "raw_material_cost",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Currency",
|
||||||
"label": "Total Raw Material Cost",
|
"label": "Total Raw Material Cost",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "operating_cost",
|
"fieldname": "operating_cost",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Currency",
|
||||||
"label": "Total Operating Cost",
|
"label": "Total Operating Cost",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
@ -148,23 +150,26 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "total_variable_cost",
|
"fieldname": "total_variable_cost",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Currency",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Total Variable Cost",
|
"label": "Total Variable Cost",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "total_fixed_cost",
|
"fieldname": "total_fixed_cost",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Currency",
|
||||||
"label": "Total Fixed Cost",
|
"label": "Total Fixed Cost",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "total_cost",
|
"fieldname": "total_cost",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Currency",
|
||||||
"label": "Total Cost",
|
"label": "Total Cost",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
@ -184,6 +189,14 @@
|
|||||||
"options": "Project",
|
"options": "Project",
|
||||||
"permlevel": 0
|
"permlevel": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Company",
|
||||||
|
"options": "company",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "amended_from",
|
"fieldname": "amended_from",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
@ -247,7 +260,7 @@
|
|||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"modified": "2014-12-04 12:37:39.710211",
|
"modified": "2014-12-12 11:13:12.146205",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM",
|
"name": "BOM",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"autoname": "FBD/.######",
|
"autoname": "FBD/.######",
|
||||||
"creation": "2013-03-07 11:42:57.000000",
|
"creation": "2013-03-07 11:42:57",
|
||||||
"default_print_format": "Standard",
|
"default_print_format": "Standard",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@ -40,21 +40,23 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "rate",
|
"fieldname": "rate",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Currency",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Rate",
|
"label": "Rate",
|
||||||
"oldfieldname": "standard_rate",
|
"oldfieldname": "standard_rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "amount",
|
"fieldname": "amount",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Currency",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
"oldfieldname": "amount_as_per_sr",
|
"oldfieldname": "amount_as_per_sr",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
@ -82,10 +84,11 @@
|
|||||||
],
|
],
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2013-12-20 19:22:57.000000",
|
"modified": "2014-12-12 11:18:01.745641",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM Explosion Item",
|
"name": "BOM Explosion Item",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
|
"permissions": [],
|
||||||
"read_only": 0
|
"read_only": 0
|
||||||
}
|
}
|
@ -76,9 +76,10 @@
|
|||||||
{
|
{
|
||||||
"description": "See \"Rate Of Materials Based On\" in Costing Section",
|
"description": "See \"Rate Of Materials Based On\" in Costing Section",
|
||||||
"fieldname": "rate",
|
"fieldname": "rate",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Currency",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Rate",
|
"label": "Rate",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
@ -101,11 +102,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "amount",
|
"fieldname": "amount",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Currency",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Amount",
|
"label": "Amount",
|
||||||
"oldfieldname": "amount_as_per_mar",
|
"oldfieldname": "amount_as_per_mar",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_width": "150px",
|
"print_width": "150px",
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
@ -134,7 +136,7 @@
|
|||||||
],
|
],
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2014-05-29 15:56:31.859868",
|
"modified": "2014-12-12 11:15:43.798755",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM Item",
|
"name": "BOM Item",
|
||||||
|
@ -1,89 +1,92 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:27:49",
|
"creation": "2013-02-22 01:27:49",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldname": "operation_no",
|
"fieldname": "operation_no",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Operation No",
|
"label": "Operation No",
|
||||||
"oldfieldname": "operation_no",
|
"oldfieldname": "operation_no",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "opn_description",
|
"fieldname": "opn_description",
|
||||||
"fieldtype": "Text",
|
"fieldtype": "Text",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Operation Description",
|
"label": "Operation Description",
|
||||||
"oldfieldname": "opn_description",
|
"oldfieldname": "opn_description",
|
||||||
"oldfieldtype": "Text",
|
"oldfieldtype": "Text",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "col_break1",
|
"fieldname": "col_break1",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"permlevel": 0
|
"permlevel": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "workstation",
|
"fieldname": "workstation",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Workstation",
|
"label": "Workstation",
|
||||||
"oldfieldname": "workstation",
|
"oldfieldname": "workstation",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Workstation",
|
"options": "Workstation",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 0
|
"reqd": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "hour_rate",
|
"fieldname": "hour_rate",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Currency",
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Hour Rate",
|
"label": "Hour Rate",
|
||||||
"oldfieldname": "hour_rate",
|
"oldfieldname": "hour_rate",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"permlevel": 0,
|
"options": "Company:company:default_currency",
|
||||||
|
"permlevel": 0,
|
||||||
"reqd": 0
|
"reqd": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "time_in_mins",
|
"fieldname": "time_in_mins",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Operation Time (mins)",
|
"label": "Operation Time (mins)",
|
||||||
"oldfieldname": "time_in_mins",
|
"oldfieldname": "time_in_mins",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 0
|
"reqd": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"fieldname": "operating_cost",
|
"fieldname": "operating_cost",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Currency",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Operating Cost",
|
"label": "Operating Cost",
|
||||||
"oldfieldname": "operating_cost",
|
"oldfieldname": "operating_cost",
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldtype": "Currency",
|
||||||
"permlevel": 0,
|
"options": "Company:company:default_currency",
|
||||||
|
"permlevel": 0,
|
||||||
"reqd": 0
|
"reqd": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "fixed_cycle_cost",
|
"fieldname": "fixed_cycle_cost",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Currency",
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"label": "Fixed Cycle Cost",
|
"label": "Fixed Cycle Cost",
|
||||||
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0
|
"permlevel": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"modified": "2014-09-15 12:03:47.456370",
|
"modified": "2014-12-12 11:16:49.031521",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM Operation",
|
"name": "BOM Operation",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": []
|
"permissions": []
|
||||||
}
|
}
|
@ -97,3 +97,4 @@ execute:frappe.db.sql("update `tabMaterial Request` set material_request_type =
|
|||||||
execute:frappe.reload_doc('stock', 'doctype', 'item')
|
execute:frappe.reload_doc('stock', 'doctype', 'item')
|
||||||
execute:frappe.db.sql("update `tabItem` i set apply_warehouse_wise_reorder_level=1, re_order_level=0, re_order_qty=0 where exists(select name from `tabItem Reorder` where parent=i.name)")
|
execute:frappe.db.sql("update `tabItem` i set apply_warehouse_wise_reorder_level=1, re_order_level=0, re_order_qty=0 where exists(select name from `tabItem Reorder` where parent=i.name)")
|
||||||
execute:frappe.rename_doc("DocType", "Support Ticket", "Issue", force=True)
|
execute:frappe.rename_doc("DocType", "Support Ticket", "Issue", force=True)
|
||||||
|
erpnext.patches.v5_0.set_default_company_in_bom
|
||||||
|
8
erpnext/patches/v5_0/set_default_company_in_bom.py
Normal file
8
erpnext/patches/v5_0/set_default_company_in_bom.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
company = frappe.db.get_value("Global Defaults", None, "default_company")
|
||||||
|
frappe.db.sql("""update `tabBOM` set company = %s""",company)
|
Loading…
x
Reference in New Issue
Block a user