supplier part number in purchase order
This commit is contained in:
parent
efc055241a
commit
1f69f92d2f
@ -131,7 +131,7 @@ class DocType(TransactionBase):
|
||||
'warehouse': wh,
|
||||
'item_tax_rate': json.dumps(t),
|
||||
'batch_no': '',
|
||||
'discount_rate': 0
|
||||
'discount_rate': 0
|
||||
}
|
||||
|
||||
# get min_order_qty from item
|
||||
@ -170,6 +170,14 @@ class DocType(TransactionBase):
|
||||
'import_rate': 0,
|
||||
})
|
||||
|
||||
if obj.doc.doctype == 'Purchase Order':
|
||||
supplier_part_no = webnotes.conn.sql("""\
|
||||
select supplier_part_no from `tabItem Supplier`
|
||||
where parent = %s and parenttype = 'Item' and
|
||||
supplier = %s""", (arg['item_code'], obj.doc.supplier))
|
||||
if supplier_part_no and supplier_part_no[0][0]:
|
||||
ret['supplier_part_no'] = supplier_part_no[0][0]
|
||||
|
||||
return ret
|
||||
|
||||
# Get Available Qty at Warehouse
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-27 14:35:50',
|
||||
'creation': '2012-05-15 12:14:38',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-27 14:35:50',
|
||||
'modified': '2012-06-29 13:05:33',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -22,7 +22,7 @@
|
||||
'section_style': u'Tray',
|
||||
'server_code_error': u' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 65
|
||||
'version': 1
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -74,6 +74,19 @@
|
||||
'trigger': u'Client'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'description': u'If Supplier Part Number exists for given Item, it gets stored here',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'supplier_part_no',
|
||||
'fieldtype': u'Data',
|
||||
'hidden': 1,
|
||||
'label': u'Supplier Part Number',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
@ -453,4 +466,4 @@
|
||||
'permlevel': 0,
|
||||
'print_hide': 1
|
||||
}
|
||||
]
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user