mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-18 02:55:20 +00:00
frappe/frappe#478 erpnext install works
This commit is contained in:
@@ -11,7 +11,7 @@ from frappe import msgprint, _
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
class Bom(Document):
|
||||
class BOM(Document):
|
||||
|
||||
def autoname(self):
|
||||
last_name = frappe.db.sql("""select max(name) from `tabBOM`
|
||||
@@ -28,7 +28,7 @@ class Bom(Document):
|
||||
self.validate_main_item()
|
||||
|
||||
from erpnext.utilities.transaction_base import validate_uom_is_integer
|
||||
validate_uom_is_integer(self.doclist, "stock_uom", "qty")
|
||||
validate_uom_is_integer(self, "stock_uom", "qty")
|
||||
|
||||
self.validate_operations()
|
||||
self.validate_materials()
|
||||
@@ -133,11 +133,11 @@ class Bom(Document):
|
||||
})["rate"]
|
||||
|
||||
if self.docstatus == 0:
|
||||
frappe.get_doc(self.doclist).save()
|
||||
self.save()
|
||||
elif self.docstatus == 1:
|
||||
self.calculate_cost()
|
||||
self.update_exploded_items()
|
||||
frappe.get_doc(self.doclist).update_after_submit()
|
||||
self.update_after_submit()
|
||||
|
||||
def get_bom_unitcost(self, bom_no):
|
||||
bom = frappe.db.sql("""select name, total_cost/quantity as unit_cost from `tabBOM`
|
||||
|
||||
@@ -6,5 +6,5 @@ import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
class BomItem(Document):
|
||||
class BOMItem(Document):
|
||||
pass
|
||||
@@ -6,5 +6,5 @@ import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
class BomOperation(Document):
|
||||
class BOMOperation(Document):
|
||||
pass
|
||||
@@ -8,7 +8,7 @@ from frappe import msgprint, _
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
class BomReplaceTool(Document):
|
||||
class BOMReplaceTool(Document):
|
||||
def replace_bom(self):
|
||||
self.validate_bom()
|
||||
self.update_new_bom()
|
||||
|
||||
@@ -26,7 +26,7 @@ class ProductionOrder(Document):
|
||||
self.validate_warehouse()
|
||||
|
||||
from erpnext.utilities.transaction_base import validate_uom_is_integer
|
||||
validate_uom_is_integer(self.doclist, "stock_uom", ["qty", "produced_qty"])
|
||||
validate_uom_is_integer(self, "stock_uom", ["qty", "produced_qty"])
|
||||
|
||||
def validate_bom_no(self):
|
||||
if self.bom_no:
|
||||
|
||||
@@ -173,7 +173,7 @@ class ProductionPlanningTool(Document):
|
||||
self.validate_data()
|
||||
|
||||
from erpnext.utilities.transaction_base import validate_uom_is_integer
|
||||
validate_uom_is_integer(self.doclist, "stock_uom", "planned_qty")
|
||||
validate_uom_is_integer(self, "stock_uom", "planned_qty")
|
||||
|
||||
items = self.get_distinct_items_and_boms()[1]
|
||||
pro = self.create_production_order(items)
|
||||
|
||||
Reference in New Issue
Block a user