diff options
| author | jev <jev@odoo.com> | 2020-07-01 19:55:13 +0000 |
|---|---|---|
| committer | jev <jev@odoo.com> | 2020-07-02 08:11:07 +0000 |
| commit | 19a504b62715c9855372dc4ae54ab5b56d88902c (patch) | |
| tree | 68c2e7e3bbf0500e06d5b658deb59cadaffb76cb /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 4b8d716188b6a252602170ed2db3a172a6370e75 (diff) | |
[FIX] product: deterministic seller selection
Before this fix, the search on the supplierinfo had
an undeterministic result.
When testing odoo/addons/purchase_stock/tests/test_reordering_rule.py:66
`def test_procure_not_default_partner`, it may fail at line 120.
It sets 2 suppliers:
- Firstly, the `default_vendor` (let's assume id=120)
- Then, the `secondary_vendor` (let's assume id=121)
It then runs a procurement without setting the supplier and assert
that the partner of the resulting PO line should be `default_vendor`.
The return of
odoo/addons/product/models/product.py:574
`def _prepare_sellers` depends on Postgres when the supplierinfo
sequence, min_qty and price are the same for multiple records.
By adding the `id` to the `.sorted`, the result will order correctly in that
case.
opws-2272627
-2282081
-2287079
And PS-BE via CSC reported more cases without opw.
closes odoo/odoo#53951
X-original-commit: a733feb8e022084148685599840fe542ee9dafd1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
