[IMP] company_country: Fix and improve README and error messages
Error messages and module description are improved to be more verbose, and some typos are fixed.pull/1805/head
parent
837369b780
commit
04f83bce85
|
@ -25,8 +25,14 @@ Company Country
|
|||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module allow set a country to main company in order to use the hook of
|
||||
account that install l10n_** based on country of main company.
|
||||
This module allows to set a country to the main company before the ``account``
|
||||
module is installed, so the hook of that module installs the correct
|
||||
``l10n_***`` module.
|
||||
|
||||
This is useful because, if the company isn't already set correctly when the
|
||||
``account`` module is installed, the generic accounting chart will be installed
|
||||
(``l10n_generic_coa``), which may be incorrect depending on your company's
|
||||
country.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
|
@ -38,21 +44,21 @@ Installation
|
|||
|
||||
To install this module, you need to:
|
||||
|
||||
#. Add as depends from your main module.
|
||||
#. Add it as dependency from your main module.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
To configure this module, you need to:
|
||||
|
||||
#. Set the environment variable COUNTRY using 2 letter of ISO 3166 codes.
|
||||
#. Set the environment variable ``COUNTRY`` using a two-letter ISO 3166 code.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
To use this module, you need to:
|
||||
|
||||
#. Just start server installing your main module.
|
||||
#. Just start the server installing your main module.
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
|
@ -103,10 +109,13 @@ promote its widespread use.
|
|||
.. |maintainer-moylop260| image:: https://github.com/moylop260.png?size=40px
|
||||
:target: https://github.com/moylop260
|
||||
:alt: moylop260
|
||||
.. |maintainer-luisg123v| image:: https://github.com/luisg123v.png?size=40px
|
||||
:target: https://github.com/luisg123v
|
||||
:alt: luisg123v
|
||||
|
||||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-moylop260|
|
||||
|maintainer-moylop260| |maintainer-luisg123v|
|
||||
|
||||
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/13.0/company_country>`_ project on GitHub.
|
||||
|
||||
|
|
|
@ -13,56 +13,17 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model,name:company_country.model_company_country_config_settings
|
||||
msgid "Company Country Configuration Settings"
|
||||
msgstr ""
|
||||
|
||||
#. module: company_country
|
||||
#: code:addons/company_country/models/res_config.py:0
|
||||
#, python-format
|
||||
msgid "Country code %s not found. Use ISO 3166 codes 2 letters"
|
||||
msgstr ""
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings__create_uid
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings__create_date
|
||||
msgid "Created on"
|
||||
msgstr ""
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings__display_name
|
||||
msgid "Display Name"
|
||||
msgid ""
|
||||
"COUNTRY environment variable with country code is not set and no "
|
||||
"localization module is marked to be installed."
|
||||
msgstr ""
|
||||
|
||||
#. module: company_country
|
||||
#: code:addons/company_country/models/res_config.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Error COUNTRY environment variable with country code not defined and no "
|
||||
"localization found in pool."
|
||||
msgstr ""
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr ""
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings__write_date
|
||||
msgid "Last Updated on"
|
||||
"Country code %s was not found. Please use a valid two-letter ISO 3166 code."
|
||||
msgstr ""
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * company_country
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2020-02-15 15:13+0000\n"
|
||||
"Last-Translator: Jesús Alan Ramos Rodríguez <alan.ramos@jarsa.com.mx>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: es_MX\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 3.10\n"
|
||||
|
||||
#. module: company_country
|
||||
#: code:addons/company_country/models/res_config.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"COUNTRY environment variable with country code is not set and no "
|
||||
"localization module is marked to be installed."
|
||||
msgstr ""
|
||||
|
||||
#. module: company_country
|
||||
#: code:addons/company_country/models/res_config.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Country code %s was not found. Please use a valid two-letter ISO 3166 code."
|
||||
msgstr ""
|
|
@ -1,74 +0,0 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * company_country
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2020-02-15 15:13+0000\n"
|
||||
"Last-Translator: Jesús Alan Ramos Rodríguez <alan.ramos@jarsa.com.mx>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: es_MX\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 3.10\n"
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model,name:company_country.model_company_country_config_settings
|
||||
msgid "Company Country Configuration Settings"
|
||||
msgstr "Ajustes de configuración del país de la empresa"
|
||||
|
||||
#. module: company_country
|
||||
#: code:addons/company_country/models/res_config.py:0
|
||||
#, python-format
|
||||
msgid "Country code %s not found. Use ISO 3166 codes 2 letters"
|
||||
msgstr ""
|
||||
"Código de país %s no encontrado. Utilice los códigos ISO 3166 de 2 letras"
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings__create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Creado por"
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings__create_date
|
||||
msgid "Created on"
|
||||
msgstr "Creado en"
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nombre para Mostrar"
|
||||
|
||||
#. module: company_country
|
||||
#: code:addons/company_country/models/res_config.py:0
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Error COUNTRY environment variable with country code not defined and no "
|
||||
"localization found in pool."
|
||||
msgstr ""
|
||||
"Error la variable de entorno COUNTRY con código de país no definida y no se "
|
||||
"encontró localización en el grupo."
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Última Modificación el"
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Última Modificación por"
|
||||
|
||||
#. module: company_country
|
||||
#: model:ir.model.fields,field_description:company_country.field_company_country_config_settings__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Última Modificación en"
|
|
@ -36,8 +36,9 @@ class CompanyCountryConfigSettings(models.AbstractModel):
|
|||
if not l10n_to_install:
|
||||
raise ValidationError(
|
||||
_(
|
||||
"Error COUNTRY environment variable with country code "
|
||||
"not defined and no localization found in pool."
|
||||
"COUNTRY environment variable with country code is not "
|
||||
"set and no localization module is marked to be "
|
||||
"installed."
|
||||
)
|
||||
)
|
||||
country_code = l10n_to_install.name.split("l10n_")[1][:2].upper()
|
||||
|
@ -47,6 +48,9 @@ class CompanyCountryConfigSettings(models.AbstractModel):
|
|||
)
|
||||
if not country:
|
||||
raise ValidationError(
|
||||
_("Country code %s not found. Use ISO 3166 codes 2 letters")
|
||||
_(
|
||||
"Country code %s was not found. Please use a valid two-letter "
|
||||
"ISO 3166 code."
|
||||
)
|
||||
)
|
||||
self.env.ref("base.main_company").write({"country_id": country.id})
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
To configure this module, you need to:
|
||||
|
||||
#. Set the environment variable COUNTRY using 2 letter of ISO 3166 codes.
|
||||
#. Set the environment variable ``COUNTRY`` using a two-letter ISO 3166 code.
|
||||
|
|
|
@ -1,2 +1,8 @@
|
|||
This module allow set a country to main company in order to use the hook of
|
||||
account that install l10n_** based on country of main company.
|
||||
This module allows to set a country to the main company before the ``account``
|
||||
module is installed, so the hook of that module installs the correct
|
||||
``l10n_***`` module.
|
||||
|
||||
This is useful because, if the company isn't already set correctly when the
|
||||
``account`` module is installed, the generic accounting chart will be installed
|
||||
(``l10n_generic_coa``), which may be incorrect depending on your company's
|
||||
country.
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
To install this module, you need to:
|
||||
|
||||
#. Add as depends from your main module.
|
||||
#. Add it as dependency from your main module.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
To use this module, you need to:
|
||||
|
||||
#. Just start server installing your main module.
|
||||
#. Just start the server installing your main module.
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
|
|
|
@ -368,8 +368,13 @@ ul.auto-toc {
|
|||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/server-tools/tree/13.0/company_country"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/server-tools-13-0/server-tools-13-0-company_country"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/149/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module allow set a country to main company in order to use the hook of
|
||||
account that install l10n_** based on country of main company.</p>
|
||||
<p>This module allows to set a country to the main company before the <tt class="docutils literal">account</tt>
|
||||
module is installed, so the hook of that module installs the correct
|
||||
<tt class="docutils literal"><span class="pre">l10n_***</span></tt> module.</p>
|
||||
<p>This is useful because, if the company isn’t already set correctly when the
|
||||
<tt class="docutils literal">account</tt> module is installed, the generic accounting chart will be installed
|
||||
(<tt class="docutils literal">l10n_generic_coa</tt>), which may be incorrect depending on your company’s
|
||||
country.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
|
@ -390,21 +395,21 @@ account that install l10n_** based on country of main company.</p>
|
|||
<h1><a class="toc-backref" href="#id1">Installation</a></h1>
|
||||
<p>To install this module, you need to:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Add as depends from your main module.</li>
|
||||
<li>Add it as dependency from your main module.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h1><a class="toc-backref" href="#id2">Configuration</a></h1>
|
||||
<p>To configure this module, you need to:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Set the environment variable COUNTRY using 2 letter of ISO 3166 codes.</li>
|
||||
<li>Set the environment variable <tt class="docutils literal">COUNTRY</tt> using a two-letter ISO 3166 code.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#id3">Usage</a></h1>
|
||||
<p>To use this module, you need to:</p>
|
||||
<ol class="arabic simple">
|
||||
<li>Just start server installing your main module.</li>
|
||||
<li>Just start the server installing your main module.</li>
|
||||
</ol>
|
||||
<a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/149/13.0"><img alt="Try me on Runbot" src="https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas" /></a>
|
||||
</div>
|
||||
|
@ -428,6 +433,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||
<h2><a class="toc-backref" href="#id7">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Moisés López <<a class="reference external" href="mailto:moylop260@vauxoo.com">moylop260@vauxoo.com</a>></li>
|
||||
<li>Luis González <<a class="reference external" href="mailto:lgonzalez@vauxoo.com">lgonzalez@vauxoo.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="other-credits">
|
||||
|
@ -441,8 +447,8 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||
<p>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.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external" href="https://github.com/moylop260"><img alt="moylop260" src="https://github.com/moylop260.png?size=40px" /></a></p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
|
||||
<p><a class="reference external" href="https://github.com/moylop260"><img alt="moylop260" src="https://github.com/moylop260.png?size=40px" /></a> <a class="reference external" href="https://github.com/luisg123v"><img alt="luisg123v" src="https://github.com/luisg123v.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/13.0/company_country">OCA/server-tools</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue