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 5376536
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions sale_quotation_number/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@ def get_sale_order_seq(self):
self.ensure_one()
return self.env["ir.sequence"].next_by_code("sale.order")

def _action_confirm(self):
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 5376536

Please sign in to comment.