mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
[bom] [production] Cleaned up BOM, Production Planning Tool, Progress in Demo Builder
This commit is contained in:
@@ -118,6 +118,11 @@ class DocType:
|
||||
rate = self.get_valuation_rate(arg)
|
||||
elif self.doc.rm_cost_as_per == 'Last Purchase Rate':
|
||||
rate = arg['last_purchase_rate']
|
||||
elif self.doc.rm_cost_as_per == "Price List":
|
||||
if not self.doc.price_list:
|
||||
webnotes.throw(_("Please select Price List"))
|
||||
rate = webnotes.conn.get_value("Item Price", {"price_list_name": self.doc.price_list,
|
||||
"parent": arg["item_code"]}, "ref_rate") or 0
|
||||
elif self.doc.rm_cost_as_per == 'Standard Rate':
|
||||
rate = arg['standard_rate']
|
||||
|
||||
@@ -180,7 +185,7 @@ class DocType:
|
||||
webnotes.conn.set(self.doc, "is_default", 0)
|
||||
|
||||
sql("update `tabItem` set default_bom = null where name = %s and default_bom = %s",
|
||||
(self.doc.item, self.doc.name))
|
||||
(self.doc.item, self.doc.name))
|
||||
|
||||
def clear_operations(self):
|
||||
if not self.doc.with_operations:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-22 15:11:38",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-22 15:28:38",
|
||||
"modified": "2013-08-07 17:09:46",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -66,11 +66,6 @@
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "cb0",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"default": "1",
|
||||
@@ -87,6 +82,7 @@
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"default": "1",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "is_default",
|
||||
"fieldtype": "Check",
|
||||
@@ -96,6 +92,11 @@
|
||||
"oldfieldname": "is_default",
|
||||
"oldfieldtype": "Check"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "cb0",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"description": "Manage cost of operations",
|
||||
"doctype": "DocField",
|
||||
@@ -103,6 +104,22 @@
|
||||
"fieldtype": "Check",
|
||||
"label": "With Operations"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "rm_cost_as_per",
|
||||
"fieldtype": "Select",
|
||||
"label": "Rate Of Materials Based On",
|
||||
"options": "Valuation Rate\nLast Purchase Rate\nPrice List"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.rm_cost_as_per===\"Price List\"",
|
||||
"description": "Price List for Costing",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "price_list",
|
||||
"fieldtype": "Link",
|
||||
"label": "Price List",
|
||||
"options": "Price List"
|
||||
},
|
||||
{
|
||||
"depends_on": "with_operations",
|
||||
"doctype": "DocField",
|
||||
@@ -145,13 +162,6 @@
|
||||
"label": "Costing",
|
||||
"oldfieldtype": "Section Break"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "rm_cost_as_per",
|
||||
"fieldtype": "Select",
|
||||
"label": "Rate Of Materials Based On",
|
||||
"options": "Valuation Rate\nLast Purchase Rate"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "total_cost",
|
||||
|
||||
Reference in New Issue
Block a user