-
Notifications
You must be signed in to change notification settings - Fork 70
[ADD] l10n_ar_arba_ws: new module #767
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
base: 18.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Este PR implementa un nuevo módulo de Odoo para integración con el webservice A122R de ARBA (Argentina), permitiendo la gestión de declaraciones juradas y retenciones de ingresos brutos. El módulo incluye configuración de ambientes (demo, testing, producción), conexión a webservices de ARBA, y manejo de declaraciones juradas.
- Implementación del modelo principal
l10n_ar.dj.arbapara gestión de declaraciones juradas ARBA - Configuración de ambientes y credenciales en
res.companyyres.config.settings - Extensión del sistema de conexión AFIP para soportar webservices ARBA
- Definición de permisos de acceso para el nuevo modelo
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 26 comments.
Show a summary per file
| File | Description |
|---|---|
l10n_ar_arba_ws/__manifest__.py |
Define el módulo con versión 18.0.1.0.0, dependencias y archivos de datos/seguridad |
l10n_ar_arba_ws/__init__.py |
Importa el paquete de modelos del módulo |
l10n_ar_arba_ws/README.rst |
Documentación del módulo con instrucciones de instalación y configuración |
l10n_ar_arba_ws/models/__init__.py |
Importa los modelos del módulo (actualmente con l10n_ar_afipws_connection comentado) |
l10n_ar_arba_ws/models/l10n_ar_afipws_connection.py |
Extiende la conexión AFIP para soportar webservices ARBA A122R |
l10n_ar_arba_ws/models/l10n_ar_dj_arba.py |
Modelo principal para declaraciones juradas ARBA con métodos de conexión al webservice |
l10n_ar_arba_ws/models/l10n_ar_payment_withholding.py |
Archivo vacío que será usado para el modelo de retenciones |
l10n_ar_arba_ws/models/res_company.py |
Agrega campos de configuración ARBA a la compañía (ambiente, client_id, client_secret) |
l10n_ar_arba_ws/models/res_config_settings.py |
Expone los campos de configuración ARBA en las opciones de ajustes |
l10n_ar_arba_ws/security/ir.model.access.csv |
Define permisos de acceso para el modelo l10n_ar.dj.arba |
Comments suppressed due to low confidence (1)
l10n_ar_arba_ws/README.rst:1
- Error ortográfico en 'webserivce', debería ser 'webservice'.
.. |company| replace:: ADHOC SA
| access_l10n_ar_dj_arba_admin,l10n_ar.dj.arba.admin,model_l10n_ar_dj_arba,account.group_account_manager | ||
| ,1,1,1,0 |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La línea 2-3 del CSV tiene un formato incorrecto. Los valores de permisos (1,1,1,0) están en una línea separada cuando deberían estar en la misma línea que el registro. Esto causará un error al cargar el archivo. Debe ser: access_l10n_ar_dj_arba_admin,l10n_ar.dj.arba.admin,model_l10n_ar_dj_arba,account.group_account_manager,1,1,1,0
| access_l10n_ar_dj_arba_admin,l10n_ar.dj.arba.admin,model_l10n_ar_dj_arba,account.group_account_manager | |
| ,1,1,1,0 | |
| access_l10n_ar_dj_arba_admin,l10n_ar.dj.arba.admin,model_l10n_ar_dj_arba,account.group_account_manager,1,1,1,0 |
| """Computamos los parametros a ser enviados para abrir la declaración en ARBA""" | ||
| self.ensure_one() | ||
| return { | ||
| "cuit": self.company_id.vat.ensure_vat(), |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
El campo vat es un Char, no tiene método ensure_vat(). Este código causará un AttributeError. Si ensure_vat() es un método del módulo l10n_ar, debería llamarse sobre el partner: self.company_id.partner_id.ensure_vat() o directamente usar self.company_id.vat.
| "cuit": self.company_id.vat.ensure_vat(), | |
| "cuit": self.company_id.vat, |
| self.ensure_one() | ||
| return { | ||
| "cuit": self.company_id.vat.ensure_vat(), | ||
| "quincena": self.date.fortnight, |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
El campo date es de tipo Date, que no tiene atributo fortnight. Esto causará un AttributeError. Debes implementar la lógica para calcular la quincena desde la fecha o agregar un campo computed.
| url = ws_url.get(environment_type) | ||
|
|
||
| user = self.company_id.vat.ensure_vat() | ||
| password = self.company_id.arba_cit |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
El campo arba_cit no está definido en el modelo res.company de este módulo. Esto causará un AttributeError. Debes agregar este campo en models/res_company.py o usar otro campo existente.
| } | ||
| url = ws_url.get(environment_type) | ||
|
|
||
| user = self.company_id.vat.ensure_vat() |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
El campo vat es un Char, no tiene método ensure_vat(). Este código causará un AttributeError. Si ensure_vat() es un método del módulo l10n_ar, debería llamarse sobre el partner: self.company_id.partner_id.ensure_vat() o directamente usar self.company_id.vat.
|
|
||
| user = self.company_id.vat.ensure_vat() | ||
| password = self.company_id.arba_cit | ||
| client_secret = self.company_id.l10n_ar_arba_client_secret |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assignment to 'client_secret' is unnecessary as it is redefined before this value is used.
| client_secret = self.company_id.l10n_ar_arba_client_secret |
| user = self.company_id.vat.ensure_vat() | ||
| password = self.company_id.arba_cit | ||
| client_secret = self.company_id.l10n_ar_arba_client_secret | ||
| client_id = self.company_id.l10n_ar_arba_client_id |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assignment to 'client_id' is unnecessary as it is redefined before this value is used.
| client_id = self.company_id.l10n_ar_arba_client_id |
| return wsdl.get(environment_type) | ||
| return super()._l10n_ar_get_token_url() | ||
|
|
||
| def _get_client(self, return_transport=False): |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L10nArAfipwsConnection._get_client returns tuple of size 2 and tuple of size 3.
| { | ||
| "name": "ARBA Webservice (A122R)", | ||
| "version": "18.0.1.0.0", | ||
| "category": "Localization/Argentina", | ||
| "sequence": 14, | ||
| "author": "ADHOC SA, ", | ||
| "website": "www.adhoc.com.ar", | ||
| "license": "AGPL-3", | ||
| "summary": "", | ||
| "depends": [ | ||
| "l10n_ar_tax", | ||
| "l10n_ar_edi", | ||
| ], | ||
| "data": [ | ||
| # "data/ir_cron_data.xml", | ||
| # "data/res_company_data.xml", | ||
| # "wizards/res_config_settings_views.xml", | ||
| ], | ||
| "security": [ | ||
| "security/ir.model.access.csv", | ||
| ], | ||
| "installable": True, | ||
| "auto_install": False, | ||
| "application": False, | ||
| } |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement has no effect.
| request_params = self.request_params() | ||
| token = self._get_token() | ||
| # call webserivce to open declaration | ||
| pass |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary 'pass' statement.
| pass |

No description provided.