fetch price list rates when creating quotation from opportunity
This commit is contained in:
parent
05cbf96e84
commit
2939a0ea65
@ -50,10 +50,9 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
}
|
||||
}
|
||||
cur_frm.cscript.make_communication_body();
|
||||
|
||||
}
|
||||
|
||||
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
|
||||
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
|
||||
var callback = function(doc, dt, dn) {
|
||||
// defined in sales_common.js
|
||||
cur_frm.cscript.update_item_details(doc, dt, dn);
|
||||
|
@ -81,12 +81,19 @@ class DocType(TransactionBase):
|
||||
obj = get_obj('Sales Common')
|
||||
for doc in self.doclist:
|
||||
if doc.fields.get('item_code'):
|
||||
arg = {'item_code':doc.fields.get('item_code'), 'income_account':doc.fields.get('income_account'),
|
||||
'cost_center': doc.fields.get('cost_center'), 'warehouse': doc.fields.get('warehouse')};
|
||||
ret = obj.get_item_defaults(arg)
|
||||
for r in ret:
|
||||
if not doc.fields.get(r):
|
||||
doc.fields[r] = ret[r]
|
||||
arg = {
|
||||
'item_code': doc.fields.get('item_code'),
|
||||
'income_account': doc.fields.get('income_account'),
|
||||
'cost_center': doc.fields.get('cost_center'),
|
||||
'warehouse': doc.fields.get('warehouse')
|
||||
}
|
||||
fields_dict = obj.get_item_details(arg, self)
|
||||
if fields_dict:
|
||||
doc.fields.update(fields_dict)
|
||||
#ret = obj.get_item_defaults(arg)
|
||||
#for r in ret:
|
||||
# if not doc.fields.get(r):
|
||||
# doc.fields[r] = ret[r]
|
||||
|
||||
|
||||
# Re-calculates Basic Rate & amount based on Price List Selected
|
||||
|
Loading…
Reference in New Issue
Block a user