Skip to content

Commit

Permalink
Merge PR OCA#2195 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 14, 2024
2 parents 1045f89 + 31a738d commit 41955c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stock_secondary_unit/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ def _prepare_extra_move_vals(self, qty):
vals = super()._prepare_extra_move_vals(qty)
if self.secondary_uom_id:
vals["secondary_uom_id"] = self.secondary_uom_id.id
# Get difference between demand secondary qty and done secondary qty
vals["secondary_uom_qty"] = (
sum(self.move_line_ids.mapped("secondary_uom_qty"))
- self.secondary_uom_qty
)
return vals

def _merge_moves_fields(self):
Expand Down

0 comments on commit 41955c4

Please sign in to comment.