diff --git a/l10n_mx_res_partner_csf/README.rst b/l10n_mx_res_partner_csf/README.rst index 29059f8..24cd760 100644 --- a/l10n_mx_res_partner_csf/README.rst +++ b/l10n_mx_res_partner_csf/README.rst @@ -7,7 +7,7 @@ Contact CSF for Mexico !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:e89b7d63cfe2572d8c2deae516c3bf53dd7acd0a59941544170cb6b49c66a5d3 + !! source digest: sha256:ffbec86cbe29b0dc39fdae5051787fd924b2f5688178d64d881f83b539695764 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -37,6 +37,17 @@ information of a partner. .. contents:: :local: +Installation +============ + +This module requires the unaccent extension of PostgreSQL: + +.. code:: sql + + CREATE EXTENSION "unaccent"; + +and ``unaccent=True`` in Odoo configuration file. + Usage ===== diff --git a/l10n_mx_res_partner_csf/readme/INSTALLATION.rst b/l10n_mx_res_partner_csf/readme/INSTALL.md similarity index 66% rename from l10n_mx_res_partner_csf/readme/INSTALLATION.rst rename to l10n_mx_res_partner_csf/readme/INSTALL.md index 99a10e3..5c41c17 100644 --- a/l10n_mx_res_partner_csf/readme/INSTALLATION.rst +++ b/l10n_mx_res_partner_csf/readme/INSTALL.md @@ -1,7 +1,7 @@ This module requires the unaccent extension of PostgreSQL: -.. code-block:: sql - - create extension "unaccent" ; +```sql +CREATE EXTENSION "unaccent"; +``` and `unaccent=True` in Odoo configuration file. diff --git a/l10n_mx_res_partner_csf/security/ir.model.access.csv b/l10n_mx_res_partner_csf/security/ir.model.access.csv index 11a45fb..eb8ba93 100644 --- a/l10n_mx_res_partner_csf/security/ir.model.access.csv +++ b/l10n_mx_res_partner_csf/security/ir.model.access.csv @@ -1,2 +1,2 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_import_csf,import_csf,model_import_csf,,1,1,1,1 +access_import_csf,import_csf,model_import_csf,base.group_partner_manager,1,1,1,1 diff --git a/l10n_mx_res_partner_csf/static/description/index.html b/l10n_mx_res_partner_csf/static/description/index.html index 674ad03..52ce2cb 100644 --- a/l10n_mx_res_partner_csf/static/description/index.html +++ b/l10n_mx_res_partner_csf/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -367,7 +367,7 @@

Contact CSF for Mexico

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:e89b7d63cfe2572d8c2deae516c3bf53dd7acd0a59941544170cb6b49c66a5d3 +!! source digest: sha256:ffbec86cbe29b0dc39fdae5051787fd924b2f5688178d64d881f83b539695764 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This module allows you to upload the proof of tax situation (Constancia @@ -376,19 +376,28 @@

Contact CSF for Mexico

Table of contents

+
+

Installation

+

This module requires the unaccent extension of PostgreSQL:

+
+CREATE EXTENSION "unaccent";
+
+

and unaccent=True in Odoo configuration file.

+
-

Usage

+

Usage

-

Bug Tracker

+

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 @@ -405,15 +414,15 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

-

Contributors

+

Contributors

-

Other credits

+

Other credits

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +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.

diff --git a/l10n_mx_res_partner_csf/wizard/import_csf.py b/l10n_mx_res_partner_csf/wizard/import_csf.py index d17921a..feab984 100644 --- a/l10n_mx_res_partner_csf/wizard/import_csf.py +++ b/l10n_mx_res_partner_csf/wizard/import_csf.py @@ -15,6 +15,7 @@ class ImportCSF(models.TransientModel): _name = "import.csf" + _description = "Import CSF wizard" file = fields.Binary(required=True, attachment=True) file_name = fields.Char() @@ -47,7 +48,7 @@ def upload_csf(self): def prepare_res_partner_values(self, text): state_obj = self.env["res.country.state"] split_data = text.split("\n") - vat = name = zip = city = street = street2 = state = "" + vat = name = zipcode = city = street = street2 = state = "" for index, line in enumerate(split_data): if "CÉDULA DE IDENTIFICACIÓN FISCAL" in line: vat += split_data[index + 2].strip() @@ -58,7 +59,7 @@ def prepare_res_partner_values(self, text): elif split_data[index + 3].isupper(): name += " " + split_data[index + 3].strip() elif "Código Postal" in line: - zip += line.split(":")[-1].strip() + zipcode += line.split(":")[-1].strip() elif "Tipo de Vialidad" in line: street += line.split("Tipo de Vialidad:")[-1].strip() + " " elif "Nombre de Vialidad" in line: @@ -82,7 +83,7 @@ def prepare_res_partner_values(self, text): return { "vat": vat, "name": name, - "zip": zip, + "zip": zipcode, "city": city, "street": street, "street2": street2,