Add issue5467-b2ck.diff -- Strange worker behaviour

It seems that the worker is not properly handling scheduled tasks so
we disable adding sale/purchase process() calls to the queue when
they're executed from shipments.
This commit is contained in:
Albert Cervera i Areny 2020-03-06 13:28:01 +01:00
parent b6f8dfd811
commit 8fbd4de3e7
2 changed files with 25 additions and 0 deletions

22
issue5467-b2ck.diff Normal file
View file

@ -0,0 +1,22 @@
--- a/trytond/trytond/modules/sale/stock.py
+++ b/trytond/trytond/modules/sale/stock.py
@@ -22,7 +22,7 @@ def process_sale(moves_field):
for m in getattr(s, moves_field) if m.sale)
func(cls, shipments)
if sales:
- Sale.__queue__.process(sales)
+ Sale.process(sales)
return wrapper
return _process_sale
--- a/trytond/trytond/modules/purchase/stock.py
+++ b/trytond/trytond/modules/purchase/stock.py
@@ -27,7 +27,7 @@ def process_purchase(moves_field):
for m in getattr(s, moves_field) if m.purchase)
func(cls, shipments)
if purchases:
- Purchase.__queue__.process(purchases)
+ Purchase.process(purchases)
return wrapper
return _process_purchase

3
series
View file

@ -49,3 +49,6 @@ issue9017.diff # [purchase] Doesn't copy product_suppliers when a template or a
model.diff # [trytond] Allows dynamic fields in Model as required by the wizard in sale_pos_template_quantities
issue9103.diff # [trytond] User-defined reports for custom template extensions
issue5467-b2ck.diff # [sale] [purchase] Strange worker behaviour
https://bugs.b2ck.com/issue5467