Connectors mailing list archives
connectors@odoo-community.org
Browse archives
Could not serialize access due to concurrent update during stock pickings
by
michael
We have another issue with the Automatic Workflow, we have around 10000 open stock pickings that are on status Available and are not processed. We now found an error in the log file: 2016-03-11 11:01:11,790 31277 ERROR odoo-production openerp.sql_db: bad query: UPDATE "stock_picking" SET "recompute_pack_op"=true,"write_uid"=1,"write_date"=(now() at time zone 'UTC') WHERE id IN (10812, 10813, 10814, 10815, 10816, 10817, 10818, 10819, 10820, 10821, 10822, 10823, 10824, 10825, 10826, 10827, 10828, 10829, 10830, 10831, 10832, 10833, 10834, 10835, 10836, 10837, 10838, 10839, 10840, 10841, 10842, 10843, 10844, 10845, 10846, 10847, 10848, 10849, 10850, 10851, 10852, 10853, 10854, 10855, 10856, 10857, 10858, 10859, 10860, 10861, 10862, 10863, 10864, 10865, 10866, 10867, 10868, 10869, 10870, 10871, 10872, 10873, 10874, 10875, 10876, 10877, 10878, 10879, 10880, 10881, 10882, 10883, 10884, 10885, 10886, 10887, 10888, 10889, 10890, 10891, 10892, 10893, 10894, 10895, 10896, 10897, 10898, 10899, 10900, 10901, 10902, 10903, 10904, 10905, 10906, 10907, 10908, 10909, 10910, 10911, 10912, 10913, 10914, 10915, 10916, 10917, 10918, 10919, 10920, 10921, 10922, 10923, 10924, 10925, 10926, 10927, 10928, 10929, 10930, 10931, 10932, 10933, 10934, 10935, 10936, 10937, 10938, 10939, 10940, 10941, 10942, 10943, 10944, 10945, 10946, 10947, 10948, 10949, 10950, 10951, 10952, 10953, 10954, 10955, 10956, 10957, 10958, 10959, 10960, 10961, 10962, 10963, 10964, 10965, 10966, 10967, 10968, 10969, 10970, 10971, 10972, 10973, 10974, 10975, 10976, 10977, 10978, 10979, 10980, 10981, 10982, 10983, 10984, 10985, 10986, 10987, 10988, 10989, 10990, 10991, 10992, 10993, 10994, 10995, 10996, 10997, 10998, 10999, 11000, 11001, 11002, 11003, 11004, 11005, 11006, 11007, 11008, 11009, 11010, 11011, 11012, 11013, 11014, 11015, 11016, 11017, 11018, 11019, 11020, 11021, 11022, 11023, 11024, 11025, 11026, 11027, 11028, 11029, 11030, 11031, 11032, 11033, 11034, 11035, 11036, 11037, 11038, 11039, 11040, 11041, 11042, 11044, 11045, 11046, 11047, 11048, 11049, 11050, 11051, 11052, 11053, 11054, 11055, 11056, 11057, 11058, 11059, 11060, 11061, 11062, 11072, 11073, 11074, 11075, 11076, 11077) Traceback (most recent call last): 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 2016-03-11 11:01:11,791 31277 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 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 Do you guys have an idea on how to solve that? Thanks, Michael