Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
odoo
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
0
Merge Requests
0
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
odoo
Commits
695c942f
Commit
695c942f
authored
Mar 09, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix purchase_compute_order error when a product is no more available for a supplier
parent
dcf8a236
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
product_product.py
...op_addons/purchase_compute_order/model/product_product.py
+7
-0
No files found.
intercoop_addons/purchase_compute_order/model/product_product.py
View file @
695c942f
...
...
@@ -22,6 +22,9 @@
##############################################################################
from
openerp
import
models
,
api
,
fields
import
logging
_logger
=
logging
.
getLogger
(
__name__
)
class
ProductProduct
(
models
.
Model
):
...
...
@@ -56,5 +59,9 @@ class ProductProduct(models.Model):
if
not
self
.
product_tmpl_id
.
seller_ids
:
return
False
valid_si
=
self
.
_all_valid_psi
()[
0
]
if
len
(
valid_si
)
>
0
:
seq
=
min
([
si
.
sequence
for
si
in
valid_si
])
return
valid_si
.
filtered
(
lambda
si
,
seq
=
seq
:
si
.
sequence
==
seq
)
else
:
_logger
.
warning
(
"No fisrt_valid_psi
%
s"
,
str
(
self
.
product_tmpl_id
))
return
False
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