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

This commit is contained in:
Anand Doshi 2012-09-06 17:51:05 +05:30
commit e67bcc38b4
2 changed files with 5 additions and 11 deletions

View File

@ -62,7 +62,6 @@ cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
// fetch // fetch
// =============================================================== // ===============================================================
cur_frm.cscript.set_fetch = function() { cur_frm.cscript.set_fetch = function() {
// item // item
cur_frm.add_fetch('item_code', 'item_name', 'item_name'); cur_frm.add_fetch('item_code', 'item_name', 'item_name');
cur_frm.add_fetch('item_code', 'stock_uom', 'uom'); cur_frm.add_fetch('item_code', 'stock_uom', 'uom');
@ -71,7 +70,6 @@ cur_frm.cscript.set_fetch = function() {
cur_frm.add_fetch('item_code', 'brand', 'brand'); cur_frm.add_fetch('item_code', 'brand', 'brand');
// customer // customer
} }
// hide - unhide fields on basis of enquiry_from lead or customer // hide - unhide fields on basis of enquiry_from lead or customer

View File

@ -88,14 +88,10 @@ class DocType(TransactionBase):
'cost_center': doc.fields.get('cost_center'), 'cost_center': doc.fields.get('cost_center'),
'warehouse': doc.fields.get('warehouse') 'warehouse': doc.fields.get('warehouse')
} }
fields_dict = obj.get_item_details(arg, self) res = obj.get_item_details(arg, self) or {}
if fields_dict: for r in res:
doc.fields.update(fields_dict) if not doc.fields.get(r):
#ret = obj.get_item_defaults(arg) doc.fields[r] = res[r]
#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 # Re-calculates Basic Rate & amount based on Price List Selected
# -------------------------------------------------------------- # --------------------------------------------------------------