Merge branch 'production' of github.com:webnotes/erpnext into production
This commit is contained in:
commit
038d7aae9b
@ -2,9 +2,9 @@
|
|||||||
{
|
{
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"creation": "2012-07-03 13:30:03",
|
"creation": "2012-12-10 19:03:43",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"modified": "2012-12-10 18:30:00"
|
"modified": "2012-12-11 15:13:42"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
@ -177,12 +177,6 @@
|
|||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"permlevel": 1
|
"permlevel": 1
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"doctype": "DocField",
|
|
||||||
"fieldname": "col_break24",
|
|
||||||
"fieldtype": "Column Break",
|
|
||||||
"permlevel": 0
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"label": "Total Cost",
|
"label": "Total Cost",
|
||||||
@ -222,6 +216,7 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"label": "Item Description",
|
"label": "Item Description",
|
||||||
"oldfieldname": "description",
|
"oldfieldname": "description",
|
||||||
|
"width": "300px",
|
||||||
"fieldname": "description",
|
"fieldname": "description",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"permlevel": 0
|
"permlevel": 0
|
||||||
@ -275,7 +270,7 @@
|
|||||||
{
|
{
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"label": "BOM Explosion Items",
|
"label": "Exploded BOM Items",
|
||||||
"options": "Simple",
|
"options": "Simple",
|
||||||
"fieldname": "section_break0",
|
"fieldname": "section_break0",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
@ -288,7 +283,7 @@
|
|||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldtype": "Table",
|
"oldfieldtype": "Table",
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"label": "BOM Explosion Item",
|
"label": "Exploded BOM Items",
|
||||||
"oldfieldname": "flat_bom_details",
|
"oldfieldname": "flat_bom_details",
|
||||||
"default": "No Toolbar",
|
"default": "No Toolbar",
|
||||||
"fieldname": "flat_bom_details",
|
"fieldname": "flat_bom_details",
|
||||||
|
@ -31,8 +31,7 @@ class DocType:
|
|||||||
bom_list = self.get_parent_boms()
|
bom_list = self.get_parent_boms()
|
||||||
for bom in bom_list:
|
for bom in bom_list:
|
||||||
bom_obj = get_obj("BOM", bom, with_children=1)
|
bom_obj = get_obj("BOM", bom, with_children=1)
|
||||||
bom_obj.update_cost_by_traversing()
|
bom_obj.on_update()
|
||||||
bom_obj.update_flat_bom_by_traversing()
|
|
||||||
|
|
||||||
def validate_bom(self):
|
def validate_bom(self):
|
||||||
if cstr(self.doc.current_bom) == cstr(self.doc.new_bom):
|
if cstr(self.doc.current_bom) == cstr(self.doc.new_bom):
|
||||||
|
@ -3,6 +3,7 @@ import webnotes
|
|||||||
def execute():
|
def execute():
|
||||||
delete_doctypes()
|
delete_doctypes()
|
||||||
rename_module()
|
rename_module()
|
||||||
|
rebuilt_exploded_bom()
|
||||||
|
|
||||||
def delete_doctypes():
|
def delete_doctypes():
|
||||||
from webnotes.model import delete_doc
|
from webnotes.model import delete_doc
|
||||||
@ -14,17 +15,23 @@ def rename_module():
|
|||||||
webnotes.reload_doc("core", "doctype", "page")
|
webnotes.reload_doc("core", "doctype", "page")
|
||||||
webnotes.reload_doc("core", "doctype", "module_def")
|
webnotes.reload_doc("core", "doctype", "module_def")
|
||||||
|
|
||||||
webnotes.rename_doc("Role", "Production User", "Manufacturing User")
|
if webnotes.conn.exists("Role", "Production User"):
|
||||||
webnotes.rename_doc("Role", "Production Manager", "Manufacturing Manager")
|
webnotes.rename_doc("Role", "Production User", "Manufacturing User")
|
||||||
|
if webnotes.conn.exists("Role", "Production Manager"):
|
||||||
|
webnotes.rename_doc("Role", "Production Manager", "Manufacturing Manager")
|
||||||
|
|
||||||
if webnotes.conn.exists("Page", "manufacturing-home"):
|
if webnotes.conn.exists("Page", "manufacturing-home"):
|
||||||
webnotes.delete_doc("Page", "production-home")
|
webnotes.delete_doc("Page", "production-home")
|
||||||
else:
|
else:
|
||||||
webnotes.rename_doc("Page", "production-home", "manufacturing-home")
|
webnotes.rename_doc("Page", "production-home", "manufacturing-home")
|
||||||
|
|
||||||
webnotes.rename_doc("Module Def", "Production", "Manufacturing")
|
if webnotes.conn.exists("Module Def", "Production"):
|
||||||
|
webnotes.rename_doc("Module Def", "Production", "Manufacturing")
|
||||||
|
|
||||||
webnotes.conn.set_global("modules_list",
|
webnotes.conn.set_global("modules_list",
|
||||||
webnotes.conn.get_global('modules_list').replace("Production", "Manufacturing"))
|
webnotes.conn.get_global('modules_list').replace("Production", "Manufacturing"))
|
||||||
|
|
||||||
|
def rebuilt_exploded_bom():
|
||||||
|
from webnotes.model.code import get_obj
|
||||||
|
for bom in webnotes.conn.sql("""select name from `tabBOM` where docstatus < 2"""):
|
||||||
|
get_obj("BOM", bom[0], with_children=1).on_update()
|
||||||
|
Loading…
Reference in New Issue
Block a user