Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta
2012-12-27 16:50:55 +05:30
19 changed files with 49 additions and 286 deletions

View File

@@ -1,49 +0,0 @@
[
{
"owner": "harshada@webnotestech.com",
"docstatus": 0,
"creation": "2010-09-01 15:47:59",
"modified_by": "Administrator",
"modified": "2011-09-15 15:04:43"
},
{
"match_id": 0,
"parent": "Project-Delivery Note",
"name": "__common__",
"doctype": "Table Mapper Detail",
"parenttype": "DocType Mapper",
"from_table": "Project",
"to_table": "Delivery Note",
"validation_logic": "name is not null",
"parentfield": "table_mapper_details"
},
{
"map": "Yes",
"match_id": 0,
"parent": "Project-Delivery Note",
"name": "__common__",
"to_field": "customer",
"doctype": "Field Mapper Detail",
"parenttype": "DocType Mapper",
"checking_operator": "=",
"from_field": "customer",
"parentfield": "field_mapper_details"
},
{
"name": "__common__",
"to_doctype": "Delivery Note",
"module": "Stock",
"doctype": "DocType Mapper",
"from_doctype": "Project"
},
{
"name": "Project-Delivery Note",
"doctype": "DocType Mapper"
},
{
"doctype": "Field Mapper Detail"
},
{
"doctype": "Table Mapper Detail"
}
]

View File

@@ -78,13 +78,6 @@ class DocType(TransactionBase):
def get_tc_details(self):
return get_obj('Sales Common').get_tc_details(self)
def pull_project_customer(self):
res = sql("select customer from `tabProject` where name = '%s'" % self.doc.project_name)
if res and res[0][0]:
get_obj('DocType Mapper', 'Project-Delivery Note').dt_map('Project', 'Delivery Note', self.doc.project_name, self.doc, self.doclist, "[['Project', 'Delivery Note']]")
def get_item_details(self, args=None):
import json
args = args and json.loads(args) or {}

View File

@@ -284,15 +284,17 @@ class DocType(TransactionBase):
# on submit
def on_submit(self):
purchase_controller = webnotes.get_obj("Purchase Common")
purchase_controller.is_item_table_empty(self)
# Check for Approving Authority
get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, self.doc.company, self.doc.grand_total)
# Set status as Submitted
webnotes.conn.set(self.doc,'status', 'Submitted')
pc_obj = get_obj('Purchase Common')
# Update Previous Doc i.e. update pending_qty and Status accordingly
pc_obj.update_prevdoc_detail(self, is_submit = 1)
purchase_controller.update_prevdoc_detail(self, is_submit = 1)
# Update Serial Record
get_obj('Stock Ledger').update_serial_record(self, 'purchase_receipt_details', is_submit = 1, is_incoming = 1)
@@ -301,7 +303,7 @@ class DocType(TransactionBase):
self.update_stock(is_submit = 1)
# Update last purchase rate
pc_obj.update_last_purchase_rate(self, 1)
purchase_controller.update_last_purchase_rate(self, 1)