fixed issue

This commit is contained in:
Nabin Hait 2012-05-15 12:15:19 +05:30
parent a13b435163
commit ed02a85184
3 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@ class DocType(TransactionBase):
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, self)
ret = obj.get_item_defaults(arg)
for r in ret:
if not doc.fields.get(r):
doc.fields[r] = ret[r]

View File

@ -100,7 +100,7 @@ class DocType(TransactionBase):
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, self)
ret = obj.get_item_defaults(arg)
for r in ret:
if not doc.fields.get(r):
doc.fields[r] = ret[r]

View File

@ -117,7 +117,7 @@ class DocType(TransactionBase):
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, self)
ret = obj.get_item_defaults(arg)
for r in ret:
if not doc.fields.get(r):
doc.fields[r] = ret[r]