c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #20251
[Bug 671748] Re: [6rc1][server] key error 'price accuracy'
i also got the same error
while installing the module purchase_indent module in v6 on Ubuntu 10.04
Please guide me what to do?
[28/Mar/2011:15:32:37] HTTP Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py", line 606, in respond
cherrypy.response.body = self.handler()
File "/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cpdispatch.py", line 25, in __call__
return self.callable(*self.args, **self.kwargs)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/openobject/tools/_expose.py", line 182, in func_wrapper
res = func(*args, **kw)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/openobject/controllers/_root.py", line 87, in default
return request.handler()
File "/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cpdispatch.py", line 25, in __call__
return self.callable(*self.args, **self.kwargs)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/addons/openerp/controllers/utils.py", line 112, in wrapper
return fn(*args, **kw)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/openobject/tools/_expose.py", line 182, in func_wrapper
res = func(*args, **kw)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/openobject/tools/_validate.py", line 88, in func_wrapper
return func(*args, **kw)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/openobject/tools/_validate.py", line 105, in func_wrapper
return func(*args, **kw)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/addons/openerp/controllers/form.py", line 419, in save
res = self.button_action(params)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/addons/openerp/controllers/form.py", line 559, in button_action
return self.BUTTON_ACTIONS_BY_BTYPE[btype](self, button_name, params)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/addons/openerp/controllers/form.py", line 505, in button_action_object
res = rpc.session.execute('object', 'execute', model, name, ids, ctx)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/addons/openerp/utils/rpc.py", line 357, in execute
return self.gateway.execute(obj, method, *args)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/addons/openerp/utils/rpc.py", line 147, in execute
return self.__execute(obj, method, args)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/addons/openerp/utils/rpc.py", line 133, in __execute
common.error(_('Application Error'), err.backtrace)
File "/home/ptsadmin/openerp6.0.1/openerp-web-6.0.1/addons/openerp/utils/common.py", line 66, in error
raise TinyError(message=msg, title=title or _("Error"))
TinyError: Traceback (most recent call last):
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/addons/base/module/wizard/base_module_upgrade.py", line 98, in upgrade_module
_db, pool = pooler.restart_pool(cr.dbname, update_module=True)
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/pooler.py", line 60, in restart_pool
return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/pooler.py", line 39, in get_db_and_pool
addons.load_modules(db, force_demo, status, update_module)
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/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/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/addons/__init__.py", line 716, in load_module_graph
register_class(package.name)
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/addons/__init__.py", line 450, in register_class
imp.load_module(m, *fm)
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/addons/partner_product/__init__.py", line 2, in <module>
import wiki
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/addons/partner_product/wiki.py", line 37, in <module>
class tmp_product_product(osv.osv):
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/addons/partner_product/wiki.py", line 43, in tmp_product_product
'cost_price': fields.float("Cost Price",required=True,digits=(16, int(config['price_accuracy']))),
File "/home/ptsadmin/openerp6.0.1/openerp-server-6.0.1/bin/tools/config.py", line 497, 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