From e8e2fdbbb1100c04e9b1a4f391e08013bd007fa8 Mon Sep 17 00:00:00 2001 From: Maximiliano Mezzavilla Date: Wed, 7 Aug 2024 17:16:09 -0300 Subject: [PATCH] [FIX] l10n_ar_sale_order_type: Fix para que se setee correctamente la secuencia de la orden de venta --- l10n_ar_sale_order_type/models/sale_order.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/l10n_ar_sale_order_type/models/sale_order.py b/l10n_ar_sale_order_type/models/sale_order.py index 56bd7229..96382884 100644 --- a/l10n_ar_sale_order_type/models/sale_order.py +++ b/l10n_ar_sale_order_type/models/sale_order.py @@ -29,8 +29,9 @@ def write(self, vals): record.state in {"draft", "sent"} and record.type_id.sequence_id != sale_checkbook.sequence_id ): + number_next = sale_checkbook.sequence_id.number_next_actual new_vals = vals.copy() - new_vals["name"] = sale_checkbook.sequence_id._next() or _('New') + new_vals["name"] = sale_checkbook.sequence_id.get_next_char(number_next) super(SaleOrder, record).write(new_vals) else: super(SaleOrder, record).write(vals)