Impossible to create tax of type 'balance' through chart of accounts

Bug #789658 reported by Lorenzo Battistini
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Status tracked in Trunk
6.0
Fix Released
Low
Unassigned
Trunk
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

If you wanted to create a chart of accounts module that would create some 'account.tax' of type 'balance', you can't because 'account.tax.template' doesn't have 'balance' as possible value of 'type': http://bazaar.launchpad.net/~openerp/openobject-addons/6.0/view/4610/account/account.py#L2456
while 'account.tax' has it: http://bazaar.launchpad.net/~openerp/openobject-addons/6.0/view/4610/account/account.py#L1685

So, while installing such a module (try this if needed: http://bazaar.launchpad.net/~openobject-italia-core-devs/openobject-italia/l10n_it_fix_partially_deductible_vat/files/4610/l10n_it/ ), you'll get

[2011-05-28 21:21:30,955][test] INFO:init:module l10n_it: loading data/account.tax.template.csv
[2011-05-28 21:21:31,242][test] WARNING:import:key 'balance' not found in selection field 'type'
[2011-05-28 21:21:31,256][test] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/home/elbati/workspace/openerp/openerp6/server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/elbati/workspace/openerp/openerp6/server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/elbati/workspace/openerp/openerp6/server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/elbati/workspace/openerp/openerp6/server/bin/addons/base/res/res_config.py", line 167, in action_next
    next = self.execute(cr, uid, ids, context=None)
  File "/home/elbati/workspace/openerp/openerp6/server/bin/addons/account/installer.py", line 571, in execute
    super(account_installer, self).execute(cr, uid, ids, context=context)
  File "/home/elbati/workspace/openerp/openerp6/server/bin/addons/base/res/res_config.py", line 397, in execute
    new_db, self.pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/home/elbati/workspace/openerp/openerp6/server/bin/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/home/elbati/workspace/openerp/openerp6/server/bin/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/home/elbati/workspace/openerp/openerp6/server/bin/addons/__init__.py", line 883, in load_modules
    processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
  File "/home/elbati/workspace/openerp/openerp6/server/bin/addons/__init__.py", line 748, in load_module_graph
    load_init_update_xml(cr, m, idref, mode, kind)
  File "/home/elbati/workspace/openerp/openerp6/server/bin/addons/__init__.py", line 635, in load_init_update_xml
    tools.convert_csv_import(cr, m, os.path.basename(filename), fp.read(), idref, mode=mode, noupdate=noupdate)
  File "/home/elbati/workspace/openerp/openerp6/server/bin/tools/convert.py", line 950, in convert_csv_import
    raise Exception(_('Module loading failed: file %s/%s could not be processed:\n %s') % (module, fname, warning_msg))
Exception: Module loading failed: file l10n_it/account.tax.template.csv could not be processed:
 Line 6 : Key/value 'balance' not found in selection field 'type'

Related branches

Amit Parik (amit-parik)
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
Ujjvala Collins (uco-openerp) wrote :

Hello Lorenzo Battistini,

I have fixed the problem of type field on tax template object. It has been committed on lp:~openerp-dev/openobject-addons/trunk-bug-789658-uco with revision 4772 <email address hidden>. Soon it will be merged into main trunk addons.

Thank you.

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
milestone: none → 6.1
tfr (Openerp) (tfr)
Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello,

The issue has been fixed by revision 4721 <email address hidden> in stable v6.

Thanks.

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.