Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Concurrency error in OODO 8.0 unstable build

By
camp
on 3/19/15, 7:46 AM 574 views

We developed a sales portal application based on the version openerp-8.0dev-20140312-000101 and concurrency is an essential basic requirement. But we find that the basic invoicing module itself throws an error (referred down after this question) when we attempt a stress test with more than One User. (Only One user invoice posting is succesful and the other 2 throw an error). So does the extended invoicing module we have written. Is there any way out? I tried updating the following files with same content as in stable 8.0 build:

1. sql_db.py

2. model.py

Am I missing some thing here? Anyway I can avoid a complete code migration to 8.0 ?

The error is as follows:

 

Here is the error msg

2015-02-25 05:30:58,508 6603 ERROR sales_feb_12_15 openerp.netsvc: "could not serialize access due to concurrent update

" while evaluating

u'action_move_create()'

Traceback (most recent call last):

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/netsvc.py", line 236, in dispatch_rpc

result = dispatch(method, params)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/service/model.py", line 37, in dispatch

res = fn(db, uid, *params)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/service/model.py", line 113, in wrapper

return f(dbname, *args, **kwargs)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/service/model.py", line 194, in exec_workflow

return exec_workflow_cr(cr, uid, obj, signal, *args)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/service/model.py", line 188, in exec_workflow_cr

return execute_cr(cr, uid, obj, 'signal_workflow', [res_id], signal)[res_id]

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/service/model.py", line 159, in execute_cr

return getattr(object, method)(cr, uid, *args, **kw)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/osv/orm.py", line 3620, in signal_workflow

result[res_id] = workflow.trg_validate(uid, self._name, res_id, signal, cr)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/workflow/__init__.py", line 85, in trg_validate

return WorkflowService.new(cr, uid, res_type, res_id).validate(signal)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/workflow/service.py", line 91, in validate

res2 = wi.validate(signal)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/workflow/instance.py", line 75, in validate

wi.process(signal=signal, force_running=force_running, stack=stack)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/workflow/workitem.py", line 121, in process

ok = self._split_test(activity['split_mode'], signal, stack)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/workflow/workitem.py", line 249, in _split_test

self._join_test(t[0], t[1], stack)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/workflow/workitem.py", line 258, in _join_test

WorkflowItem.create(self.session, self.record, activity, inst_id, stack=stack)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/workflow/workitem.py", line 96, in create

workflow_item.process(stack=stack)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/workflow/workitem.py", line 117, in process

if not self._execute(activity, stack):

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/workflow/workitem.py", line 163, in _execute

returned_action = self.wkf_expr_execute(activity)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/workflow/workitem.py", line 314, in wkf_expr_execute

return self.wkf_expr_eval_expr(activity['action'])

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/workflow/workitem.py", line 292, in wkf_expr_eval_expr

result = eval(line, env, nocopy=True)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/tools/safe_eval.py", line 255, in safe_eval

return eval(c, globals_dict, locals_dict)

File "", line 1, in <module>

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/osv/orm.py", line 378, in function_proxy

return attr(self._cr, self._uid, [self._id], *args, **kwargs)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/addons/sales_org_portal/invoice.py", line 2156, in action_move_create

move_obj.post(cr, uid, [move_id], context=ctx)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/addons/account/account.py", line 1339, in post

new_name = obj_sequence.next_by_id(cr, uid, journal.sequence_id.id, c)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/addons/base/ir/ir_sequence.py", line 267, in next_by_id

return self._next(cr, uid, ids, context)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/addons/account/ir_sequence.py", line 56, in _next

return super(ir_sequence, self)._next(cr, uid, seq_ids, context)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/addons/base/ir/ir_sequence.py", line 252, in _next

cr.execute("SELECT number_next FROM ir_sequence WHERE id=%s FOR UPDATE NOWAIT", (seq['id'],))

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/sql_db.py", line 156, in wrapper

return f(self, *args, **kwargs)

File "/home/athulya/anoop/sales/openerp-8.0dev-20140312-000101/openerp/sql_db.py", line 221, in execute

res = self._obj.execute(query, params)

ValueError: "could not serialize access due to concurrent update

" while evaluating

u'action_move_create()'

Thanks in advance. regards

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/19/15, 7:46 AM
Seen: 574 times
Last updated: 3/19/15, 7:46 AM