diff --git a/sale_quotation_number/models/sale_order.py b/sale_quotation_number/models/sale_order.py index a82c1478395c..23837f347af3 100644 --- a/sale_quotation_number/models/sale_order.py +++ b/sale_quotation_number/models/sale_order.py @@ -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