Connectors mailing list archives

connectors@odoo-community.org

Avatar

Re: Force Automatic Workflo

by
michael
- 10/03/2016 19:07:40
Ok, I guess I found an issue with the Automatic Workflow in the log files:

"2016-03-10 18:05:24,231 17177 ERROR odoo-production openerp.addons.sale_automatic_workflow.automatic_workflow_job: Error during an automatic workflow action.
Traceback (most recent call last):
  File "/opt/odoo/addons/e-commerce/sale_automatic_workflow/automatic_workflow_job.py", line 63, in commit
    yield
  File "/opt/odoo/addons/e-commerce/sale_automatic_workflow/automatic_workflow_job.py", line 113, in _validate_pickings
    pickings.validate_picking()
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/addons/e-commerce/sale_automatic_workflow/stock_picking.py", line 43, in validate_picking
    self.force_assign()
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 565, in new_api
    result = method(self._model, cr, uid, self.ids, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/stock/stock.py", line 915, in force_assign
    self.write(cr, uid, ids, {'recompute_pack_op': True}, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 372, in old_api
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/addons/connector-ecommerce/connector_ecommerce/stock.py", line 39, in write
    res = super(StockPicking, self).write(vals)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 565, in new_api
    result = method(self._model, cr, uid, self.ids, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/stock/stock.py", line 958, in write
    res = super(stock_picking, self).write(cr, uid, ids, vals, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/addons/mail/mail_thread.py", line 432, in write
    result = super(mail_thread, self).write(cr, uid, ids, values, context=context)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 372, in old_api
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/addons/connector/connector/producer.py", line 62, in write
    result = write_original(self, vals)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 3787, in write
    self._write(old_vals)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 565, in new_api
    result = method(self._model, cr, uid, self.ids, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4039, in _write
    recs.recompute()
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 5732, in recompute
    rec._write(values)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper
    return new_api(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 565, in new_api
    result = method(self._model, cr, uid, self.ids, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 3898, in _write
    cr.execute(query, params + (sub_ids,))
  File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 158, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 234, in execute
    res = self._obj.execute(query, params)
TransactionRollbackError: could not serialize access due to concurrent update”

Any Ides on why the automator could run into a concurrent update?? I guess that’s the problem why my transactions are not completed.

Thanks,
Michael

> On Mar 10, 2016, at 6:57 PM, Michael Aigner <michael@stilnest.com> wrote:
> 
> hi,
> 
> i have around 10000 open orders and stock pickings that are on status available. how can i mass process them? i guess the problem was that “Confirm and Close Picking” was not activated in the Automatic Workflow, which I changed now. Is there a way to batch process all of them?
> 
> thanks,
> michael

Reference