diff --git a/account_account_tag_code/README.rst b/account_account_tag_code/README.rst index fb92e877b642..9a290025a684 100644 --- a/account_account_tag_code/README.rst +++ b/account_account_tag_code/README.rst @@ -1,10 +1,41 @@ -========================= +======================== Account Account Tag Code -========================= - -This module adds a field 'code' to model 'account.account.tag'. -This field 'code' is useful to search specific tags without having problems with the translations. - +======================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:50f3061630a4b527055e337add900ffefe18dd2f6d443d28ca5008159a11ff0c + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Faccount--financial--tools-lightgray.png?logo=github + :target: https://github.com/OCA/account-financial-tools/tree/17.0/account_account_tag_code + :alt: OCA/account-financial-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_account_tag_code + :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/account-financial-tools&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds a field 'code' to model 'account.account.tag'. This +field 'code' is useful to search specific tags without having problems +with the translations. + +**Table of contents** + +.. contents:: + :local: Bug Tracker =========== @@ -12,7 +43,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -20,17 +51,21 @@ Credits ======= Authors -~~~~~~~ +------- * ForgeFlow Contributors -~~~~~~~~~~~~ +------------ + +- ForgeFlow +- Marina Alapont <> +- `APSL `__: -* Marina Alapont + - Antoni Marroig <> Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -42,6 +77,6 @@ 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. -This module is part of the `OCA/account-financial-tools `_ project on GitHub. +This module is part of the `OCA/account-financial-tools `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_account_tag_code/__manifest__.py b/account_account_tag_code/__manifest__.py index cb1f0bcc8a4a..dcaff4b1cf8b 100644 --- a/account_account_tag_code/__manifest__.py +++ b/account_account_tag_code/__manifest__.py @@ -4,10 +4,10 @@ { "name": "Account Account Tag Code", "summary": "Add a code field to the accounts tags", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "license": "AGPL-3", "author": "ForgeFlow,Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-financial-tools", - "depends": ["account"], + "depends": ["account", "account_usability"], "data": ["views/account_account_tag_views.xml"], } diff --git a/account_account_tag_code/models/account_account_tag.py b/account_account_tag_code/models/account_account_tag.py index 4eea265f58b3..6d6b85b0e906 100644 --- a/account_account_tag_code/models/account_account_tag.py +++ b/account_account_tag_code/models/account_account_tag.py @@ -1,4 +1,4 @@ -from odoo import fields, models +from odoo import api, fields, models class AccountAccountTag(models.Model): @@ -6,10 +6,10 @@ class AccountAccountTag(models.Model): code = fields.Char() - def name_get(self): - res = super().name_get() - name_mapping = dict(res) + @api.depends("code") + def _compute_display_name(self): for tag in self: if tag.code: - name_mapping[tag.id] = "[" + tag.code + "] " + name_mapping[tag.id] - return list(name_mapping.items()) + tag.display_name = f"[{tag.code}] {tag.name}" + else: + tag.display_name = tag.name diff --git a/account_account_tag_code/readme/CONTRIBUTORS.md b/account_account_tag_code/readme/CONTRIBUTORS.md new file mode 100644 index 000000000000..952d6f098116 --- /dev/null +++ b/account_account_tag_code/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- ForgeFlow +- Marina Alapont \<\<\>\> +- [APSL](): + - Antoni Marroig \<\<\>\> diff --git a/account_account_tag_code/readme/DESCRIPTION.md b/account_account_tag_code/readme/DESCRIPTION.md new file mode 100644 index 000000000000..931a9259f051 --- /dev/null +++ b/account_account_tag_code/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module adds a field 'code' to model 'account.account.tag'. +This field 'code' is useful to search specific tags without having problems with the translations. \ No newline at end of file diff --git a/account_account_tag_code/static/description/index.html b/account_account_tag_code/static/description/index.html new file mode 100644 index 000000000000..92a291a14770 --- /dev/null +++ b/account_account_tag_code/static/description/index.html @@ -0,0 +1,124 @@ +
+
+
+

Module name

+

This module was written to extend the functionality of ... to support ... and allow you to ...

+
+
+
+ +
+
+
+

Installation

+
+
+

To install this module, you need to: +

    +
  • ...
  • +
+

+
+
+
+ + + +
+
+
+
+ +
+
+
+

Configuration

+
+
+

To configure this module, you need to: +

    +
  • ...
  • +
+

+
+
+
+ + + +
+
+
+
+ +
+
+
+

Usage

+
+
+

To use this module, you need to: +

    +
  • ...
  • +
+

+

For further information, please visit: +

+

+
+
+
+ + + +
+
+
+
+ +
+
+
+

Known issues / Roadmap

+
+
+

+

    +
  • ...
  • +
+

+
+
+
+ + + +
+
+
+
+ +
+
+
+

Credits

+
+
+

Contributors

+ +
+
+

Maintainer

+

+ This module is maintained by the OCA.
+ 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.
+ To contribute to this module, please visit http://odoo-community.org.
+ +

+
+
+
\ No newline at end of file