Commit 7e950377 by François C.

Fix get_list_orders, if r['purchase_id'] is False

parent b2704620
Pipeline #2605 failed with stage
in 1 minute 48 seconds
...@@ -32,7 +32,8 @@ class CagetteReception(models.Model): ...@@ -32,7 +32,8 @@ class CagetteReception(models.Model):
pids = [] pids = []
if res and len(res) > 0: if res and len(res) > 0:
for r in res: for r in res:
pids.append(int(r['purchase_id'][0])) if r['purchase_id']: # May be False
pids.append(int(r['purchase_id'][0]))
if len(pids): if len(pids):
f=["id","name","date_order", "partner_id", "date_planned", "amount_untaxed", "amount_total", "x_reception_status", 'create_uid'] f=["id","name","date_order", "partner_id", "date_planned", "amount_untaxed", "amount_total", "x_reception_status", 'create_uid']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment