Thursday, August 27, 2020
1 change · master
Resolved issues and error corrections
Reordering quantities now update correctly when related purchase orders or RFQs are edited or cancelled. This helps ensure replenishment reports show products that still need ordering, reducing the risk of missed purchases or stock shortages.
Original PR description
Before this commit, `stock.warehouse.orderpoint` `_compute_qty` didn't depend on `purchase.order.line` (POL). This means when a relevant POL was edited/cancelled, then the `qty_forecast` wouldn't…
Before this commit, `stock.warehouse.orderpoint` `_compute_qty` didn't depend on `purchase.order.line` (POL). This means when a relevant POL was edited/cancelled, then the `qty_forecast` wouldn't correctly update. To reproduce: - Create a product w/ a vendor and buy route active, - Go to replenishment report, create a reordering rule, and hit order for product (RFQ should be created) - Cancel the RFQ and go back to replenishment report The product should reappear in the list view, but does not because it's `qty_forecast` has not updated and therefore has not updated corresponding `qty_to_order` value. Note string rename of `purchase_line_warn` 'Purchase Order Line' => 'Purchase Order Line Warning' is due to repeat label use issue. It is better to rename the poorly labeled `purchase_line_warn` than to give a hacky label for new One2many field. Task: 2285912 Manual forward port of: odoo/odoo#56580 due to migration test error Closes: odoo/odoo#56625 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr