← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 671748] Re: [6rc1][server] key error 'price accuracy'

 

The traceback clearly suggests me that the 'Account' module is from Stable(5.0.x).
Thanks.

-- 
[6rc1][server] key error 'price accuracy'
https://bugs.launchpad.net/bugs/671748
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Server: Invalid

Bug description:
When I try to update the modules after a server upgrade, I get the following error:
(/usr/local/bin/openerp-server -d demo6 -u all)

[2010-11-06 14:50:44,323][demo6] CRITICAL:init:price_accuracy
Traceback (most recent call last):
  File "./openerp-server.py", line 121, in <module>
    db,pool = pooler.get_db_and_pool(dbname, update_module=tools.config['init'] or tools.config['update'], pooljobs=False)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server_9920/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server_9920/addons/__init__.py", line 853, in load_modules
    r = load_module_graph(cr, graph, status, report=report)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server_9920/addons/__init__.py", line 698, in load_module_graph
    register_class(package.name)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server_9920/addons/__init__.py", line 441, in register_class
    imp.load_module(m, *fm)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server_9920/addons/account/__init__.py", line 26, in <module>
    import invoice
  File "/usr/local/lib/python2.6/dist-packages/openerp-server_9920/addons/account/invoice.py", line 45, in <module>
    class account_invoice(osv.osv):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server_9920/addons/account/invoice.py", line 273, in account_invoice
    'amount_untaxed': fields.function(_amount_all, method=True, digits=(16, int(config['price_accuracy'])),string='Untaxed',
  File "/usr/local/lib/python2.6/dist-packages/openerp-server_9920/tools/config.py", line 475, in __getitem__
    return self.options[key]
KeyError: 'price_accuracy'

I added 
            'price_accuracy': 2,
in the config.py file
        self.options = {





Follow ups

References