Skip to content

Commit

Permalink
[IMP] sale_quotation_number: allow customizable quotation sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
CRogos authored and Mohamed Osman committed Sep 13, 2024
1 parent 5fcfa07 commit 99567a6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions sale_quotation_number/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ def get_sale_order_seq(self):
return self.env["ir.sequence"].next_by_code("sale.order")

def _action_confirm(self):
sequence = self.env["ir.sequence"].search(
[("code", "=", "sale.quotation")], limit=1
)
for order in self:
if not (
order.state == "sale"
and order.quotation_seq_used
and not order.company_id.keep_name_so
):
if sequence and self.name[: len(sequence.prefix)] != sequence.prefix:
continue
quo = ""
if order.origin and order.origin != "":
Expand Down

0 comments on commit 99567a6

Please sign in to comment.