Skip to content

Commit

Permalink
[IMP] allow customizable quotation sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed Osman committed Sep 12, 2024
1 parent 809e76d commit 69bf5e9
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 69bf5e9

Please sign in to comment.