From ee06736d0f85e125fb9863a77ea401f2384c6c70 Mon Sep 17 00:00:00 2001 From: Pablo Montenegro Date: Thu, 15 Aug 2024 09:43:02 -0300 Subject: [PATCH] =?UTF-8?q?[IMP]=20l10n=5Far=5Fux:=20agregar=20tipo=20de?= =?UTF-8?q?=20documento=2060=20en=20facturas=20rectificativas=20de=20clien?= =?UTF-8?q?te=20en=20diario=20que=20no=20usa=20pos=20Heredamos=20el=20m?= =?UTF-8?q?=C3=A9todo=20original=20que=20se=20encuentra=20en=20https://git?= =?UTF-8?q?hub.com/odoo/odoo/blob/16.0/addons/l10n=5Far/models/account=5Fm?= =?UTF-8?q?ove.py#L117=20para=20que=20contenga=20el=20c=C3=B3digo=20de=20t?= =?UTF-8?q?ipo=20de=20documento=20'60'=20CUENTAS=20DE=20VENTA=20Y=20LIQUID?= =?UTF-8?q?O=20PRODUCTO=20A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l10n_ar_ux/models/account_move.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/l10n_ar_ux/models/account_move.py b/l10n_ar_ux/models/account_move.py index 933039d88..002bdd38b 100644 --- a/l10n_ar_ux/models/account_move.py +++ b/l10n_ar_ux/models/account_move.py @@ -118,9 +118,15 @@ def _compute_l10n_latam_document_type(self): document_types = document_types.filtered(lambda x: x.internal_type == 'debit_note') rec.l10n_latam_document_type_id = document_types and document_types[0].id - @api.model + @api.model def _l10n_ar_get_document_number_parts(self, document_number, document_type_code): # eliminamos todo lo que viene después '(' que es un sufijo que odoo agrega y que nosotros agregamos para # forzar unicidad con cambios de approach al ir migrando de versiones document_number = document_number.split('(')[0] return super()._l10n_ar_get_document_number_parts(document_number, document_type_code) + + def _get_l10n_ar_codes_used_for_inv_and_ref(self): + """ Heredamos el método original que se encuentra en https://github.com/odoo/odoo/blob/16.0/addons/l10n_ar/models/account_move.py#L117 para que contenga el código de tipo de documento '60' CUENTAS DE VENTA Y LIQUIDO PRODUCTO A """ + document_types = super()._get_l10n_ar_codes_used_for_inv_and_ref() + document_types.append('60') + return document_types