Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] l10n_ar_ux: agregar tipo de documento 60 en facturas rectificat… #889

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion l10n_ar_ux/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -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