Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
c77a54ee40
@ -84,7 +84,7 @@ class DocType(TransactionBase):
|
|||||||
self.validate_duplicate_docname('purchase_order')
|
self.validate_duplicate_docname('purchase_order')
|
||||||
self.doclist = get_obj('DocType Mapper', 'Purchase Order-Payable Voucher').dt_map('Purchase Order', 'Payable Voucher', self.doc.purchase_order_main, self.doc, self.doclist, "[['Purchase Order', 'Payable Voucher'],['PO Detail', 'PV Detail']]")
|
self.doclist = get_obj('DocType Mapper', 'Purchase Order-Payable Voucher').dt_map('Purchase Order', 'Payable Voucher', self.doc.purchase_order_main, self.doc, self.doclist, "[['Purchase Order', 'Payable Voucher'],['PO Detail', 'PV Detail']]")
|
||||||
|
|
||||||
ret = eval(self.get_credit_to())
|
ret = self.get_credit_to()
|
||||||
#self.doc.supplier_name = ret['supplier_name']
|
#self.doc.supplier_name = ret['supplier_name']
|
||||||
#self.doc.supplier_address = ret['supplier_address']
|
#self.doc.supplier_address = ret['supplier_address']
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# REMEMBER to update this
|
# REMEMBER to update this
|
||||||
# ========================
|
# ========================
|
||||||
|
|
||||||
last_patch = 339
|
last_patch = 340
|
||||||
|
|
||||||
#-------------------------------------------
|
#-------------------------------------------
|
||||||
|
|
||||||
@ -1407,3 +1407,5 @@ def execute(patch_no):
|
|||||||
sql("update tabPage set name='question-view' where name='Question View'")
|
sql("update tabPage set name='question-view' where name='Question View'")
|
||||||
elif patch_no == 339:
|
elif patch_no == 339:
|
||||||
reload_doc('production','doctype','bill_of_materials')
|
reload_doc('production','doctype','bill_of_materials')
|
||||||
|
elif patch_no == 340:
|
||||||
|
sql("update `tabDocField` set permlevel = 0 where (fieldname in ('process', 'production_order', 'fg_completed_qty') or label = 'Get Items') and parent = 'Stock Entry'")
|
||||||
|
@ -38,11 +38,12 @@ class DocType:
|
|||||||
|
|
||||||
self.doc.save()
|
self.doc.save()
|
||||||
|
|
||||||
# check actual qty with total number of serial no
|
|
||||||
self.check_qty_with_serial_no()
|
|
||||||
|
|
||||||
# update valuation for post dated entry
|
# update valuation for post dated entry
|
||||||
if actual_qty:
|
if actual_qty:
|
||||||
|
# check actual qty with total number of serial no
|
||||||
|
self.check_qty_with_serial_no()
|
||||||
|
|
||||||
prev_sle = self.get_prev_sle(dt, posting_time, sle_id)
|
prev_sle = self.get_prev_sle(dt, posting_time, sle_id)
|
||||||
cqty = flt(prev_sle.get('bin_aqat', 0))
|
cqty = flt(prev_sle.get('bin_aqat', 0))
|
||||||
# Block if actual qty becomes negative
|
# Block if actual qty becomes negative
|
||||||
@ -59,7 +60,7 @@ class DocType:
|
|||||||
if sql("select name from `tabItem` where ifnull(has_serial_no, 'No') = 'Yes' and name = '%s'" % self.doc.item_code):
|
if sql("select name from `tabItem` where ifnull(has_serial_no, 'No') = 'Yes' and name = '%s'" % self.doc.item_code):
|
||||||
sr_count = sql("select count(name) from `tabSerial No` where item_code = '%s' and warehouse = '%s' and status ='In Store' and docstatus != 2" % (self.doc.item_code, self.doc.warehouse))[0][0]
|
sr_count = sql("select count(name) from `tabSerial No` where item_code = '%s' and warehouse = '%s' and status ='In Store' and docstatus != 2" % (self.doc.item_code, self.doc.warehouse))[0][0]
|
||||||
if sr_count != self.doc.actual_qty:
|
if sr_count != self.doc.actual_qty:
|
||||||
msg = "Actual Qty in Bin is mismatched with total number of serial no in store for item: '%s' and warehouse: '%s'" % (self.doc.item_code, self.doc.warehouse)
|
msg = "Actual Qty(%s) in Bin is mismatched with total number(%s) of serial no in store for item: '%s' and warehouse: '%s'" % (self.doc.actual_qty, sr_count, self.doc.item_code, self.doc.warehouse)
|
||||||
msgprint(msg, raise_exception=1)
|
msgprint(msg, raise_exception=1)
|
||||||
sendmail(['developer@iwebnotes.com'], sender='automail@webnotestech.com', subject='Serial No Count vs Bin Actual Qty', parts=[['text/plain', msg]])
|
sendmail(['developer@iwebnotes.com'], sender='automail@webnotestech.com', subject='Serial No Count vs Bin Actual Qty', parts=[['text/plain', msg]])
|
||||||
|
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:25',
|
'creation': '2010-08-08 17:09:25',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2011-07-11 12:48:52',
|
'modified': '2011-08-22 14:36:19',
|
||||||
'modified_by': 'Administrator',
|
'modified_by': 'Administrator',
|
||||||
'owner': 'Administrator'
|
'owner': 'Administrator'
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocType
|
# These values are common for all DocType
|
||||||
{
|
{
|
||||||
'_last_update': '1308741898',
|
'_last_update': '1311621379',
|
||||||
'allow_attach': 0,
|
'allow_attach': 0,
|
||||||
'allow_copy': 0,
|
'allow_copy': 0,
|
||||||
'allow_email': 0,
|
'allow_email': 0,
|
||||||
@ -40,7 +40,7 @@
|
|||||||
'subject': '%(remarks)s',
|
'subject': '%(remarks)s',
|
||||||
'tag_fields': 'purpose',
|
'tag_fields': 'purpose',
|
||||||
'use_template': 0,
|
'use_template': 0,
|
||||||
'version': 243
|
'version': 245
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@ -70,15 +70,15 @@
|
|||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'amend': 1,
|
'amend': 0,
|
||||||
'cancel': 1,
|
'cancel': 0,
|
||||||
'create': 1,
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 1,
|
'idx': 1,
|
||||||
'permlevel': 0,
|
'permlevel': 1,
|
||||||
'role': 'Material Manager',
|
'role': 'Material Manager',
|
||||||
'submit': 1,
|
'submit': 0,
|
||||||
'write': 1
|
'write': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
@ -89,7 +89,7 @@
|
|||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 2,
|
'idx': 2,
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'Material Manager',
|
'role': 'Material User',
|
||||||
'submit': 0,
|
'submit': 0,
|
||||||
'write': 0
|
'write': 0
|
||||||
},
|
},
|
||||||
@ -102,7 +102,7 @@
|
|||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 3,
|
'idx': 3,
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'role': 'Material User',
|
'role': 'Production User',
|
||||||
'submit': 1,
|
'submit': 1,
|
||||||
'write': 1
|
'write': 1
|
||||||
},
|
},
|
||||||
@ -115,69 +115,60 @@
|
|||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 4,
|
'idx': 4,
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'Material User',
|
'role': 'Production User',
|
||||||
'submit': 0,
|
'submit': 0,
|
||||||
'write': 0
|
'write': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocPerm
|
||||||
|
{
|
||||||
|
'amend': 0,
|
||||||
|
'cancel': 0,
|
||||||
|
'create': 0,
|
||||||
|
'doctype': 'DocPerm',
|
||||||
|
'idx': 5,
|
||||||
|
'permlevel': 2,
|
||||||
|
'role': 'Production User',
|
||||||
|
'submit': 0,
|
||||||
|
'write': 1
|
||||||
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'amend': 1,
|
'amend': 1,
|
||||||
'cancel': 1,
|
'cancel': 1,
|
||||||
'create': 1,
|
'create': 1,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 5,
|
'idx': 6,
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'role': 'Production User',
|
'role': 'Production Manager',
|
||||||
'submit': 1,
|
'submit': 1,
|
||||||
'write': 1
|
'write': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'doctype': 'DocPerm',
|
'amend': 0,
|
||||||
'idx': 6,
|
'cancel': 0,
|
||||||
'permlevel': 1,
|
|
||||||
'role': 'Production User'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocPerm
|
|
||||||
{
|
|
||||||
'create': 0,
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 7,
|
'idx': 7,
|
||||||
'permlevel': 2,
|
'permlevel': 1,
|
||||||
'role': 'Production User',
|
'role': 'Production Manager',
|
||||||
'write': 1
|
'submit': 0,
|
||||||
|
'write': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'amend': 1,
|
'amend': 0,
|
||||||
'cancel': 1,
|
'cancel': 0,
|
||||||
'create': 1,
|
'create': 0,
|
||||||
'doctype': 'DocPerm',
|
'doctype': 'DocPerm',
|
||||||
'idx': 8,
|
'idx': 8,
|
||||||
'permlevel': 0,
|
|
||||||
'role': 'Production Manager',
|
|
||||||
'submit': 1,
|
|
||||||
'write': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocPerm
|
|
||||||
{
|
|
||||||
'doctype': 'DocPerm',
|
|
||||||
'idx': 9,
|
|
||||||
'permlevel': 1,
|
|
||||||
'role': 'Production Manager'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocPerm
|
|
||||||
{
|
|
||||||
'doctype': 'DocPerm',
|
|
||||||
'idx': 10,
|
|
||||||
'permlevel': 2,
|
'permlevel': 2,
|
||||||
'role': 'Production Manager',
|
'role': 'Production Manager',
|
||||||
|
'submit': 0,
|
||||||
'write': 1
|
'write': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -452,7 +443,7 @@
|
|||||||
'oldfieldname': 'process',
|
'oldfieldname': 'process',
|
||||||
'oldfieldtype': 'Select',
|
'oldfieldtype': 'Select',
|
||||||
'options': '\nMaterial Transfer\nBackflush',
|
'options': '\nMaterial Transfer\nBackflush',
|
||||||
'permlevel': 2,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'report_hide': 0,
|
'report_hide': 0,
|
||||||
'search_index': 0,
|
'search_index': 0,
|
||||||
@ -474,7 +465,7 @@
|
|||||||
'oldfieldname': 'production_order',
|
'oldfieldname': 'production_order',
|
||||||
'oldfieldtype': 'Link',
|
'oldfieldtype': 'Link',
|
||||||
'options': 'Production Order',
|
'options': 'Production Order',
|
||||||
'permlevel': 2,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'report_hide': 0,
|
'report_hide': 0,
|
||||||
'search_index': 1,
|
'search_index': 1,
|
||||||
@ -493,7 +484,7 @@
|
|||||||
'no_copy': 0,
|
'no_copy': 0,
|
||||||
'oldfieldname': 'fg_completed_qty',
|
'oldfieldname': 'fg_completed_qty',
|
||||||
'oldfieldtype': 'Currency',
|
'oldfieldtype': 'Currency',
|
||||||
'permlevel': 2,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'report_hide': 0,
|
'report_hide': 0,
|
||||||
'search_index': 0,
|
'search_index': 0,
|
||||||
@ -802,7 +793,7 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': 'Column Break',
|
||||||
'idx': 36,
|
'idx': 35,
|
||||||
'oldfieldtype': 'Column Break',
|
'oldfieldtype': 'Column Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
@ -814,13 +805,13 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Button',
|
'fieldtype': 'Button',
|
||||||
'hidden': 0,
|
'hidden': 0,
|
||||||
'idx': 37,
|
'idx': 36,
|
||||||
'in_filter': 0,
|
'in_filter': 0,
|
||||||
'label': 'Get Items',
|
'label': 'Get Items',
|
||||||
'no_copy': 0,
|
'no_copy': 0,
|
||||||
'oldfieldtype': 'Button',
|
'oldfieldtype': 'Button',
|
||||||
'options': 'get_items',
|
'options': 'get_items',
|
||||||
'permlevel': 2,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'report_hide': 0,
|
'report_hide': 0,
|
||||||
'search_index': 0
|
'search_index': 0
|
||||||
@ -830,7 +821,7 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 38,
|
'idx': 37,
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'options': 'Simple',
|
'options': 'Simple',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -843,7 +834,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'mtn_details',
|
'fieldname': 'mtn_details',
|
||||||
'fieldtype': 'Table',
|
'fieldtype': 'Table',
|
||||||
'idx': 39,
|
'idx': 38,
|
||||||
'in_filter': 0,
|
'in_filter': 0,
|
||||||
'label': 'MTN Details',
|
'label': 'MTN Details',
|
||||||
'no_copy': 0,
|
'no_copy': 0,
|
||||||
@ -862,7 +853,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'total_amount',
|
'fieldname': 'total_amount',
|
||||||
'fieldtype': 'Currency',
|
'fieldtype': 'Currency',
|
||||||
'idx': 40,
|
'idx': 39,
|
||||||
'in_filter': 0,
|
'in_filter': 0,
|
||||||
'label': 'Total Amount',
|
'label': 'Total Amount',
|
||||||
'no_copy': 0,
|
'no_copy': 0,
|
||||||
@ -878,7 +869,7 @@
|
|||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': 'Section Break',
|
||||||
'idx': 41,
|
'idx': 40,
|
||||||
'label': 'Other Details',
|
'label': 'Other Details',
|
||||||
'oldfieldtype': 'Section Break',
|
'oldfieldtype': 'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
@ -890,7 +881,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'company',
|
'fieldname': 'company',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 42,
|
'idx': 41,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': 'Company',
|
'label': 'Company',
|
||||||
'no_copy': 0,
|
'no_copy': 0,
|
||||||
@ -910,7 +901,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'fiscal_year',
|
'fieldname': 'fiscal_year',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'idx': 43,
|
'idx': 42,
|
||||||
'in_filter': 0,
|
'in_filter': 0,
|
||||||
'label': 'Fiscal Year',
|
'label': 'Fiscal Year',
|
||||||
'no_copy': 0,
|
'no_copy': 0,
|
||||||
@ -930,7 +921,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldname': 'select_print_heading',
|
'fieldname': 'select_print_heading',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': 'Link',
|
||||||
'idx': 44,
|
'idx': 43,
|
||||||
'in_filter': 0,
|
'in_filter': 0,
|
||||||
'label': 'Select Print Heading',
|
'label': 'Select Print Heading',
|
||||||
'no_copy': 0,
|
'no_copy': 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user