Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
31fcc4bb36
@ -25,14 +25,14 @@ var cfn_set_fields = function(doc, cdt, cdn) {
|
|||||||
lst = ['supplier','supplier_name','supplier_address','customer','customer_name','customer_address'];
|
lst = ['supplier','supplier_name','supplier_address','customer','customer_name','customer_address'];
|
||||||
hide_field(lst);
|
hide_field(lst);
|
||||||
|
|
||||||
if (doc.purpose == 'Production Order' || doc.purpose == 'Others'){
|
if (doc.purpose == 'Production Order' || doc.purpose == 'Other'){
|
||||||
unhide_field('Get Items');
|
unhide_field('Get Items');
|
||||||
hide_field(['from_warehouse', 'to_warehouse','purchase_receipt_no','delivery_note_no', 'sales_invoice_no','Warehouse HTML', 'transporter', 'is_excisable_goods', 'excisable_goods']);
|
hide_field(['from_warehouse', 'to_warehouse','purchase_receipt_no','delivery_note_no', 'sales_invoice_no','Warehouse HTML', 'transporter', 'is_excisable_goods', 'excisable_goods']);
|
||||||
if (doc.purpose=='Production Order') unhide_field(['production_order', 'process']);
|
if (doc.purpose=='Production Order') unhide_field(['production_order', 'process']);
|
||||||
|
|
||||||
doc.from_warehouse = '';
|
doc.from_warehouse = '';
|
||||||
doc.to_warehosue = '';
|
doc.to_warehosue = '';
|
||||||
if (doc.process == 'Backflush' || doc.purpose == 'Others'){
|
if (doc.process == 'Backflush' || doc.purpose == 'Other'){
|
||||||
unhide_field('fg_completed_qty');
|
unhide_field('fg_completed_qty');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -231,7 +231,7 @@ class DocType:
|
|||||||
bom_no = pro_obj.doc.bom_no
|
bom_no = pro_obj.doc.bom_no
|
||||||
fg_qty = (self.doc.process == 'Backflush') and flt(self.doc.fg_completed_qty) or flt(pro_obj.doc.qty)
|
fg_qty = (self.doc.process == 'Backflush') and flt(self.doc.fg_completed_qty) or flt(pro_obj.doc.qty)
|
||||||
consider_sa_items_as_rm = pro_obj.doc.consider_sa_items
|
consider_sa_items_as_rm = pro_obj.doc.consider_sa_items
|
||||||
elif self.doc.purpose == 'Others':
|
elif self.doc.purpose == 'Other':
|
||||||
self.validate_bom_no()
|
self.validate_bom_no()
|
||||||
bom_no = self.doc.bom_no
|
bom_no = self.doc.bom_no
|
||||||
fg_qty = self.doc.fg_completed_qty
|
fg_qty = self.doc.fg_completed_qty
|
||||||
@ -249,7 +249,7 @@ class DocType:
|
|||||||
sw = ''
|
sw = ''
|
||||||
tw = cstr(pro_obj.doc.fg_warehouse)
|
tw = cstr(pro_obj.doc.fg_warehouse)
|
||||||
fg_item_dict = {cstr(pro_obj.doc.production_item) : [self.doc.fg_completed_qty, pro_obj.doc.description, pro_obj.doc.stock_uom]}
|
fg_item_dict = {cstr(pro_obj.doc.production_item) : [self.doc.fg_completed_qty, pro_obj.doc.description, pro_obj.doc.stock_uom]}
|
||||||
elif self.doc.purpose == 'Others' and self.doc.bom_no:
|
elif self.doc.purpose == 'Other' and self.doc.bom_no:
|
||||||
sw, tw = '', ''
|
sw, tw = '', ''
|
||||||
item = sql("select item, description, uom from `tabBill Of Materials` where name = %s", self.doc.bom_no, as_dict=1)
|
item = sql("select item, description, uom from `tabBill Of Materials` where name = %s", self.doc.bom_no, as_dict=1)
|
||||||
fg_item_dict = {item[0]['item'] : [self.doc.fg_completed_qty, item[0]['description'], item[0]['uom']]}
|
fg_item_dict = {item[0]['item'] : [self.doc.fg_completed_qty, item[0]['description'], item[0]['uom']]}
|
||||||
@ -427,7 +427,7 @@ class DocType:
|
|||||||
if cstr(d.s_warehouse) != cstr(pro_obj.doc.wip_warehouse):
|
if cstr(d.s_warehouse) != cstr(pro_obj.doc.wip_warehouse):
|
||||||
msgprint("As Item %s is Raw Material. Source Warehouse should be same as WIP Warehouse %s in Production Order %s, at Row No %s. " % ( cstr(d.item_code), cstr(pro_obj.doc.wip_warehouse), cstr(pro_obj.doc.name), cstr(d.idx)))
|
msgprint("As Item %s is Raw Material. Source Warehouse should be same as WIP Warehouse %s in Production Order %s, at Row No %s. " % ( cstr(d.item_code), cstr(pro_obj.doc.wip_warehouse), cstr(pro_obj.doc.name), cstr(d.idx)))
|
||||||
raise Exception
|
raise Exception
|
||||||
if d.fg_item and (self.doc.purpose == 'Others' or self.doc.process == 'Backflush'):
|
if d.fg_item and (self.doc.purpose == 'Other' or self.doc.process == 'Backflush'):
|
||||||
fg_qty = flt(fg_qty) + flt(d.transfer_qty)
|
fg_qty = flt(fg_qty) + flt(d.transfer_qty)
|
||||||
|
|
||||||
d.save()
|
d.save()
|
||||||
|
@ -451,19 +451,19 @@
|
|||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'depends_on': u"eval:doc.purpose == 'Others'",
|
'depends_on': u"eval:doc.purpose == 'Other'",
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'bom_no',
|
'fieldname': u'bom_no',
|
||||||
'fieldtype': u'Link',
|
'fieldtype': u'Link',
|
||||||
'label': u'BOM No',
|
'label': u'BOM No',
|
||||||
'options': u'Bill of Materials',
|
'options': u'Bill Of Materials',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'depends_on': u"eval:doc.purpose == 'Others'",
|
'depends_on': u"eval:doc.purpose == 'Other'",
|
||||||
'description': u'Select "Yes" if stock is maintained and tracked for sub-assembly items. Select "No" if you want child items of sub-assembly for material transfer.',
|
'description': u'Select "Yes" if stock is maintained and tracked for sub-assembly items. Select "No" if you want child items of sub-assembly for material transfer.',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'consider_sa_items_as_raw_materials',
|
'fieldname': u'consider_sa_items_as_raw_materials',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user