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)