COA Creation wizard hangs up

Bug #923884 reported by Gustavo Adrian Marino
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

In v6.1 trunk, when you try to create a COA based on a template, using a locale that translates then name the name of the bank journal to something with len >= 5 (the len of the field code in the journal) (e.g. in spanish from 'BNK' to 'BANCO'), the wizards hangs due to the unbounded loops used to find the next free name (it will be blocked in an endless loop, freezing the client UI)

See :
=== modified file 'account/account.py'
--- account/account.py 2012-01-27 16:04:31 +0000
+++ account/account.py 2012-01-30 17:42:15 +0000
@@ -3346,7 +3350,10 @@
         # and the next number for account code might have been already used before for journal
         journal_count = 0
         while True:
- journal_code = _('BNK') + str(current_num + journal_count)
+ #NUMA
+ #journal_code = _('BNK') + str(current_num + journal_count)
+ journal_code = _('BNK')[:4] + str(current_num + journal_count)
+
             ids = obj_journal.search(cr, uid, [('code', '=', journal_code), ('company_id', '=', company_id)], context=context)
             if not ids:
                 break

Related branches

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
DJ Patel (OpenERP) (mdi-openerp) wrote :

Hello Gustavo Adrian Marino,

Thanks for reporting and contribution. The solution for this bug is proposed in the branch : https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-923884-mdi/

with following Revision ID and Number.

Revision ID : <email address hidden>
Revision Number : 6468

Thanks and Regards,

Divyesh Makwana(MDI)

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Raphael Collet (OpenERP) (rco-openerp) wrote :

merged in trunk
revno: 6474 [merge]
revision-id: <email address hidden>

Revision history for this message
Thibault Delavallée (OpenERP) (tde-openerp) wrote :

Merged into lp:openobject-addons at revision 6474.

Changed in openobject-addons:
status: Fix Committed → 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.