Skip to content

Commit

Permalink
Merge PR #3309 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Oct 30, 2024
2 parents e6216dd + 69bf5e9 commit 7fa3f9e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sale_quotation_number/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ def copy(self, default=None):
return super().copy(default)

def action_confirm(self):
sequence = self.env["ir.sequence"].search(
[("code", "=", "sale.quotation")], limit=1
)
for order in self:
if self.name[:2] != "SQ":
if sequence and self.name[: len(sequence.prefix)] != sequence.prefix:
continue
if order.state not in ("draft", "sent") or order.company_id.keep_name_so:
continue
Expand Down

0 comments on commit 7fa3f9e

Please sign in to comment.