Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/7.0-opw-585061-msh into
lp:openobject-addons/7.0.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-opw-585061-msh/+merge/146632
Hello,
Fixed the issue of journal code, here it will throw traceback when there is not
parent account defined account.account.
To reproduce this, go to account.account view and remove parent_id field data
for all account which has internal_type = 'liquidity', now try to setup bank
account through Accounting -> Configuration -> Accounts -> Setup Your Bank
Accounts and create the record, you will face traceback.
Reason:- Traceback is faced from method post_write of account_bank.py of bank
object, here we have retrived code of parent_id, but it is not necessary that
parent_id always be there because it is not mandatory field, so parent_id.code
will return None and Nonetype does not have method ljust.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-opw-585061-msh/+merge/146632
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/7.0-opw-585061-msh.
=== modified file 'account/account_bank.py'
--- account/account_bank.py 2013-01-31 13:30:11 +0000
+++ account/account_bank.py 2013-02-05 14:00:35 +0000
@@ -71,8 +71,9 @@
ref_acc_bank_temp = obj_acc.browse(cr, uid, ids[0], context=context)
ref_acc_bank = ref_acc_bank_temp.parent_id
+ ref_acc_bank_code = ref_acc_bank.code or ref_acc_bank_temp.code
while True:
- new_code = str(ref_acc_bank.code.ljust(dig-len(str(current_num)), '0')) + str(current_num)
+ new_code = str(ref_acc_bank_code.ljust(dig-len(str(current_num)), '0')) + str(current_num)
ids = obj_acc.search(cr, uid, [('code', '=', new_code), ('company_id', '=', bank.company_id.id)])
if not ids:
break
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp