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

@ -18,7 +18,7 @@ wn.require('erpnext/utilities/doctype/sms_control/sms_control.js');
wn.require('erpnext/support/doctype/communication/communication.js');
cur_frm.cscript.refresh = function(doc, cdt, cdn){
erpnext.hide_naming_series();
erpnext.hide_naming_series();
cur_frm.clear_custom_buttons();
if(doc.docstatus == 1) {
@ -62,7 +62,6 @@ cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
// fetch
// ===============================================================
cur_frm.cscript.set_fetch = function() {
// item
cur_frm.add_fetch('item_code', 'item_name', 'item_name');
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');
// 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'),
'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]
res = obj.get_item_details(arg, self) or {}
for r in res:
if not doc.fields.get(r):
doc.fields[r] = res[r]
# Re-calculates Basic Rate & amount based on Price List Selected
# --------------------------------------------------------------