Skip to content

Commit

Permalink
[14.0][IMP] custom_descarga: Add condiction in next stage NOLINT=1 gi…
Browse files Browse the repository at this point in the history
…t commit -afunction of saca lines.
  • Loading branch information
Berezi authored and anajuaristi committed Dec 4, 2024
1 parent 7c0bd96 commit 3286dc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_descarga/models/saca_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,8 @@ def action_next_stage(self):
line.product_id, name, picking.company_id
)
line.lot_id = lot.id
picking.sudo().button_validate()
if picking.state != "done":
picking.sudo().button_validate()
self.sudo().sale_order_id.commitment_date = self.date + timedelta(days=1)
self.purchase_order_id.date_planned = self.date + timedelta(days=1)
self.write({"stage_id": stage_matanza.id})
Expand Down

0 comments on commit 3286dc3

Please sign in to comment.