Skip to content

Commit 99567a6

Browse files
CRogosMohamed Osman
authored andcommitted
[IMP] sale_quotation_number: allow customizable quotation sequence
1 parent 5fcfa07 commit 99567a6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

sale_quotation_number/models/sale_order.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ def get_sale_order_seq(self):
4949
return self.env["ir.sequence"].next_by_code("sale.order")
5050

5151
def _action_confirm(self):
52+
sequence = self.env["ir.sequence"].search(
53+
[("code", "=", "sale.quotation")], limit=1
54+
)
5255
for order in self:
53-
if not (
54-
order.state == "sale"
55-
and order.quotation_seq_used
56-
and not order.company_id.keep_name_so
57-
):
56+
if sequence and self.name[: len(sequence.prefix)] != sequence.prefix:
5857
continue
5958
quo = ""
6059
if order.origin and order.origin != "":

0 commit comments

Comments
 (0)