From e597a946eca3944110d8e1abe1bbd274877ca2b9 Mon Sep 17 00:00:00 2001 From: nicolasrsande Date: Tue, 7 Nov 2023 18:11:11 -0300 Subject: [PATCH 1/2] [UPD] Update dotfiles --- .copier-answers.yml | 12 +++++++----- .github/workflows/test.yml | 2 +- .gitignore | 1 + .pre-commit-config.yaml | 6 ++++-- README.md | 4 ++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index 0c03de4f..1a40bce5 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,22 +1,24 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.17.2 +_commit: v1.18 _src_path: gh:oca/oca-addons-repo-template ci: GitHub generate_requirements_txt: true github_check_license: true github_ci_extra_env: {} -github_enable_codecov: true +github_enable_codecov: false github_enable_makepot: true github_enable_stale_action: true -github_enforce_dev_status_compatibility: true +github_enforce_dev_status_compatibility: false include_wkhtmltopdf: false odoo_test_flavor: Both odoo_version: 16.0 org_name: Odoo Community Association (OCA) org_slug: OCA rebel_module_groups: [] -repo_description: 'TODO: add repo description.' -repo_name: l10n-argentina +repo_description: Odoo addons for Argentina +repo_name: Odoo addons for Argentina repo_slug: l10n-argentina repo_website: https://github.com/OCA/l10n-argentina +use_pyproject_toml: false +use_ruff: false diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1af7438..686c9746 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,11 +59,11 @@ jobs: run: manifestoo -d . check-licenses - name: Check development status run: manifestoo -d . check-dev-status --default-dev-status=Beta + continue-on-error: true - name: Initialize test db run: oca_init_test_database - name: Run tests run: oca_run_tests - - uses: codecov/codecov-action@v1 - name: Update .pot files run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }} if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }} diff --git a/.gitignore b/.gitignore index 9c283fd4..0090721f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ __pycache__/ *.py[cod] /.venv /.pytest_cache +/.ruff_cache # C extensions *.so diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4c8cdbe8..92dfebdb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,8 @@ exclude: | ^docs/_templates/.*\.html$| # Don't bother non-technical authors with formatting issues in docs readme/.*\.(rst|md)$| + # Ignore build and dist directories in addons + /build/|/dist/| # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*) default_language_version: @@ -35,7 +37,7 @@ repos: language: fail files: '[a-zA-Z0-9_]*/i18n/en\.po$' - repo: https://github.com/oca/maintainer-tools - rev: 969238e47c07d0c40573acff81d170f63245d738 + rev: 568cacd1d6eef453063a524a5ce63dcd49c7259b hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -108,7 +110,7 @@ repos: - id: check-symlinks - id: check-xml - id: mixed-line-ending - args: ["--fix=lf"] + args: ["--fix=lf"] # ruff doesn't support python 3.6 - repo: https://github.com/asottile/pyupgrade rev: v2.38.2 hooks: diff --git a/README.md b/README.md index 526a8454..8cfeb09b 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ -# l10n-argentina +# Odoo addons for Argentina -TODO: add repo description. +Odoo addons for Argentina From ae959418ded623bc15f575701fa56ad28a63c8a6 Mon Sep 17 00:00:00 2001 From: nicolasrsande Date: Sat, 11 Nov 2023 22:27:38 -0300 Subject: [PATCH 2/2] [ADD] l10n_ar_afipws --- l10n_ar_afipws/README.rst | 120 +++ l10n_ar_afipws/__init__.py | 5 + l10n_ar_afipws/__manifest__.py | 32 + l10n_ar_afipws/i18n/es_AR.po | 718 ++++++++++++++++++ l10n_ar_afipws/i18n/l10n_ar_afipws.pot | 680 +++++++++++++++++ l10n_ar_afipws/models/__init__.py | 8 + l10n_ar_afipws/models/afipws_certificate.py | 145 ++++ .../models/afipws_certificate_alias.py | 199 +++++ l10n_ar_afipws/models/afipws_connection.py | 171 +++++ l10n_ar_afipws/models/res_company.py | 245 ++++++ l10n_ar_afipws/models/res_config_settings.py | 13 + l10n_ar_afipws/readme/CONTRIBUTORS.rst | 5 + l10n_ar_afipws/readme/DESCRIPTION.rst | 3 + l10n_ar_afipws/readme/HISTORY.rst | 5 + l10n_ar_afipws/readme/ROADMAP.rst | 1 + l10n_ar_afipws/readme/USAGE.rst | 5 + l10n_ar_afipws/security/ir.model.access.csv | 8 + l10n_ar_afipws/security/security.xml | 29 + l10n_ar_afipws/security/security.xml.save | 22 + l10n_ar_afipws/static/description/icon.png | Bin 0 -> 1564 bytes l10n_ar_afipws/static/description/index.html | 463 +++++++++++ .../views/afipws_certificate_alias_view.xml | 116 +++ .../views/afipws_certificate_view.xml | 58 ++ .../views/afipws_connection_view.xml | 55 ++ l10n_ar_afipws/views/afipws_menuitem.xml | 11 + l10n_ar_afipws/views/res_config_settings.xml | 38 + l10n_ar_afipws/wizard/__init__.py | 4 + .../wizard/upload_certificate_view.xml | 34 + .../wizard/upload_certificate_wizard.py | 32 + requirements.txt | 1 + .../l10n_ar_afipws/odoo/addons/l10n_ar_afipws | 1 + setup/l10n_ar_afipws/setup.py | 6 + 32 files changed, 3233 insertions(+) create mode 100644 l10n_ar_afipws/README.rst create mode 100644 l10n_ar_afipws/__init__.py create mode 100644 l10n_ar_afipws/__manifest__.py create mode 100644 l10n_ar_afipws/i18n/es_AR.po create mode 100644 l10n_ar_afipws/i18n/l10n_ar_afipws.pot create mode 100644 l10n_ar_afipws/models/__init__.py create mode 100644 l10n_ar_afipws/models/afipws_certificate.py create mode 100644 l10n_ar_afipws/models/afipws_certificate_alias.py create mode 100644 l10n_ar_afipws/models/afipws_connection.py create mode 100644 l10n_ar_afipws/models/res_company.py create mode 100644 l10n_ar_afipws/models/res_config_settings.py create mode 100644 l10n_ar_afipws/readme/CONTRIBUTORS.rst create mode 100644 l10n_ar_afipws/readme/DESCRIPTION.rst create mode 100644 l10n_ar_afipws/readme/HISTORY.rst create mode 100644 l10n_ar_afipws/readme/ROADMAP.rst create mode 100644 l10n_ar_afipws/readme/USAGE.rst create mode 100644 l10n_ar_afipws/security/ir.model.access.csv create mode 100644 l10n_ar_afipws/security/security.xml create mode 100644 l10n_ar_afipws/security/security.xml.save create mode 100644 l10n_ar_afipws/static/description/icon.png create mode 100644 l10n_ar_afipws/static/description/index.html create mode 100644 l10n_ar_afipws/views/afipws_certificate_alias_view.xml create mode 100644 l10n_ar_afipws/views/afipws_certificate_view.xml create mode 100644 l10n_ar_afipws/views/afipws_connection_view.xml create mode 100644 l10n_ar_afipws/views/afipws_menuitem.xml create mode 100644 l10n_ar_afipws/views/res_config_settings.xml create mode 100644 l10n_ar_afipws/wizard/__init__.py create mode 100644 l10n_ar_afipws/wizard/upload_certificate_view.xml create mode 100644 l10n_ar_afipws/wizard/upload_certificate_wizard.py create mode 100644 requirements.txt create mode 120000 setup/l10n_ar_afipws/odoo/addons/l10n_ar_afipws create mode 100644 setup/l10n_ar_afipws/setup.py diff --git a/l10n_ar_afipws/README.rst b/l10n_ar_afipws/README.rst new file mode 100644 index 00000000..92f67b34 --- /dev/null +++ b/l10n_ar_afipws/README.rst @@ -0,0 +1,120 @@ +========================================= +Modulo Base para los Web Services de AFIP +========================================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:3d6094ef60c1ace10fc0b88052cfff7887f6d8fe1ab492273d6331b303605e37 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--argentina-lightgray.png?logo=github + :target: https://github.com/OCA/l10n-argentina/tree/16.0/l10n_ar_afipws + :alt: OCA/l10n-argentina +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/l10n-argentina-16-0/l10n-argentina-16-0-l10n_ar_afipws + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-argentina&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Integration of Argentinian AFIP Webservices + +Base module for integrtation of the AFIP webservices. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use electronic invoice webservices first you need to install pyafipws: + +* Install the necessary libraries and dependencies from https://github.com/reingart/pyafipws +* Use the "main" branch to have access to the full features +* Be sure to install all dependecies of pyafipws before trying to use the modules + +Known issues / Roadmap +====================== + +* Utilizar los metodos de pyafipws para generar los certificados, claves y validarlos + +Changelog +========= + +14.0.1.0.0 (2023-01-29) +~~~~~~~~~~~~~~~~~~~~~~~ + +* Refactorizacion completa del modulo y de sus metodos +* Se reformulo toda la UI de generacion de certificados para usar pyafipws para generarlos, la generacion es automatica excepto por la parte de AFIP + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Nimarosa +* ADHOC SA +* Moldeo Interactive +* Exemax +* Codize + +Contributors +~~~~~~~~~~~~ + +- Nimarosa +- ADHOC S.A. +- Modeo Interactive +- Exemax +- Codize + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-nimarosa| image:: https://github.com/nimarosa.png?size=40px + :target: https://github.com/nimarosa + :alt: nimarosa +.. |maintainer-ibuioli| image:: https://github.com/ibuioli.png?size=40px + :target: https://github.com/ibuioli + :alt: ibuioli + +Current `maintainers `__: + +|maintainer-nimarosa| |maintainer-ibuioli| + +This module is part of the `OCA/l10n-argentina `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_ar_afipws/__init__.py b/l10n_ar_afipws/__init__.py new file mode 100644 index 00000000..ea788c8b --- /dev/null +++ b/l10n_ar_afipws/__init__.py @@ -0,0 +1,5 @@ +# For copyright and license notices, see __manifest__.py file in module root +# directory or check the readme files + +from . import wizard +from . import models diff --git a/l10n_ar_afipws/__manifest__.py b/l10n_ar_afipws/__manifest__.py new file mode 100644 index 00000000..727c55ef --- /dev/null +++ b/l10n_ar_afipws/__manifest__.py @@ -0,0 +1,32 @@ +# For copyright and license notices, see __manifest__.py file in module root +# directory or check the readme files + +{ + "name": "Modulo Base para los Web Services de AFIP", + "version": "16.0.1.0.0", + "category": "Accounting/Localizations", + "sequence": 14, + "author": "Nimarosa, ADHOC SA, Moldeo Interactive, Exemax, \ + Codize, Odoo Community Association (OCA)", + "license": "AGPL-3", + "summary": "Integration for Argentina Electronic invoice webservices", + "depends": [ + "l10n_ar", + ], + "website": "https://github.com/OCA/l10n-argentina", + "data": [ + "wizard/upload_certificate_view.xml", + "views/afipws_menuitem.xml", + "views/afipws_certificate_view.xml", + "views/afipws_certificate_alias_view.xml", + "views/afipws_connection_view.xml", + "security/ir.model.access.csv", + "security/security.xml", + "views/res_config_settings.xml", + ], + "maintainers": ["nimarosa", "ibuioli"], + "images": [], + "installable": True, + "auto_install": False, + "application": False, +} diff --git a/l10n_ar_afipws/i18n/es_AR.po b/l10n_ar_afipws/i18n/es_AR.po new file mode 100644 index 00000000..a0542a6c --- /dev/null +++ b/l10n_ar_afipws/i18n/es_AR.po @@ -0,0 +1,718 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_ar_afipws +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-04-07 19:23+0000\n" +"Last-Translator: Ignacio Buioli \n" +"Language-Team: none\n" +"Language: es_AR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.14.1\n" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,help:l10n_ar_afipws.field_afipws_certificate__state +msgid "" +"* The 'Draft' state is used when a user is creating a new pair key. Warning: " +"everybody can see the key.\n" +"* The 'Confirmed' state is used when a certificate is valid.\n" +"* The 'Canceled' state is used when the key is not more used. You cant use " +"this key again." +msgstr "" +"* El estado 'Borrador' se usa cuando un usuario está creando una nueva clave " +"de emparejamiento. Advertencia: todos pueden ver la clave.\n" +"* El estado 'Confirmado' se utiliza cuando un certificado es válido.\n" +"* El estado 'Cancelado' se usa cuando la clave no se usa más. No puede usar " +"esta clave de nuevo." + +#. module: l10n_ar_afipws +#: model:ir.model.fields,help:l10n_ar_afipws.field_afipws_certificate_alias__state +msgid "" +"* The 'Draft' state is used when a user is creating a new pair key. Warning: " +"everybody can see the key.\n" +"* The 'Confirmed' state is used when the key is completed with public or " +"private key.\n" +"* The 'Canceled' state is used when the key is not more used. You cant use " +"this key again." +msgstr "" +"* El estado 'Borrador' se usa cuando un usuario está creando una nueva clave " +"de emparejamiento. Advertencia: todos pueden ver la clave.\n" +"* El estado 'Confirmado' se utiliza cuando un certificado es válido.\n" +"* El estado 'Cancelado' se usa cuando la clave no se usa más. No puede usar " +"esta clave de nuevo." + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.res_config_settings_view_form +msgid "" +"AFIP Web Services\n" +" " +msgstr "" +"Servicios Web AFIP\n" +" " + +#. module: l10n_ar_afipws +#: model:ir.actions.act_window,name:l10n_ar_afipws.act_afipws_certificate_alias +msgid "AFIP Certificado" +msgstr "Certificado AFIP" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_filter +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_tree +msgid "AFIP Certificados" +msgstr "Certificados AFIP" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_tree +msgid "AFIP Certificates" +msgstr "Certificados AFIP" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +msgid "AFIP Conector" +msgstr "Conector AFIP" + +#. module: l10n_ar_afipws +#: model:ir.actions.act_window,name:l10n_ar_afipws.act_afipws_auth +msgid "AFIP Connections" +msgstr "Conexiones AFIP" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +msgid "AFIP Connector" +msgstr "Conector AFIP" + +#. module: l10n_ar_afipws +#: model:ir.model,name:l10n_ar_afipws.model_afipws_certificate_alias +msgid "AFIP Distingish Name / Alias" +msgstr "Nombre Distinguido / Alias AFIP" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__afip_login_url +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +msgid "AFIP Login URL" +msgstr "URL de Acceso AFIP" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +msgid "AFIP Servers" +msgstr "Servidores AFIP" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__afip_ws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +msgid "AFIP WS" +msgstr "AFIP WS" + +#. module: l10n_ar_afipws +#: model:ir.actions.act_window,name:l10n_ar_afipws.action_upload_certificate +msgid "AFIP WS - Upload Certificate" +msgstr "AFIP WS - Cargar Certificado" + +#. module: l10n_ar_afipws +#: model:ir.model,name:l10n_ar_afipws.model_afipws_connection +msgid "AFIP WS Connection" +msgstr "Conexión AFIP WS" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_company__afip_ws_env_type +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_config_settings__afip_ws_env_type +msgid "AFIP WS Environment" +msgstr "Entorno de AFIP WS" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__afip_ws_url +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +msgid "AFIP WS URL" +msgstr "AFIP WS URL" + +#. module: l10n_ar_afipws +#: model:ir.ui.menu,name:l10n_ar_afipws.menu_afipws +msgid "AFIP Web Services" +msgstr "AFIP Web Services" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_connection.py:0 +#, python-format +msgid "AFIP Webservice %s not implemented yet" +msgstr "El Webservice de AFIP %s no ha sido implementado" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_company__alias_ids +msgid "Aliases" +msgstr "Alias" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.res_config_settings_view_form +msgid "Argentina Localization" +msgstr "Localización Argentina" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__state__draft +msgid "Borrador" +msgstr "Borrador" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__cuit +msgid "CUIT" +msgstr "CUIT" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "CUIT de la Compañía" +msgstr "CUIT de la Compañía" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_upload_certificate_form +msgid "Cancel" +msgstr "Cancelar" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__state__cancel +msgid "Cancelado" +msgstr "Cancelado" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Cancelar" +msgstr "Cancelar" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate__state__cancel +msgid "Cancelled" +msgstr "Cancelado" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Ceritificados" +msgstr "Certificados" + +#. module: l10n_ar_afipws +#: model:ir.ui.menu,name:l10n_ar_afipws.menu_action_afipws_certificate_alias +msgid "Certificados" +msgstr "Certificados" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__crt +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__certificate_id +msgid "Certificate" +msgstr "Certificado" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__alias_id +msgid "Certificate Alias" +msgstr "Alias del Certificado" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_certificate.py:0 +#, python-format +msgid "Certificate Alias must be confirmed first!" +msgstr "¡El Alias del Certificado debe ser confirmado primero!" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,help:l10n_ar_afipws.field_afipws_certificate__csr +msgid "Certificate Request in PEM format." +msgstr "La Solicitud del Certificado debe estar en formato PEM." + +#. module: l10n_ar_afipws +#: model:ir.model.fields,help:l10n_ar_afipws.field_afipws_certificate__crt +msgid "Certificate in PEM format." +msgstr "Certificado en formato PEM." + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__certificate_ids +msgid "Certificates" +msgstr "Certificados" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__city +msgid "City" +msgstr "Ciudad" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Ciudad" +msgstr "Ciudad" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__common_name +msgid "Common Name" +msgstr "Nombre Común" + +#. module: l10n_ar_afipws +#: model:ir.model,name:l10n_ar_afipws.model_res_company +msgid "Companies" +msgstr "Compañías" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__company_id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__company_id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__company_id +msgid "Company" +msgstr "Compañía" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__company_cuit +msgid "Company CUIT" +msgstr "CUIT de la Compañía" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_filter +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_tree +msgid "Compañía" +msgstr "Compañía" + +#. module: l10n_ar_afipws +#: model:ir.ui.menu,name:l10n_ar_afipws.menu_action_afipws_auth +msgid "Conexiones" +msgstr "Conexiones" + +#. module: l10n_ar_afipws +#: model:ir.model,name:l10n_ar_afipws.model_res_config_settings +msgid "Config Settings" +msgstr "Configurar Ajustes" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_upload_certificate_form +msgid "Confirm" +msgstr "Confirmar" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Confirm and generate Key" +msgstr "Confirmar y generar Clave" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__state__confirmed +msgid "Confirmado" +msgstr "Confirmado" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Confirmar" +msgstr "Confirmar" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate__state__confirmed +msgid "Confirmed" +msgstr "Confirmado" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_company__connection_ids +msgid "Connections" +msgstr "Conexiones" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/res_company.py:0 +#, python-format +msgid "Could not connect. This is the what we received: %s" +msgstr "No se pudo conectar. Esto es lo que recibimos: %s" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__country_id +msgid "Country" +msgstr "País" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Crear Solicitud de Certificado" +msgstr "Crear Solicitud de Certificado" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__create_uid +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__create_uid +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__create_uid +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__create_date +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__create_date +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__create_date +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__department +msgid "Department" +msgstr "Departamento" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__display_name +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__display_name +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__display_name +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__display_name +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_company__display_name +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_config_settings__display_name +msgid "Display Name" +msgstr "Nombre Mostrado" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__request_file +msgid "Download Signed Certificate Request" +msgstr "Descargar Solicitud de Certificado Firmado" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate__state__draft +msgid "Draft" +msgstr "Borrador" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__service_type__in_house +msgid "En Casa" +msgstr "En Casa" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,help:l10n_ar_afipws.field_res_company__afip_ws_env_type +#: model:ir.model.fields,help:l10n_ar_afipws.field_res_config_settings__afip_ws_env_type +msgid "" +"Environment is used to connect AFIP Web Services.\n" +"Production: This is the connection used in real world.\n" +"Homologation: Use this environment to test AFIP Web Services." +msgstr "" +"El Entorno es usado para conectarse a los Servicios Web de AFIP.\n" +"Producción: Esta es la conexión usada en el mundo real.\n" +"Homologación: Utilice este entorno para probar los Servicios Web de AFIP." + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_filter +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_tree +msgid "Estado" +msgstr "Estado" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__expirationtime +msgid "Expiration Time" +msgstr "Fecha de Expiración" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +msgid "Fecha de Expiración" +msgstr "Fecha de Expiración" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +msgid "Fecha de Generación" +msgstr "Fecha de Generación" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__request_filename +msgid "Filename" +msgstr "Nombre del Archivo" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +msgid "Firma" +msgstr "Firma" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__generationtime +msgid "Generation Time" +msgstr "Fecha de Generación" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__type__homologation +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_connection__type__homologation +msgid "Homologación" +msgstr "Homologación" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__res_company__afip_ws_env_type__homologation +msgid "Homologation" +msgstr "Homologación" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_company__id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_config_settings__id +msgid "ID" +msgstr "ID" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_certificate.py:0 +#, python-format +msgid "Invalid action! Please, set the certification string to continue." +msgstr "" +"¡Acción inválida! Por favor, configure el texto de certificación para " +"continuar." + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_certificate.py:0 +#, python-format +msgid "" +"Invalid action! Your certificate string is invalid. Check if you forgot the " +"header CERTIFICATE or forgot/ append end of lines." +msgstr "" +"¡Acción inválida! El texto de su certificado es inválido. Compruebe si no " +"olvidó la cabecera CERTIFICATE o si olvidó anexar el final de las líneas." + +#. module: l10n_ar_afipws +#: model:ir.model.fields,help:l10n_ar_afipws.field_afipws_certificate_alias__common_name +msgid "Just a name, you can leave it this way" +msgstr "Solo un nombre, puede dejarlo de esta manera" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Key" +msgstr "Clave" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate____last_update +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias____last_update +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection____last_update +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard____last_update +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_company____last_update +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_config_settings____last_update +msgid "Last Modified on" +msgstr "Última modificación el" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__write_uid +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__write_uid +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__write_uid +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__write_date +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__write_date +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__write_date +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__write_date +msgid "Last Updated on" +msgstr "Última actualización el" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_filter +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_tree +msgid "Nombre Común" +msgstr "Nombre Común" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/res_company.py:0 +#, python-format +msgid "Not confirmed certificate for %s on company %s" +msgstr "No existe un certificado confirmado para %s en la compañía %s" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "País" +msgstr "País" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__key +msgid "Private Key" +msgstr "Clave Privada" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__type__production +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_connection__type__production +msgid "Producción" +msgstr "Producción" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__res_company__afip_ws_env_type__production +msgid "Production" +msgstr "Producción" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Provincia" +msgstr "Provincia" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__csr +msgid "Request Certificate" +msgstr "Solicitud de Certificado" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__service_provider_cuit +msgid "Service Provider CUIT" +msgstr "Servicio Proveedor de CUIT" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__service_type +msgid "Service Type" +msgstr "Tipo de Servicio" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_connection__afip_ws__ws_sr_padron_a10 +msgid "Servicio de Consulta de Padrón Alcance 10" +msgstr "Servicio de Consulta de Padrón Alcance 10" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_connection__afip_ws__ws_sr_padron_a100 +msgid "Servicio de Consulta de Padrón Alcance 100" +msgstr "Servicio de Consulta de Padrón Alcance 100" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_connection__afip_ws__ws_sr_padron_a4 +msgid "Servicio de Consulta de Padrón Alcance 4" +msgstr "Servicio de Consulta de Padrón Alcance 4" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_connection__afip_ws__ws_sr_padron_a5 +msgid "Servicio de Consulta de Padrón Alcance 5" +msgstr "Servicio de Consulta de Padrón Alcance 5" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__sign +msgid "Sign" +msgstr "Firma" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__state +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__state_id +msgid "State" +msgstr "Estado" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__state +msgid "Status" +msgstr "Estado" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__service_type__outsourced +msgid "Subcontratado" +msgstr "Subcontratado" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_certificate_alias.py:0 +#, python-format +msgid "The Common Name must be lower than 50 characters long" +msgstr "El Nombre Común debe tener una longitud menor a 50 caracteres" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_connection.py:0 +#, python-format +msgid "This method is for %s connections and you call it from an %s connection" +msgstr "" +"Este método es para las conexiones %s y puede llamarla desde una conexión %s" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/res_company.py:0 +#, python-format +msgid "" +"Tiene más de un certificado de \"%s\" confirmado. Por favor deje un solo " +"certificado de \"%s\" confirmado." +msgstr "" +"Tiene más de un certificado de \"%s\" confirmado. Por favor deje un solo " +"certificado de \"%s\" confirmado." + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_filter +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_tree +msgid "Tipo" +msgstr "Tipo" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Tipo de Servicio" +msgstr "Tipo de Servicio" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_form +msgid "To Draft" +msgstr "A Borrador" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__token +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +msgid "Token" +msgstr "Token" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__type +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__type +msgid "Type" +msgstr "Tipo" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__uniqueid +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +msgid "Unique ID" +msgstr "ID Único" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_certificate.py:0 +#, python-format +msgid "" +"Unknown error.\n" +"X509 return this message:\n" +" %s" +msgstr "" +"Error desconocido.\n" +"X509 devolvió este mensaje:\n" +" %s" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__certificate_file +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_upload_certificate_form +msgid "Upload Certificate" +msgstr "Subir Certificado" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Volver a Borrador" +msgstr "Volver a Borrador" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_connection.py:0 +#, python-format +msgid "Webservice %s not supported" +msgstr "El Webservice %s no está soportado" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_certificate.py:0 +#, python-format +msgid "" +"Wrong Certificate file format.\n" +"Be sure you have BEGIN CERTIFICATE string in your first line." +msgstr "" +"Formato de archivo del Certificado es Incorrecto.\n" +"Asegúrese de tener el texto BEGIN CERTIFICATE en la primera línea." + +#. module: l10n_ar_afipws +#: model:ir.model,name:l10n_ar_afipws.model_afipws_certificate +msgid "afipws.certificate" +msgstr "afipws.certificate" + +#. module: l10n_ar_afipws +#: model:ir.model,name:l10n_ar_afipws.model_afipws_upload_certificate_wizard +msgid "afipws.upload_certificate.wizard" +msgstr "afipws.upload_certificate.wizard" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_upload_certificate_form +msgid "or" +msgstr "o" diff --git a/l10n_ar_afipws/i18n/l10n_ar_afipws.pot b/l10n_ar_afipws/i18n/l10n_ar_afipws.pot new file mode 100644 index 00000000..5ee55dab --- /dev/null +++ b/l10n_ar_afipws/i18n/l10n_ar_afipws.pot @@ -0,0 +1,680 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_ar_afipws +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,help:l10n_ar_afipws.field_afipws_certificate__state +msgid "" +"* The 'Draft' state is used when a user is creating a new pair key. Warning: everybody can see the key.\n" +"* The 'Confirmed' state is used when a certificate is valid.\n" +"* The 'Canceled' state is used when the key is not more used. You cant use this key again." +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,help:l10n_ar_afipws.field_afipws_certificate_alias__state +msgid "" +"* The 'Draft' state is used when a user is creating a new pair key. Warning: everybody can see the key.\n" +"* The 'Confirmed' state is used when the key is completed with public or private key.\n" +"* The 'Canceled' state is used when the key is not more used. You cant use this key again." +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.res_config_settings_view_form +msgid "" +"AFIP Web Services\n" +" " +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.actions.act_window,name:l10n_ar_afipws.act_afipws_certificate_alias +msgid "AFIP Certificado" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_filter +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_tree +msgid "AFIP Certificados" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_tree +msgid "AFIP Certificates" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +msgid "AFIP Conector" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.actions.act_window,name:l10n_ar_afipws.act_afipws_auth +msgid "AFIP Connections" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +msgid "AFIP Connector" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model,name:l10n_ar_afipws.model_afipws_certificate_alias +msgid "AFIP Distingish Name / Alias" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__afip_login_url +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +msgid "AFIP Login URL" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +msgid "AFIP Servers" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__afip_ws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +msgid "AFIP WS" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.actions.act_window,name:l10n_ar_afipws.action_upload_certificate +msgid "AFIP WS - Upload Certificate" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model,name:l10n_ar_afipws.model_afipws_connection +msgid "AFIP WS Connection" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_company__afip_ws_env_type +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_config_settings__afip_ws_env_type +msgid "AFIP WS Environment" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__afip_ws_url +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +msgid "AFIP WS URL" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.ui.menu,name:l10n_ar_afipws.menu_afipws +msgid "AFIP Web Services" +msgstr "" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_connection.py:0 +#, python-format +msgid "AFIP Webservice %s not implemented yet" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_company__alias_ids +msgid "Aliases" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.res_config_settings_view_form +msgid "Argentina Localization" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__state__draft +msgid "Borrador" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__cuit +msgid "CUIT" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "CUIT de la Compañía" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_upload_certificate_form +msgid "Cancel" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__state__cancel +msgid "Cancelado" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Cancelar" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate__state__cancel +msgid "Cancelled" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Ceritificados" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.ui.menu,name:l10n_ar_afipws.menu_action_afipws_certificate_alias +msgid "Certificados" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__crt +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__certificate_id +msgid "Certificate" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__alias_id +msgid "Certificate Alias" +msgstr "" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_certificate.py:0 +#, python-format +msgid "Certificate Alias must be confirmed first!" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,help:l10n_ar_afipws.field_afipws_certificate__csr +msgid "Certificate Request in PEM format." +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,help:l10n_ar_afipws.field_afipws_certificate__crt +msgid "Certificate in PEM format." +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__certificate_ids +msgid "Certificates" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__city +msgid "City" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Ciudad" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__common_name +msgid "Common Name" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model,name:l10n_ar_afipws.model_res_company +msgid "Companies" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__company_id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__company_id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__company_id +msgid "Company" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__company_cuit +msgid "Company CUIT" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_filter +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_tree +msgid "Compañía" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.ui.menu,name:l10n_ar_afipws.menu_action_afipws_auth +msgid "Conexiones" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model,name:l10n_ar_afipws.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_upload_certificate_form +msgid "Confirm" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Confirm and generate Key" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__state__confirmed +msgid "Confirmado" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Confirmar" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate__state__confirmed +msgid "Confirmed" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_company__connection_ids +msgid "Connections" +msgstr "" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/res_company.py:0 +#, python-format +msgid "Could not connect. This is the what we received: %s" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__country_id +msgid "Country" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Crear Solicitud de Certificado" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__create_uid +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__create_uid +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__create_uid +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__create_uid +msgid "Created by" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__create_date +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__create_date +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__create_date +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__create_date +msgid "Created on" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__department +msgid "Department" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__display_name +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__display_name +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__display_name +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__display_name +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_company__display_name +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_config_settings__display_name +msgid "Display Name" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__request_file +msgid "Download Signed Certificate Request" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate__state__draft +msgid "Draft" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__service_type__in_house +msgid "En Casa" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,help:l10n_ar_afipws.field_res_company__afip_ws_env_type +#: model:ir.model.fields,help:l10n_ar_afipws.field_res_config_settings__afip_ws_env_type +msgid "" +"Environment is used to connect AFIP Web Services.\n" +"Production: This is the connection used in real world.\n" +"Homologation: Use this environment to test AFIP Web Services." +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_filter +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_tree +msgid "Estado" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__expirationtime +msgid "Expiration Time" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +msgid "Fecha de Expiración" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +msgid "Fecha de Generación" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__request_filename +msgid "Filename" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +msgid "Firma" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__generationtime +msgid "Generation Time" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__type__homologation +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_connection__type__homologation +msgid "Homologación" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__res_company__afip_ws_env_type__homologation +msgid "Homologation" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_company__id +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_config_settings__id +msgid "ID" +msgstr "" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_certificate.py:0 +#, python-format +msgid "Invalid action! Please, set the certification string to continue." +msgstr "" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_certificate.py:0 +#, python-format +msgid "" +"Invalid action! Your certificate string is invalid. Check if you forgot the " +"header CERTIFICATE or forgot/ append end of lines." +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,help:l10n_ar_afipws.field_afipws_certificate_alias__common_name +msgid "Just a name, you can leave it this way" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Key" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate____last_update +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias____last_update +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection____last_update +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard____last_update +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_company____last_update +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_res_config_settings____last_update +msgid "Last Modified on" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__write_uid +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__write_uid +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__write_uid +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__write_date +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__write_date +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__write_date +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__write_date +msgid "Last Updated on" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_filter +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_tree +msgid "Nombre Común" +msgstr "" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/res_company.py:0 +#, python-format +msgid "Not confirmed certificate for %s on company %s" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "País" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__key +msgid "Private Key" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__type__production +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_connection__type__production +msgid "Producción" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__res_company__afip_ws_env_type__production +msgid "Production" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Provincia" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__csr +msgid "Request Certificate" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__service_provider_cuit +msgid "Service Provider CUIT" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__service_type +msgid "Service Type" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_connection__afip_ws__ws_sr_padron_a10 +msgid "Servicio de Consulta de Padrón Alcance 10" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_connection__afip_ws__ws_sr_padron_a100 +msgid "Servicio de Consulta de Padrón Alcance 100" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_connection__afip_ws__ws_sr_padron_a4 +msgid "Servicio de Consulta de Padrón Alcance 4" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_connection__afip_ws__ws_sr_padron_a5 +msgid "Servicio de Consulta de Padrón Alcance 5" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__sign +msgid "Sign" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate__state +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__state_id +msgid "State" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__state +msgid "Status" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields.selection,name:l10n_ar_afipws.selection__afipws_certificate_alias__service_type__outsourced +msgid "Subcontratado" +msgstr "" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_certificate_alias.py:0 +#, python-format +msgid "The Common Name must be lower than 50 characters long" +msgstr "" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_connection.py:0 +#, python-format +msgid "" +"This method is for %s connections and you call it from an %s connection" +msgstr "" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/res_company.py:0 +#, python-format +msgid "" +"Tiene más de un certificado de \"%s\" confirmado. Por favor deje un solo " +"certificado de \"%s\" confirmado." +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_filter +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_tree +msgid "Tipo" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Tipo de Servicio" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_form +msgid "To Draft" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__token +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +msgid "Token" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_certificate_alias__type +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__type +msgid "Type" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_connection__uniqueid +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_auth_tree +msgid "Unique ID" +msgstr "" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_certificate.py:0 +#, python-format +msgid "" +"Unknown error.\n" +"X509 return this message:\n" +" %s" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model.fields,field_description:l10n_ar_afipws.field_afipws_upload_certificate_wizard__certificate_file +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_form +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_upload_certificate_form +msgid "Upload Certificate" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_afipws_certificate_alias_form +msgid "Volver a Borrador" +msgstr "" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_connection.py:0 +#, python-format +msgid "Webservice %s not supported" +msgstr "" + +#. module: l10n_ar_afipws +#: code:addons/l10n_ar_afipws/models/afipws_certificate.py:0 +#, python-format +msgid "" +"Wrong Certificate file format.\n" +"Be sure you have BEGIN CERTIFICATE string in your first line." +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model,name:l10n_ar_afipws.model_afipws_certificate +msgid "afipws.certificate" +msgstr "" + +#. module: l10n_ar_afipws +#: model:ir.model,name:l10n_ar_afipws.model_afipws_upload_certificate_wizard +msgid "afipws.upload_certificate.wizard" +msgstr "" + +#. module: l10n_ar_afipws +#: model_terms:ir.ui.view,arch_db:l10n_ar_afipws.view_upload_certificate_form +msgid "or" +msgstr "" diff --git a/l10n_ar_afipws/models/__init__.py b/l10n_ar_afipws/models/__init__.py new file mode 100644 index 00000000..1ea1f764 --- /dev/null +++ b/l10n_ar_afipws/models/__init__.py @@ -0,0 +1,8 @@ +# For copyright and license notices, see __manifest__.py file in module root +# directory or check the readme files + +from . import afipws_certificate_alias +from . import afipws_certificate +from . import afipws_connection +from . import res_company +from . import res_config_settings diff --git a/l10n_ar_afipws/models/afipws_certificate.py b/l10n_ar_afipws/models/afipws_certificate.py new file mode 100644 index 00000000..6a0f1ac5 --- /dev/null +++ b/l10n_ar_afipws/models/afipws_certificate.py @@ -0,0 +1,145 @@ +# For copyright and license notices, see __manifest__.py file in module root +# directory or check the readme files + + +import logging +from base64 import encodebytes + +from OpenSSL import crypto + +from odoo import _, api, fields, models +from odoo.exceptions import UserError + +_logger = logging.getLogger(__name__) + + +class AfipwsCertificate(models.Model): + _name = "afipws.certificate" + _description = "afipws.certificate" + _rec_name = "alias_id" + + alias_id = fields.Many2one( + "afipws.certificate_alias", + ondelete="cascade", + string="Certificate Alias", + required=True, + auto_join=True, + index=True, + ) + csr = fields.Text( + "Request Certificate", + readonly=True, + states={"draft": [("readonly", False)]}, + help="Certificate Request in PEM format.", + ) + crt = fields.Text( + "Certificate", + readonly=True, + states={"draft": [("readonly", False)]}, + help="Certificate in PEM format.", + ) + state = fields.Selection( + [ + ("draft", "Draft"), + ("confirmed", "Confirmed"), + ("cancel", "Cancelled"), + ], + index=True, + readonly=True, + default="draft", + help="* The 'Draft' state is used when a user is creating a new pair " + "key. Warning: everybody can see the key." + "\n* The 'Confirmed' state is used when a certificate is valid." + "\n* The 'Canceled' state is used when the key is not more used. You " + "cant use this key again.", + ) + request_file = fields.Binary( + "Download Signed Certificate Request", + compute="_compute_request_file", + readonly=True, + store=True, + ) + request_filename = fields.Char( + "Filename", readonly=True, compute="_compute_request_file", store=True + ) + company_id = fields.Many2one( + "res.company", + "Company", + required=True, + states={"draft": [("readonly", False)]}, + readonly=True, + default=lambda self: self.env.user.company_id, + auto_join=True, + index=True, + ) + + @api.depends("csr") + def _compute_request_file(self): + for rec in self.filtered("csr"): + rec.request_filename = "request.csr" + rec.request_file = encodebytes(self.csr.encode("utf-8")) + + def action_to_draft(self): + if self.alias_id.state != "confirmed": + raise UserError(_("Certificate Alias must be confirmed first!")) + self.write({"state": "draft"}) + return True + + def action_cancel(self): + self.write({"state": "cancel"}) + return True + + def action_confirm(self): + self.verify_crt() + self.write({"state": "confirmed"}) + return True + + def verify_crt(self): + """ + Verify if certificate is well formed + """ + for rec in self: + crt = rec.crt + msg = False + + if not crt: + msg = _( + "Invalid action! Please, set the certification string to " + "continue." + ) + certificate = rec.get_certificate() + if certificate is None: + msg = _( + "Invalid action! Your certificate string is invalid. " + "Check if you forgot the header CERTIFICATE or forgot/ " + "append end of lines." + ) + if msg: + raise UserError(msg) + return True + + def get_certificate(self): + """ + Return Certificate object. + """ + self.ensure_one() + if self.crt: + try: + certificate = crypto.load_certificate( + crypto.FILETYPE_PEM, self.crt.encode("ascii") + ) + except Exception as e: + if "Expecting: CERTIFICATE" in e[0]: + raise UserError( + _( + "Wrong Certificate file format.\nBe sure you have " + "BEGIN CERTIFICATE string in your first line." + ) + ) from Exception + else: + raise UserError( + _("Unknown error.\nX509 return this message:\n %s") % (e[0]) + ) from Exception + else: + certificate = None + return certificate diff --git a/l10n_ar_afipws/models/afipws_certificate_alias.py b/l10n_ar_afipws/models/afipws_certificate_alias.py new file mode 100644 index 00000000..44496255 --- /dev/null +++ b/l10n_ar_afipws/models/afipws_certificate_alias.py @@ -0,0 +1,199 @@ +# For copyright and license notices, see __manifest__.py file in module root +# directory or check the readme files + +import logging + +from OpenSSL import crypto + +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + +_logger = logging.getLogger(__name__) + + +class AfipwsCertificateAlias(models.Model): + _name = "afipws.certificate_alias" + _description = "AFIP Distingish Name / Alias" + _rec_name = "common_name" + + common_name = fields.Char( + size=64, + default="AFIP WS", + help="Just a name, you can leave it this way", + states={"draft": [("readonly", False)]}, + readonly=True, + required=True, + ) + key = fields.Text( + "Private Key", + readonly=True, + states={"draft": [("readonly", False)]}, + ) + company_id = fields.Many2one( + "res.company", + "Company", + required=True, + states={"draft": [("readonly", False)]}, + readonly=True, + default=lambda self: self.env.user.company_id, + auto_join=True, + index=True, + ) + country_id = fields.Many2one( + "res.country", + "Country", + states={"draft": [("readonly", False)]}, + readonly=True, + required=True, + ) + state_id = fields.Many2one( + "res.country.state", + "State", + states={"draft": [("readonly", False)]}, + readonly=True, + ) + city = fields.Char( + states={"draft": [("readonly", False)]}, + readonly=True, + required=True, + ) + department = fields.Char( + default="IT", + states={"draft": [("readonly", False)]}, + readonly=True, + required=True, + ) + cuit = fields.Char( + "CUIT", + compute="_compute_cuit", + required=True, + ) + company_cuit = fields.Char( + "Company CUIT", + size=16, + states={"draft": [("readonly", False)]}, + readonly=True, + ) + service_provider_cuit = fields.Char( + "Service Provider CUIT", + size=16, + states={"draft": [("readonly", False)]}, + readonly=True, + ) + certificate_ids = fields.One2many( + "afipws.certificate", + "alias_id", + "Certificates", + states={"cancel": [("readonly", True)]}, + auto_join=True, + ) + service_type = fields.Selection( + [("in_house", "En Casa"), ("outsourced", "Subcontratado")], + default="in_house", + required=True, + readonly=True, + states={"draft": [("readonly", False)]}, + ) + state = fields.Selection( + [ + ("draft", "Borrador"), + ("confirmed", "Confirmado"), + ("cancel", "Cancelado"), + ], + "Status", + index=True, + readonly=True, + default="draft", + help="* The 'Draft' state is used when a user is creating a new pair " + "key. Warning: everybody can see the key." + "\n* The 'Confirmed' state is used when the key is completed with " + "public or private key." + "\n* The 'Canceled' state is used when the key is not more used. " + "You cant use this key again.", + ) + type = fields.Selection( + [("production", "Producción"), ("homologation", "Homologación")], + required=True, + default="production", + readonly=True, + states={"draft": [("readonly", False)]}, + ) + + @api.onchange("company_id") + def change_company_name(self): + if self.company_id: + common_name = "AFIP WS %s - %s" % (self.type, self.company_id.name) + self.common_name = common_name[:50] + + @api.depends("company_cuit", "service_provider_cuit", "service_type") + def _compute_cuit(self): + for rec in self: + if rec.service_type == "outsourced": + rec.cuit = rec.service_provider_cuit + else: + rec.cuit = rec.company_cuit + + @api.onchange("company_id") + def change_company_id(self): + if self.company_id: + self.country_id = self.company_id.country_id.id + self.state_id = self.company_id.state_id.id + self.city = self.company_id.city + self.company_cuit = self.company_id.vat + + def action_confirm(self): + if not self.key: + self.generate_key() + self.write({"state": "confirmed"}) + return True + + def generate_key(self, key_length=2048): + """Generates a private key with pyafipws""" + for rec in self: + k = crypto.PKey() + k.generate_key(crypto.TYPE_RSA, key_length) + rec.key = crypto.dump_privatekey(crypto.FILETYPE_PEM, k) + + def action_to_draft(self): + self.write({"state": "draft"}) + return True + + def action_cancel(self): + self.write({"state": "cancel"}) + self.certificate_ids.write({"state": "cancel"}) + return True + + def action_create_certificate_request(self): + """Generates a certificate request to ask AFIP for the certificate""" + for record in self: + req = crypto.X509Req() + req.get_subject().C = self.country_id.code.encode("ascii", "ignore") + if self.state_id: + req.get_subject().ST = self.state_id.name.encode("ascii", "ignore") + req.get_subject().L = self.city.encode("ascii", "ignore") + req.get_subject().O = self.company_id.name.encode( # noqa: E741 + "ascii", "ignore" + ) + req.get_subject().OU = self.department.encode("ascii", "ignore") + req.get_subject().CN = self.common_name.encode("ascii", "ignore") + req.get_subject().serialNumber = "CUIT %s" % self.cuit.encode( + "ascii", "ignore" + ) + k = crypto.load_privatekey(crypto.FILETYPE_PEM, self.key) + self.key = crypto.dump_privatekey(crypto.FILETYPE_PEM, k) + req.set_pubkey(k) + req.sign(k, "sha256") + csr = crypto.dump_certificate_request(crypto.FILETYPE_PEM, req) + vals = { + "csr": csr, + "alias_id": record.id, + } + self.certificate_ids.create(vals) + return True + + @api.constrains("common_name") + def check_common_name_len(self): + if self.filtered(lambda x: x.common_name and len(x.common_name) > 50): + raise ValidationError( + _("The Common Name must be lower than 50 characters long") + ) diff --git a/l10n_ar_afipws/models/afipws_connection.py b/l10n_ar_afipws/models/afipws_connection.py new file mode 100644 index 00000000..67ad4d7f --- /dev/null +++ b/l10n_ar_afipws/models/afipws_connection.py @@ -0,0 +1,171 @@ +# For copyright and license notices, see __manifest__.py file in module root +# directory or check the readme files + + +import logging + +from odoo import _, api, fields, models +from odoo.exceptions import UserError + +_logger = logging.getLogger(__name__) + + +class AfipwsConnection(models.Model): + + _name = "afipws.connection" + _description = "AFIP WS Connection" + _rec_name = "afip_ws" + _order = "expirationtime desc" + + company_id = fields.Many2one( + "res.company", + "Company", + required=True, + index=True, + auto_join=True, + ) + uniqueid = fields.Char( + "Unique ID", + readonly=True, + ) + token = fields.Text( + readonly=True, + ) + sign = fields.Text( + readonly=True, + ) + generationtime = fields.Datetime("Generation Time", readonly=True) + expirationtime = fields.Datetime("Expiration Time", readonly=True) + afip_login_url = fields.Char( + "AFIP Login URL", + compute="_compute_afip_urls", + ) + afip_ws_url = fields.Char( + "AFIP WS URL", + compute="_compute_afip_urls", + ) + type = fields.Selection( + [("production", "Producción"), ("homologation", "Homologación")], + required=True, + ) + afip_ws = fields.Selection( + [ + ("ws_sr_padron_a4", "Servicio de Consulta de Padrón Alcance 4"), + ("ws_sr_padron_a5", "Servicio de Consulta de Padrón Alcance 5"), + ("ws_sr_padron_a10", "Servicio de Consulta de Padrón Alcance 10"), + ("ws_sr_padron_a100", "Servicio de Consulta de Padrón Alcance 100"), + ], + "AFIP WS", + required=True, + ) + + @api.depends("type", "afip_ws") + def _compute_afip_urls(self): + for rec in self: + rec.afip_login_url = rec.get_afip_login_url(rec.type) + + afip_ws_url = rec.get_afip_ws_url(rec.afip_ws, rec.type) + if rec.afip_ws and not afip_ws_url: + raise UserError(_("Webservice %s not supported") % rec.afip_ws) + rec.afip_ws_url = afip_ws_url + + @api.model + def get_afip_login_url(self, environment_type): + if environment_type == "production": + afip_login_url = "https://wsaa.afip.gov.ar/ws/services/LoginCms" + else: + afip_login_url = "https://wsaahomo.afip.gov.ar/ws/services/LoginCms" + return afip_login_url + + @api.model + def get_afip_ws_url(self, afip_ws, environment_type): + """ + Function to be inherited on each module that add a new webservice + """ + _logger.info("Getting URL for afip ws %s on %s" % (afip_ws, environment_type)) + afip_ws_url = False + if afip_ws == "ws_sr_padron_a4": + if environment_type == "production": + afip_ws_url = ( + "https://aws.afip.gov.ar/sr-padron/webservices/" + "personaServiceA4?wsdl" + ) + else: + afip_ws_url = ( + "https://awshomo.afip.gov.ar/sr-padron/webservices/" + "personaServiceA4?wsdl" + ) + elif afip_ws == "ws_sr_padron_a5": + if environment_type == "production": + afip_ws_url = ( + "https://aws.afip.gov.ar/sr-padron/webservices/" + "personaServiceA5?wsdl" + ) + else: + afip_ws_url = ( + "https://awshomo.afip.gov.ar/sr-padron/webservices/" + "personaServiceA5?wsdl" + ) + return afip_ws_url + + def connect(self): + """Method to be called""" + self.ensure_one() + _logger.info( + "Getting connection to ws %s from libraries on " + "connection id %s" % (self.afip_ws, self.id) + ) + ws = self._get_ws(self.afip_ws) + + # parche por este error que da al consultar por esa opción de homo + # https://groups.google.com/d/msg/pyafipws/Xr08e4ZuMmQ/6iDzXwdJAwAJ + # TODO mejorar ya que probablemente no ande en test pero el tema es + # que en esta parte no tenemos data del env_type + # if self.afip_ws in ['ws_sr_padron_a4', 'ws_sr_padron_a5', 'wsremcarne']: + if self.afip_ws in ["ws_sr_padron_a4", "ws_sr_padron_a5"]: + ws.HOMO = False + + if not ws: + raise UserError( + _("AFIP Webservice %s not implemented yet" % (self.afip_ws)) + ) + # TODO implementar cache y proxy + # create the proxy and get the configuration system parameters: + # cfg = self.pool.get('ir.config_parameter').sudo() + # cache = cfg.get_param(cr, uid, 'pyafipws.cache', context=context) + # proxy = cfg.get_param(cr, uid, 'pyafipws.proxy', context=context) + + wsdl = self.afip_ws_url + + # connect to the webservice and call to the test method + ws.Conectar("", wsdl or "", "", cacert=True) + cuit = self.company_id.vat + ws.Cuit = cuit + ws.Token = self.token + ws.Sign = self.sign + # TODO till this this PR is accepted + ws.Obs = "" + ws.Errores = [] + + _logger.info('Connection getted with url "%s", cuit "%s"' % (wsdl, ws.Cuit)) + return ws + + @api.model + def _get_ws(self, afip_ws): + """ + Method to be inherited + """ + _logger.info("Getting ws %s from libraries " % afip_ws) + ws = False + if afip_ws == "ws_sr_padron_a4": + from pyafipws.ws_sr_padron import WSSrPadronA4 + + ws = WSSrPadronA4() + elif afip_ws == "ws_sr_padron_a5": + from pyafipws.ws_sr_padron import WSSrPadronA5 + + ws = WSSrPadronA5() + # elif afip_ws == 'wsremcarne': + # from pyafipws.wsremcarne import WSRemCarne + # ws = WSRemCarne() + return ws diff --git a/l10n_ar_afipws/models/res_company.py b/l10n_ar_afipws/models/res_company.py new file mode 100644 index 00000000..7fca0ba9 --- /dev/null +++ b/l10n_ar_afipws/models/res_company.py @@ -0,0 +1,245 @@ +# For copyright and license notices, see __manifest__.py file in module root +# directory or check the readme files + +import hashlib +import logging +import os +import sys +import time +import traceback + +import odoo.tools as tools +from odoo import _, api, fields, models +from odoo.exceptions import UserError + +_logger = logging.getLogger(__name__) + + +class ResCompany(models.Model): + + _inherit = "res.company" + + afip_ws_env_type = fields.Selection( + [("homologation", "Homologation"), ("production", "Production")], + string="AFIP WS Environment", + default="production", + help="Environment is used to connect AFIP Web Services.\n" + "Production: This is the connection used in real world.\n" + "Homologation: Use this environment to test AFIP Web Services.", + ) + + alias_ids = fields.One2many( + "afipws.certificate_alias", + "company_id", + "Aliases", + auto_join=True, + ) + connection_ids = fields.One2many( + "afipws.connection", + "company_id", + "Connections", + auto_join=True, + ) + + def get_key_and_certificate(self, environment_type): + """ + Funcion que busca para el environment_type definido, + una clave y un certificado en los siguientes lugares y segun estas + prioridades: + * en el conf del server de odoo + * en registros de esta misma clase + """ + self.ensure_one() + pkey = False + cert = False + msg = False + certificate = self.env["afipws.certificate"].search( + [ + ("alias_id.company_id", "=", self.id), + ("alias_id.type", "=", environment_type), + ("state", "=", "confirmed"), + ] + ) + # to avoid confusion on the user, if more than one certificate found, + # we ask to keep the one he whants to use + if len(certificate) > 1: + raise UserError( + _( + 'Tiene más de un certificado de "%(environment_type)s" confirmado.' + 'Por favor, deje un solo certificado de "%(environment_type)s" confirmado.' + ) + % {"environment_type": environment_type} + ) + if certificate: + pkey = certificate.alias_id.key + cert = certificate.crt + _logger.info("Using DB certificates") + # not certificate on bd, we search on odo conf file + else: + msg = _( + 'Not confirmed certificate for "%(environment_type)s" on company "%(name)s"' + ) % {"environment_type": environment_type, "name": self.name} + pkey_path = False + cert_path = False + if environment_type == "production": + pkey_path = tools.config.get("afip_prod_pkey_file") + cert_path = tools.config.get("afip_prod_cert_file") + else: + pkey_path = tools.config.get("afip_homo_pkey_file") + cert_path = tools.config.get("afip_homo_cert_file") + if pkey_path and cert_path: + try: + if os.path.isfile(pkey_path) and os.path.isfile(cert_path): + with open(pkey_path, "r") as pkey_file: + pkey = pkey_file.read() + with open(cert_path, "r") as cert_file: + cert = cert_file.read() + msg = "Could not find %s or %s files" % (pkey_path, cert_path) + except Exception: + msg = "Could not read %s or %s files" % (pkey_path, cert_path) + else: + _logger.info("Using odoo conf certificates") + if not pkey or not cert: + raise UserError(msg) + return (pkey, cert) + + def get_connection(self, afip_ws): + self.ensure_one() + _logger.info( + "Getting connection for company %s and ws %s" % (self.name, afip_ws) + ) + now = fields.Datetime.now() + environment_type = self.afip_ws_env_type + + connection = self.connection_ids.search( + [ + ("type", "=", environment_type), + ("generationtime", "<=", now), + ("expirationtime", ">", now), + ("afip_ws", "=", afip_ws), + ("company_id", "=", self.id), + ], + limit=1, + ) + if not connection: + connection = self._create_connection(afip_ws, environment_type) + return connection + + def _create_connection(self, afip_ws, environment_type): + """ + This function should be called from get_connection. Not to be used + directyl + TODO ver si podemos usar metodos de pyafipws para esto + """ + self.ensure_one() + _logger.info( + "Creating connection for company %s, environment type %s and ws " + "%s" % (self.name, environment_type, afip_ws) + ) + login_url = self.env["afipws.connection"].get_afip_login_url(environment_type) + pkey, cert = self.get_key_and_certificate(environment_type) + # because pyafipws wsaa loos for "BEGIN RSA PRIVATE KEY" we change key + if pkey.startswith("-----BEGIN PRIVATE KEY-----"): + pkey = pkey.replace(" PRIVATE KEY", " RSA PRIVATE KEY") + auth_data = self.authenticate(afip_ws, cert, pkey, wsdl=login_url) + auth_data.update( + { + "company_id": self.id, + "afip_ws": afip_ws, + "type": environment_type, + } + ) + _logger.info("Successful Connection to AFIP.") + generationtime = auth_data["generationtime"].replace("T", " ") + auth_data["generationtime"] = generationtime[:19] + expirationtime = auth_data["expirationtime"].replace("T", " ") + auth_data["expirationtime"] = expirationtime[:19] + return self.connection_ids.create(auth_data) + + @api.model + def authenticate( + self, + service, + certificate, + private_key, + force=False, + cache="", + wsdl="", + proxy="", + ): + """ + Call AFIP Authentication webservice to get token & sign or error + message + """ + # import AFIP webservice authentication helper: + from pyafipws.wsaa import WSAA + + # create AFIP webservice authentication helper instance: + wsaa = WSAA() + # raise python exceptions on any failure + wsaa.LanzarExcepciones = True + + # five hours + DEFAULT_TTL = 60 * 60 * 5 + + # make md5 hash of the parameter for caching... + fn = ( + "%s.xml" + % hashlib.md5( + (service + certificate + private_key).encode("utf-8") + ).hexdigest() + ) + if cache: + fn = os.path.join(cache, fn) + else: + fn = os.path.join(wsaa.InstallDir, "cache", fn) + + try: + # read the access ticket (if already authenticated) + if ( + not os.path.exists(fn) + or os.path.getmtime(fn) + (DEFAULT_TTL) < time.time() + ): + # access ticket (TA) outdated, create new access request + # ticket (TRA) + tra = wsaa.CreateTRA(service=service, ttl=DEFAULT_TTL) + # cryptographically sing the access ticket + cms = wsaa.SignTRA(tra, certificate, private_key) + # connect to the webservice: + wsaa.Conectar(cache, wsdl, proxy) + # call the remote method + ta = wsaa.LoginCMS(cms) + if not ta: + raise RuntimeError() + # write the access ticket for further consumption + open(fn, "w").write(ta) + else: + # get the access ticket from the previously written file + ta = open(fn, "r").read() + # analyze the access ticket xml and extract the relevant fields + wsaa.AnalizarXml(xml=ta) + token = wsaa.ObtenerTagXml("token") + sign = wsaa.ObtenerTagXml("sign") + expirationTime = wsaa.ObtenerTagXml("expirationTime") + generationTime = wsaa.ObtenerTagXml("generationTime") + uniqueId = wsaa.ObtenerTagXml("uniqueId") + except Exception: + token = sign = None + if wsaa.Excepcion: + # get the exception already parsed by the helper + err_msg = wsaa.Excepcion + else: + # avoid encoding problem when reporting exceptions to the user: + err_msg = traceback.format_exception_only(sys.exc_type, sys.exc_value)[ + 0 + ] + raise UserError( + _("Could not connect. This is the what we received: %s") % (err_msg) + ) from Exception + return { + "uniqueid": uniqueId, + "generationtime": generationTime, + "expirationtime": expirationTime, + "token": token, + "sign": sign, + } diff --git a/l10n_ar_afipws/models/res_config_settings.py b/l10n_ar_afipws/models/res_config_settings.py new file mode 100644 index 00000000..5ce5f3c9 --- /dev/null +++ b/l10n_ar_afipws/models/res_config_settings.py @@ -0,0 +1,13 @@ +# For copyright and license notices, see __manifest__.py file in module root +# directory or check the readme files + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + + _inherit = "res.config.settings" + + afip_ws_env_type = fields.Selection( + related="company_id.afip_ws_env_type", readonly=False + ) diff --git a/l10n_ar_afipws/readme/CONTRIBUTORS.rst b/l10n_ar_afipws/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..f035ffa0 --- /dev/null +++ b/l10n_ar_afipws/readme/CONTRIBUTORS.rst @@ -0,0 +1,5 @@ +- Nimarosa +- ADHOC S.A. +- Modeo Interactive +- Exemax +- Codize diff --git a/l10n_ar_afipws/readme/DESCRIPTION.rst b/l10n_ar_afipws/readme/DESCRIPTION.rst new file mode 100644 index 00000000..94e8ade1 --- /dev/null +++ b/l10n_ar_afipws/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +Integration of Argentinian AFIP Webservices + +Base module for integrtation of the AFIP webservices. diff --git a/l10n_ar_afipws/readme/HISTORY.rst b/l10n_ar_afipws/readme/HISTORY.rst new file mode 100644 index 00000000..d67eb4ba --- /dev/null +++ b/l10n_ar_afipws/readme/HISTORY.rst @@ -0,0 +1,5 @@ +14.0.1.0.0 (2023-01-29) +~~~~~~~~~~~~~~~~~~~~~~~ + +* Refactorizacion completa del modulo y de sus metodos +* Se reformulo toda la UI de generacion de certificados para usar pyafipws para generarlos, la generacion es automatica excepto por la parte de AFIP diff --git a/l10n_ar_afipws/readme/ROADMAP.rst b/l10n_ar_afipws/readme/ROADMAP.rst new file mode 100644 index 00000000..626736eb --- /dev/null +++ b/l10n_ar_afipws/readme/ROADMAP.rst @@ -0,0 +1 @@ +* Utilizar los metodos de pyafipws para generar los certificados, claves y validarlos diff --git a/l10n_ar_afipws/readme/USAGE.rst b/l10n_ar_afipws/readme/USAGE.rst new file mode 100644 index 00000000..11c32e92 --- /dev/null +++ b/l10n_ar_afipws/readme/USAGE.rst @@ -0,0 +1,5 @@ +To use electronic invoice webservices first you need to install pyafipws: + +* Install the necessary libraries and dependencies from https://github.com/reingart/pyafipws +* Use the "main" branch to have access to the full features +* Be sure to install all dependecies of pyafipws before trying to use the modules diff --git a/l10n_ar_afipws/security/ir.model.access.csv b/l10n_ar_afipws/security/ir.model.access.csv new file mode 100644 index 00000000..27dfc40f --- /dev/null +++ b/l10n_ar_afipws/security/ir.model.access.csv @@ -0,0 +1,8 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_afipws_connection_manager,afipws.connection.manager,model_afipws_connection,base.group_user,1,1,1,1 +access_afipws_connection_user,afipws.connection.user,model_afipws_connection,,1,0,0,0 +access_afipws_certificate_alias_manager,afipws.certificate.alias.manager,model_afipws_certificate_alias,base.group_system,1,1,1,1 +access_afipws_certificate_alias_user,afipws.certificate.alias.user,model_afipws_certificate_alias,base.group_user,1,0,0,0 +access_afipws_certificate_manager,afipws.certificate.manager,model_afipws_certificate,base.group_system,1,1,1,1 +access_afipws_certificate_user,afipws.certificate.user,model_afipws_certificate,base.group_user,1,0,0,0 +access_afipws_upload_certificate_wizard_user,l10n_ar_afipws.afipws.upload_certificate.wizard,model_afipws_upload_certificate_wizard,base.group_user,1,1,1,1 diff --git a/l10n_ar_afipws/security/security.xml b/l10n_ar_afipws/security/security.xml new file mode 100644 index 00000000..68fde16c --- /dev/null +++ b/l10n_ar_afipws/security/security.xml @@ -0,0 +1,29 @@ + + + + Afipws Certificate Alias Multi-company + + + + + + [('company_id','child_of',[user.company_id.id])] + + + + Afipws Certificate Multi-company + + + + + + [('company_id','child_of',[user.company_id.id])] + + diff --git a/l10n_ar_afipws/security/security.xml.save b/l10n_ar_afipws/security/security.xml.save new file mode 100644 index 00000000..9371346d --- /dev/null +++ b/l10n_ar_afipws/security/security.xml.save @@ -0,0 +1,22 @@ + + + + Afipws Certificate Alias Multi-company + + + + + + [()] + + + + Afipws Certificate Multi-company + + + + + + [()] + + diff --git a/l10n_ar_afipws/static/description/icon.png b/l10n_ar_afipws/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..bc3bad4fb1aae12563cdfae3aad069a8892c588a GIT binary patch literal 1564 zcmV+%2IKjOP)Px&08mU+MF0Q*S-06(roC6V*j2B+SGLnxv(8zx(pRm$ zShv|%uDw{c+*q^IR;$QPo3K~E|NsC0Sib&N!2MUh{Z+sJ|Ns6~!ueRf`)bDdRlojM zz4-Y4{8_;HrQZDh|NmFL>;M1#$?o}Az3Tq{{#L*L$nN=Az4ceW{8_l)|Nj2q;NZya z_*lL9|Ns2{{{8s={H5Ogqu%>kzWx6G{Qmv@TD|_I-TYX-{a3#K|Ni?}zxV$C`~Cm@ z{{Q{`{rmj;`0Le2RlxpOzW-Lg{#n2J{r~$`zx`Lh`&qyJSiSf7{rvy__5T0=S-Ic; z{Qdp@`uF|%{{8j;|NHFcvH$+~?(4+n-je6iSn1e%SHAOEzx-Cd{aL>B#_#!P$M{&h z`BcIDQ^NiC{rUd?`BuOCTDRcf;NDld-u(LTYQ*>X`SADm*u)0?fCoo?&aE$ z`}*qm_UiWV+VASi=H#aI^3V44-2MLY=ijjT_u=f=bLQEH<=vX(*MsHPW8~PA=+|-L z*ns8DKknF6`uY0l+j{BMdgR=m>(fr#$Z6ciJLS+z@YF%%%sk`CGvLb*x1Jf0dkR&) z@K(L+Sia*{zwf5p{cFYfSF_Pqz3E!I@@U2TRl)I7!~0pb-B-Ba`}gVD;NO+X;`s6E z`1Rla{{Qpu-TL+M?&ZPp?a}My()axN_3zZ@+@1XU>EhUg*@+oajonCRe==i`Xw z;;-1wbn)`xS-RW(`uFG5faTYH?(5Fw+KW}e_GY}@-r?b~*5Bvab==O8-^xz)^WNss zRN~NF;>%qB`}zC-{NvYp+0&%y(QM<)I_cr5>*l-M&UowQrQgLr?CZMY$VB4MKI`DE z?(5U>@XO`m%G$Ci{w%S`LjV${D8wWSo{%}CS0Jj$^t<DDl7o_W%F@4|GyaQvlI_(F%Wme+tnG(b3TgrajB}0007?Nkl1$%`;w#T0m_+gN{mqn+Vl_ z+X99dAu)F$s(}<=1~ozVC_$rv|EqRNQZAOBDKI%(o#hxUe5b`%@9bCEzDab7k^dpe2MS%ty z>nbQHXaa!(7NDz}?CPJfHhAOaZNVig0=+GDb+IYagaOMm27iB7S5X2WWPNr{cA>qU zrKK(*rD+UF0bT*p1c29?HEWUr0=&Gu2&t4_#9(MJ-ONlDKQJ={0s{~rq|$IPLyW1Z zk&6s|;9>*><{lm%QG`@lr7}c1OGZ0O5&$Yd0952iNS$QLXzOd#z)=H74a91oFGHlG zqnj|*fO|T_)M=BaD9K|3O1ObME--5*0~;$VJM{n?)9Ap}C>RC90{{Se@!WOwiV=+f O0000 + + + + + +Modulo Base para los Web Services de AFIP + + + +
+

Modulo Base para los Web Services de AFIP

+ + +

Beta License: AGPL-3 OCA/l10n-argentina Translate me on Weblate Try me on Runboat

+

Integration of Argentinian AFIP Webservices

+

Base module for integrtation of the AFIP webservices.

+

Table of contents

+ +
+

Usage

+

To use electronic invoice webservices first you need to install pyafipws:

+
    +
  • Install the necessary libraries and dependencies from https://github.com/reingart/pyafipws
  • +
  • Use the “main” branch to have access to the full features
  • +
  • Be sure to install all dependecies of pyafipws before trying to use the modules
  • +
+
+
+

Known issues / Roadmap

+
    +
  • Utilizar los metodos de pyafipws para generar los certificados, claves y validarlos
  • +
+
+
+

Changelog

+
+

14.0.1.0.0 (2023-01-29)

+
    +
  • Refactorizacion completa del modulo y de sus metodos
  • +
  • Se reformulo toda la UI de generacion de certificados para usar pyafipws para generarlos, la generacion es automatica excepto por la parte de AFIP
  • +
+
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Nimarosa
  • +
  • ADHOC SA
  • +
  • Moldeo Interactive
  • +
  • Exemax
  • +
  • Codize
  • +
+
+
+

Contributors

+
    +
  • Nimarosa
  • +
  • ADHOC S.A.
  • +
  • Modeo Interactive
  • +
  • Exemax
  • +
  • Codize
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainers:

+

nimarosa ibuioli

+

This module is part of the OCA/l10n-argentina project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/l10n_ar_afipws/views/afipws_certificate_alias_view.xml b/l10n_ar_afipws/views/afipws_certificate_alias_view.xml new file mode 100644 index 00000000..9c06137a --- /dev/null +++ b/l10n_ar_afipws/views/afipws_certificate_alias_view.xml @@ -0,0 +1,116 @@ + + + + + afipws.certificate_alias.form + afipws.certificate_alias + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + afipws.certificate_alias.filter + afipws.certificate_alias + + + + + + + + + + + + afipws.certificate_alias.tree + afipws.certificate_alias + + + + + + + + + + + + AFIP Certificado + ir.actions.act_window + afipws.certificate_alias + tree,form + + + + +
diff --git a/l10n_ar_afipws/views/afipws_certificate_view.xml b/l10n_ar_afipws/views/afipws_certificate_view.xml new file mode 100644 index 00000000..b77e33fc --- /dev/null +++ b/l10n_ar_afipws/views/afipws_certificate_view.xml @@ -0,0 +1,58 @@ + + + + afipws.certificate.form + afipws.certificate + +
+
+
+ + + + + + + + +
+
+
+ + + afipws.certificate.tree + afipws.certificate + + + + + + + +
diff --git a/l10n_ar_afipws/views/afipws_connection_view.xml b/l10n_ar_afipws/views/afipws_connection_view.xml new file mode 100644 index 00000000..ae093151 --- /dev/null +++ b/l10n_ar_afipws/views/afipws_connection_view.xml @@ -0,0 +1,55 @@ + + + + afipws.auth.form + afipws.connection + +
+ + + + + + + + + + + + + + +
+
+
+ + + afipws.auth.tree + afipws.connection + + + + + + + + + + + + + + AFIP Connections + ir.actions.act_window + afipws.connection + tree,form + + + + +
diff --git a/l10n_ar_afipws/views/afipws_menuitem.xml b/l10n_ar_afipws/views/afipws_menuitem.xml new file mode 100644 index 00000000..f419e37e --- /dev/null +++ b/l10n_ar_afipws/views/afipws_menuitem.xml @@ -0,0 +1,11 @@ + + + + + + diff --git a/l10n_ar_afipws/views/res_config_settings.xml b/l10n_ar_afipws/views/res_config_settings.xml new file mode 100644 index 00000000..2c13b9f2 --- /dev/null +++ b/l10n_ar_afipws/views/res_config_settings.xml @@ -0,0 +1,38 @@ + + + + res.config.settings.view.form + res.config.settings + + + +

Argentina Localization

+
+
+
+
+ AFIP Web Services + +
+
+ +
+
+
+
+
+ + + + diff --git a/l10n_ar_afipws/wizard/__init__.py b/l10n_ar_afipws/wizard/__init__.py new file mode 100644 index 00000000..a0104520 --- /dev/null +++ b/l10n_ar_afipws/wizard/__init__.py @@ -0,0 +1,4 @@ +# For copyright and license notices, see __manifest__.py file in module root +# directory or check the readme files + +from . import upload_certificate_wizard diff --git a/l10n_ar_afipws/wizard/upload_certificate_view.xml b/l10n_ar_afipws/wizard/upload_certificate_view.xml new file mode 100644 index 00000000..92891b6d --- /dev/null +++ b/l10n_ar_afipws/wizard/upload_certificate_view.xml @@ -0,0 +1,34 @@ + + + + afipws.upload_certificate.wizard.form + afipws.upload_certificate.wizard + +
+ + + + +
+
+
+
+
+ + + AFIP WS - Upload Certificate + ir.actions.act_window + afipws.upload_certificate.wizard + + form + new + +
diff --git a/l10n_ar_afipws/wizard/upload_certificate_wizard.py b/l10n_ar_afipws/wizard/upload_certificate_wizard.py new file mode 100644 index 00000000..34f2551e --- /dev/null +++ b/l10n_ar_afipws/wizard/upload_certificate_wizard.py @@ -0,0 +1,32 @@ +# For copyright and license notices, see __manifest__.py file in module root +# directory or check the readme files + + +import base64 + +from odoo import api, fields, models + + +class L10nArAfipwsUploadCertificate(models.TransientModel): + _name = "afipws.upload_certificate.wizard" + _description = "afipws.upload_certificate.wizard" + + @api.model + def get_certificate(self): + return self.env["afipws.certificate"].browse(self._context.get("active_id")) + + certificate_id = fields.Many2one( + "afipws.certificate", + required=True, + readonly=True, + default=get_certificate, + ondelete="cascade", + ) + certificate_file = fields.Binary("Upload Certificate", required=True) + + def action_confirm(self): + """ """ + self.ensure_one() + self.certificate_id.write({"crt": base64.decodestring(self.certificate_file)}) + self.certificate_id.action_confirm() + return True diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..9cd16292 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +# generated from manifests external_dependencies diff --git a/setup/l10n_ar_afipws/odoo/addons/l10n_ar_afipws b/setup/l10n_ar_afipws/odoo/addons/l10n_ar_afipws new file mode 120000 index 00000000..92e9c534 --- /dev/null +++ b/setup/l10n_ar_afipws/odoo/addons/l10n_ar_afipws @@ -0,0 +1 @@ +../../../../l10n_ar_afipws \ No newline at end of file diff --git a/setup/l10n_ar_afipws/setup.py b/setup/l10n_ar_afipws/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/l10n_ar_afipws/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)