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 Nov 8, 2023
1 parent 4c56d13 commit 0241a65
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,7 +43,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 0241a65

Please sign in to comment.