Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
third-party
Commits
07631ea4
Commit
07631ea4
authored
Aug 23, 2023
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sales: fix limited number of export lines
parent
de580bd6
Pipeline
#2910
failed with stage
in 1 minute 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
models.py
sales/models.py
+8
-2
No files found.
sales/models.py
View file @
07631ea4
...
@@ -17,7 +17,8 @@ class CagetteSales(models.Model):
...
@@ -17,7 +17,8 @@ class CagetteSales(models.Model):
# Get pos orders
# Get pos orders
cond
=
[[
'date_order'
,
'>='
,
date_from
],
[
'date_order'
,
'<='
,
date_to
]]
cond
=
[[
'date_order'
,
'>='
,
date_from
],
[
'date_order'
,
'<='
,
date_to
]]
fields
=
[
'partner_id'
,
'statement_ids'
,
'name'
]
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
# Get bank statements of these sessions
statements
=
[]
statements
=
[]
statements_partners
=
{}
statements_partners
=
{}
...
@@ -25,8 +26,13 @@ class CagetteSales(models.Model):
...
@@ -25,8 +26,13 @@ class CagetteSales(models.Model):
for
o
in
orders
:
for
o
in
orders
:
statements
=
statements
+
o
[
"statement_ids"
]
statements
=
statements
+
o
[
"statement_ids"
]
for
s
in
o
[
"statement_ids"
]:
for
s
in
o
[
"statement_ids"
]:
statements_partners
[
s
]
=
o
[
"partner_id"
][
1
]
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"
]
statements_orders
[
s
]
=
o
[
"name"
]
# Get payment lines
# Get payment lines
cond
=
[[
'id'
,
'in'
,
statements
]]
cond
=
[[
'id'
,
'in'
,
statements
]]
fields
=
[
"amount"
,
"journal_id"
,
"create_date"
,
"meal_voucher_issuer"
]
fields
=
[
"amount"
,
"journal_id"
,
"create_date"
,
"meal_voucher_issuer"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment