← Back to team overview

c2c-oerpscenario team mailing list archive

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

 

I got the same error trying to install the product_variant_multi module
in V6.0.1 on Ubuntu 10.10.

Are we talking about the same issue or is the product_variant_multi
module not compatible with V.6.0.1?

The error message is as the following:

------------
Reinstall the system with Ubuntu 10.10 and OpenERP 6.0.1. 

Same error but somewhat different error message. See below.

What might be different in my system environment that is keep trigger
the "price_accuracy" error?

-----------------------------------

Environment Information : 
System : Linux-2.6.35-24-generic-i686-with-Ubuntu-10.10-maverick
OS Name : posix
Distributor ID:	Ubuntu
Description:	Ubuntu 10.10
Release:	10.10
Codename:	maverick
Operating System Release : 2.6.35-24-generic
Operating System Version : #42-Ubuntu SMP Thu Dec 2 01:41:57 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.6
OpenERP-Client Version : 6.0.1
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/share/pyshared/openerp-server/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/share/pyshared/openerp-server/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/share/pyshared/openerp-server/addons/base/module/wizard/base_module_upgrade.py", line 98, in upgrade_module
    _db, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/usr/share/pyshared/openerp-server/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/usr/share/pyshared/openerp-server/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/usr/share/pyshared/openerp-server/addons/__init__.py", line 883, in load_modules
    processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
  File "/usr/share/pyshared/openerp-server/addons/__init__.py", line 716, in load_module_graph
    register_class(package.name)
  File "/usr/share/pyshared/openerp-server/addons/__init__.py", line 450, in register_class
    imp.load_module(m, *fm)
  File "/usr/share/pyshared/openerp-server/addons/product_variant_multi/__init__.py", line 23, in <module>
    import product_variant
  File "/usr/share/pyshared/openerp-server/addons/product_variant_multi/product_variant.py", line 53, in <module>
    class product_variant_dimension_value(osv.osv):
  File "/usr/share/pyshared/openerp-server/addons/product_variant_multi/product_variant.py", line 67, in product_variant_dimension_value
    'price_extra' : fields.float('Price Extra', digits=(16, int(config['price_accuracy']))),
  File "/usr/share/pyshared/openerp-server/tools/config.py", line 495, in __getitem__
    return self.options[key]
KeyError: 'price_accuracy'

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/671748

Title:
  [6rc1][server] key error 'price accuracy'

Status in OpenERP 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