Error duplicating partner with module base_iban

Bug #323238 reported by Jordi Esteve (www.zikzakmedia.com)
2
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Stephane Wirtel (OpenERP)

Bug Description

When module base_iban is installed, an error occurs when a partner with a bank account (type bank account and IBAN field is empty) is duplicated:

  File "/home/zikzak/tinyerp/lp-openerp/server/bin/addons/base_iban/base_iban.py", line 43, in create
     vals['iban'] = _format_iban(vals['iban'])
  File "/home/zikzak/tinyerp/lp-openerp/server/bin/addons/base_iban/base_iban.py", line 31, in _format_iban
     for char in string:
  TypeError: 'bool' object is not iterable

It could be fixed changing base_iban/base_iban.py file as follow:

41c41
< if vals.has_key('iban') and vals['iban']:
---
> if vals.has_key('iban'):

Changed in openobject-addons:
assignee: nobody → stephane-openerp
status: New → In Progress
Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Please, Can you check with the lastest version of server and addons ?

Changed in openobject-addons:
status: In Progress → Invalid
Revision history for this message
Jordi Esteve (www.zikzakmedia.com) (jesteve-zikzakmedia) wrote :

Yes, I have tested in last version of server and addons in a fresh installation.

Important, when you create the bank account of the partner: Type=bank account and IBAN field empty. If the you duplicate this partner the error happens.

Changed in openobject-addons:
status: Invalid → Confirmed
Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Can you give me your list of addons ? because I can't reproduce this bug :|

Are you sure about your fix ?

Revision history for this message
Jordi Esteve (www.zikzakmedia.com) (jesteve-zikzakmedia) wrote :

My list of addons is:

base
base_setup
base_iban
account
base_vat
process
product

I also reproduce the same error with an "Only account profile" installation. Sure, my fix repairs the problem, I have tested it in two installations.

But base_iban module only depends of base, so you could reproduce the same error installing only three modules:

base
base_setup
base_iban

But I have just tested this combination and I have discover other bug: If you install only the previous three modules, open the partner form gives an error because base_iban module don't find "acc_number" field in the partner form view defined in base module. The message is:

Couldn't find tag '<field name="acc_number">' in parent view

This field is added in the partner form view by account module, so to fix this problem:
* The "account" module dependence is added to base_iban
* or "acc_number" field is added in the partner form view defined in base module

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Question, can you check your source, I fixed this bug about the acc_number this morning.

Thanks

Revision history for this message
Jordi Esteve (www.zikzakmedia.com) (jesteve-zikzakmedia) wrote :

Yes, I have just update my source and the acc_number field problem (account dependence of base_iban) is solved.

But the bug when a partner with a bank account (type="bank account" and IBAN field is empty) is duplicated still remains.

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Fixed in trunk,

But your patch was wrong. If you use the bazaar repository, you can use bzr diff to get the diff between your local repository and your changes.

Regards,

Changed in openobject-addons:
milestone: none → 5.0
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.