Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] purchase_stock: wrong supplier from orderpoint:
Use case to reproduce: - Set "receive good in input and then stock" on the warehouse. - Set two suppliers on a product. one from a partner (higher priority) and one from a child partner (lower priority). - Set the child partner as the vendor on the replenishment report. - Order a replenishment for the product. It happens due to an hack that use a field on `stock.move` in order to temporaly store the partner among the moves until the RFQ. But this field is a many2one on `res.partner` model and not on `product.supplierinfo` `_run_buy` receive a partner and still use `_select_seller` with the partner in order to find the best pricelist. But it won't use the specific supplier price list set on the orderpoint. In order to fix, we don't store anymore the price list partner on the intermediate move. In run_buy we receive the orderpoint if it's the origin of the procurement. On the orderpoint the supplierinfo is set. So we take it from there. opw-3180945 closes odoo#114845 Signed-off-by: William Henrotin (whe) <whe@odoo.com>
- Loading branch information