frappe/frappe#478 erpnext install works

This commit is contained in:
Rushabh Mehta
2014-04-02 18:09:34 +05:30
parent 943e614810
commit f191f854cd
55 changed files with 165 additions and 167 deletions

View File

@@ -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`

View File

@@ -6,5 +6,5 @@ import frappe
from frappe.model.document import Document
class BomItem(Document):
class BOMItem(Document):
pass

View File

@@ -6,5 +6,5 @@ import frappe
from frappe.model.document import Document
class BomOperation(Document):
class BOMOperation(Document):
pass

View File

@@ -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()

View File

@@ -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:

View File

@@ -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)