Skip to content

Commit

Permalink
Merge PR #23 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 21, 2024
2 parents 60eb628 + f2fc6cc commit d69ef63
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions mrp_weighing/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from . import mrp_production
from . import stock_move
from . import stock_move_line
15 changes: 15 additions & 0 deletions mrp_weighing/models/stock_move_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2024 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import models


class StockMoveLine(models.Model):
_inherit = "stock.move.line"

def action_reset_weights(self):
res = super().action_reset_weights()
for move in self.move_id.filtered(
lambda sm: sm.product_id == sm.production_id.product_id
):
move.production_id.qty_producing = move.quantity_done
return res

0 comments on commit d69ef63

Please sign in to comment.