add stock_account_avco_negative_fix

This commit is contained in:
Luis 2026-08-03 13:10:09 +02:00
parent 10a288f8d5
commit b07082f70d
9 changed files with 302 additions and 4 deletions

View file

@ -15,8 +15,10 @@ _logger = logging.getLogger(__name__)
class StockMove(models.Model):
_inherit = "stock.move"
def product_price_update_before_done(self):
res = super(StockMove, self).product_price_update_before_done()
def product_price_update_before_done(self, forced_qty=None):
res = super(StockMove, self).product_price_update_before_done(
forced_qty=forced_qty
)
for move in self.filtered(lambda move: move.location_id.usage == "supplier"):
if (
move.product_id.last_purchase_price_received_compute_type