[FIX] purchase_stock: old PO not update qty_received after install purchase_stock
Before this commit, after install purchase_stock, old pol records won't update their qty_received when receive products. This is because their qty_received_method are not updated during the installation. Task 2230811 PR #49921
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
|
||||
<function model="purchase.order.line" name="_update_qty_received_method" />
|
||||
|
||||
<!--
|
||||
Stock rules and routes
|
||||
-->
|
||||
|
||||
@@ -510,3 +510,8 @@ class PurchaseOrderLine(models.Model):
|
||||
incoming_moves |= move
|
||||
|
||||
return outgoing_moves, incoming_moves
|
||||
|
||||
@api.model
|
||||
def _update_qty_received_method(self):
|
||||
"""Update qty_received_method for old PO before install this module."""
|
||||
self.search([])._compute_qty_received_method()
|
||||
|
||||
Reference in New Issue
Block a user