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
8ac58d10
Commit
8ac58d10
authored
Sep 24, 2024
by
Yvon Kerdoncuff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
product_template.state becomes product_template.active
parent
4b8c7505
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
models.py
products/models.py
+3
-5
No files found.
products/models.py
View file @
8ac58d10
...
@@ -651,7 +651,7 @@ class CagetteProducts(models.Model):
...
@@ -651,7 +651,7 @@ class CagetteProducts(models.Model):
# Get products templates
# Get products templates
f
=
[
f
=
[
"id"
,
"id"
,
"
stat
e"
,
"
activ
e"
,
"name"
,
"name"
,
"default_code"
,
"default_code"
,
"qty_available"
,
"qty_available"
,
...
@@ -666,10 +666,8 @@ class CagetteProducts(models.Model):
...
@@ -666,10 +666,8 @@ class CagetteProducts(models.Model):
c
=
[[
'id'
,
'in'
,
ptids
],
[
'purchase_ok'
,
'='
,
True
],
[
'active'
,
'='
,
True
]]
c
=
[[
'id'
,
'in'
,
ptids
],
[
'purchase_ok'
,
'='
,
True
],
[
'active'
,
'='
,
True
]]
products_t
=
api
.
search_read
(
'product.template'
,
c
,
f
)
products_t
=
api
.
search_read
(
'product.template'
,
c
,
f
)
# state is no more in product_template table
# state replaced by active in product_template table
# filtered_products_t = [p for p in products_t if p["state"] != "end" and p["state"] != "obsolete"]
filtered_products_t
=
[
p
for
p
in
products_t
if
p
[
"active"
]]
# TODO : Find out how to retrieve this attribute
filtered_products_t
=
products_t
sales_average_params
=
{
sales_average_params
=
{
'ids'
:
ptids
,
'ids'
:
ptids
,
...
...
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