Commit 07631ea4 by Damien Moulard

sales: fix limited number of export lines

parent de580bd6
Pipeline #2910 failed with stage
in 1 minute 5 seconds
......@@ -17,7 +17,8 @@ class CagetteSales(models.Model):
# Get pos orders
cond = [['date_order', '>=', date_from], ['date_order', '<=', date_to]]
fields = ['partner_id', 'statement_ids', 'name']
orders = self.o_api.search_read('pos.order', cond, fields)
orders = self.o_api.search_read('pos.order', cond, fields, limit=50000)
# Get bank statements of these sessions
statements = []
statements_partners = {}
......@@ -25,8 +26,13 @@ class CagetteSales(models.Model):
for o in orders:
statements = statements + o["statement_ids"]
for s in o["statement_ids"]:
if o["partner_id"] is False:
statements_partners[s] = "Membre non renseigné"
else:
statements_partners[s] = o["partner_id"][1]
statements_orders[s] = o["name"]
# Get payment lines
cond = [['id', 'in', statements]]
fields = ["amount", "journal_id", "create_date", "meal_voucher_issuer"]
......
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