Skip to content

Commit

Permalink
[14.0][IMP]sale_quotation_number: allow customizable sale.quotation s…
Browse files Browse the repository at this point in the history
…equence
  • Loading branch information
almumu authored and docker-odoo committed Aug 23, 2023
1 parent ffdaa2e commit 6763a56
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 @@ -38,7 +38,10 @@ def copy(self, default=None):

def action_confirm(self):
for order in self:
if self.name[:2] != "SQ":
sequence = self.env["ir.sequence"].search(
[("code", "=", "sale.quotation")], limit=1
)
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 6763a56

Please sign in to comment.