Skip to content

Commit

Permalink
[MIG] ddmrp_exclude_moves_adu_calc: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnauCForgeFlow committed Jul 18, 2024
1 parent 0569054 commit 5cb86fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ddmrp_exclude_moves_adu_calc/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "DDMRP Exclude Moves ADU Calc",
"summary": "Define additional rules to exclude certain moves from ADU "
"calculation",
"version": "16.0.1.0.1",
"version": "17.0.1.0.0",
"author": "ForgeFlow, " "Odoo Community Association (OCA)",
"maintainers": ["JordiBForgeFlow", "LoisRForgeFlow"],
"website": "https://github.com/OCA/ddmrp",
Expand Down
2 changes: 1 addition & 1 deletion ddmrp_exclude_moves_adu_calc/models/stock_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def _exclude_past_moves_domain(self):

@api.model
def _past_moves_domain(self, date_from, date_to, locations):
new_locs = locations.filtered(lambda l: not l.exclude_from_adu)
new_locs = locations.filtered(lambda loc: not loc.exclude_from_adu)
res = super()._past_moves_domain(date_from, date_to, new_locs)
exclude_moves = self.env["stock.move"].search(self._exclude_past_moves_domain())
if exclude_moves:
Expand Down
3 changes: 2 additions & 1 deletion ddmrp_exclude_moves_adu_calc/tests/test_ddmrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ def create_pickingout_a_secondary(self, date_move, qty):

def _do_picking(self, picking, date):
picking.action_confirm()
picking.move_ids.quantity_done = picking.move_ids.product_uom_qty
picking.move_ids.quantity = picking.move_ids.product_qty
picking.move_ids.picked = True
picking._action_done()
for move in picking.move_ids:
move.date = date
Expand Down

0 comments on commit 5cb86fd

Please sign in to comment.