Merge pull request #22275 from frappe/mergify/bp/develop/pr-22267

refactor: hide company currency fields in the routing (bp #22267)
This commit is contained in:
rohitwaghchaure 2020-06-17 12:27:40 +05:30 committed by GitHub
commit 67022b2d15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -119,6 +119,7 @@ class BOM(WebsiteGenerator):
"description": d.description, "description": d.description,
"time_in_mins": d.time_in_mins, "time_in_mins": d.time_in_mins,
"batch_size": d.batch_size, "batch_size": d.batch_size,
"operating_cost": d.operating_cost,
"idx": d.idx "idx": d.idx
}) })
child.hour_rate = flt(d.hour_rate / self.conversion_rate, 2) child.hour_rate = flt(d.hour_rate / self.conversion_rate, 2)

View File

@ -78,6 +78,7 @@
"read_only": 1 "read_only": 1
}, },
{ {
"depends_on": "eval:parent.doctype == 'BOM'",
"fieldname": "base_hour_rate", "fieldname": "base_hour_rate",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Base Hour Rate(Company Currency)", "label": "Base Hour Rate(Company Currency)",
@ -87,6 +88,7 @@
}, },
{ {
"default": "5", "default": "5",
"depends_on": "eval:parent.doctype == 'BOM'",
"fieldname": "base_operating_cost", "fieldname": "base_operating_cost",
"fieldtype": "Currency", "fieldtype": "Currency",
"label": "Operating Cost(Company Currency)", "label": "Operating Cost(Company Currency)",
@ -108,8 +110,8 @@
], ],
"idx": 1, "idx": 1,
"istable": 1, "istable": 1,
"modified": "2019-07-16 22:35:55.374037", "modified": "2020-06-16 17:01:11.128420",
"modified_by": "govindsmenokee@gmail.com", "modified_by": "Administrator",
"module": "Manufacturing", "module": "Manufacturing",
"name": "BOM Operation", "name": "BOM Operation",
"owner": "Administrator", "owner": "Administrator",

View File

@ -44,7 +44,6 @@ frappe.ui.form.on('BOM Operation', {
name: d.workstation name: d.workstation
}, },
callback: function (data) { callback: function (data) {
frappe.model.set_value(d.doctype, d.name, "base_hour_rate", data.message.hour_rate);
frappe.model.set_value(d.doctype, d.name, "hour_rate", data.message.hour_rate); frappe.model.set_value(d.doctype, d.name, "hour_rate", data.message.hour_rate);
frm.events.calculate_operating_cost(frm, d); frm.events.calculate_operating_cost(frm, d);
} }