mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
82
account_account_tag_code/README.rst
Normal file
82
account_account_tag_code/README.rst
Normal file
@@ -0,0 +1,82 @@
|
||||
========================
|
||||
Account Account Tag Code
|
||||
========================
|
||||
|
||||
..
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! 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
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-tools/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 <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_account_tag_code%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
* ForgeFlow
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
- ForgeFlow
|
||||
- Marina Alapont <<marina.alapont@forgeflow.com>>
|
||||
- `APSL <https://www.apsl.tech>`__:
|
||||
|
||||
- Antoni Marroig <<amarroig@apsl.net>>
|
||||
|
||||
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.
|
||||
|
||||
This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/17.0/account_account_tag_code>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
1
account_account_tag_code/__init__.py
Normal file
1
account_account_tag_code/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import models
|
||||
13
account_account_tag_code/__manifest__.py
Normal file
13
account_account_tag_code/__manifest__.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# Copyright 2023 ForgeFlow S.L.
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "Account Account Tag Code",
|
||||
"summary": "Add a code field to the accounts tags",
|
||||
"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", "account_usability"],
|
||||
"data": ["views/account_account_tag_views.xml"],
|
||||
}
|
||||
24
account_account_tag_code/i18n/account_account_tag_code.pot
Normal file
24
account_account_tag_code/i18n/account_account_tag_code.pot
Normal file
@@ -0,0 +1,24 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_account_tag_code
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.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: account_account_tag_code
|
||||
#: model:ir.model,name:account_account_tag_code.model_account_account_tag
|
||||
msgid "Account Tag"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_account_tag_code
|
||||
#: model:ir.model.fields,field_description:account_account_tag_code.field_account_account_tag__code
|
||||
msgid "Code"
|
||||
msgstr ""
|
||||
27
account_account_tag_code/i18n/es.po
Normal file
27
account_account_tag_code/i18n/es.po
Normal file
@@ -0,0 +1,27 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_account_tag_code
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-02-16 21:35+0000\n"
|
||||
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: es\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.17\n"
|
||||
|
||||
#. module: account_account_tag_code
|
||||
#: model:ir.model,name:account_account_tag_code.model_account_account_tag
|
||||
msgid "Account Tag"
|
||||
msgstr "Etiqueta de Cuenta"
|
||||
|
||||
#. module: account_account_tag_code
|
||||
#: model:ir.model.fields,field_description:account_account_tag_code.field_account_account_tag__code
|
||||
msgid "Code"
|
||||
msgstr "Código"
|
||||
27
account_account_tag_code/i18n/it.po
Normal file
27
account_account_tag_code/i18n/it.po
Normal file
@@ -0,0 +1,27 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_account_tag_code
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-02-26 16:36+0000\n"
|
||||
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: it\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.17\n"
|
||||
|
||||
#. module: account_account_tag_code
|
||||
#: model:ir.model,name:account_account_tag_code.model_account_account_tag
|
||||
msgid "Account Tag"
|
||||
msgstr "Etichetta conto"
|
||||
|
||||
#. module: account_account_tag_code
|
||||
#: model:ir.model.fields,field_description:account_account_tag_code.field_account_account_tag__code
|
||||
msgid "Code"
|
||||
msgstr "Codice"
|
||||
1
account_account_tag_code/models/__init__.py
Normal file
1
account_account_tag_code/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import account_account_tag
|
||||
15
account_account_tag_code/models/account_account_tag.py
Normal file
15
account_account_tag_code/models/account_account_tag.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class AccountAccountTag(models.Model):
|
||||
_inherit = "account.account.tag"
|
||||
|
||||
code = fields.Char()
|
||||
|
||||
@api.depends("code")
|
||||
def _compute_display_name(self):
|
||||
for tag in self:
|
||||
if tag.code:
|
||||
tag.display_name = f"[{tag.code}] {tag.name}"
|
||||
else:
|
||||
tag.display_name = tag.name
|
||||
3
account_account_tag_code/pyproject.toml
Normal file
3
account_account_tag_code/pyproject.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
[build-system]
|
||||
requires = ["whool"]
|
||||
build-backend = "whool.buildapi"
|
||||
4
account_account_tag_code/readme/CONTRIBUTORS.md
Normal file
4
account_account_tag_code/readme/CONTRIBUTORS.md
Normal file
@@ -0,0 +1,4 @@
|
||||
- ForgeFlow
|
||||
- Marina Alapont \<\<<marina.alapont@forgeflow.com>\>\>
|
||||
- [APSL](<https://www.apsl.tech>):
|
||||
- Antoni Marroig \<\<<amarroig@apsl.net>\>\>
|
||||
2
account_account_tag_code/readme/DESCRIPTION.md
Normal file
2
account_account_tag_code/readme/DESCRIPTION.md
Normal file
@@ -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.
|
||||
BIN
account_account_tag_code/static/description/icon.png
Normal file
BIN
account_account_tag_code/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
124
account_account_tag_code/static/description/index.html
Normal file
124
account_account_tag_code/static/description/index.html
Normal file
@@ -0,0 +1,124 @@
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Module name</h2>
|
||||
<p>This module was written to extend the functionality of ... to support ... and allow you to ...</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container oe_dark">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Installation</h2>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class="oe_mt32">To install this module, you need to:
|
||||
<ul>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_demo oe_picture oe_screenshot">
|
||||
<a href="https://www.odoo.com/saas_master/demo?lang=en_US&module=crm">
|
||||
<img src="crm_sc_01.png">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Configuration</h2>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class="oe_mt32">To configure this module, you need to:
|
||||
<ul>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_demo oe_picture oe_screenshot">
|
||||
<a href="https://www.odoo.com/saas_master/demo?lang=en_US&module=crm">
|
||||
<img src="crm_sc_01.png">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container oe_dark">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Usage</h2>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class="oe_mt32">To use this module, you need to:
|
||||
<ul>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p class="oe_mt32">For further information, please visit:
|
||||
<ul>
|
||||
<li><a href="https://www.odoo.com/forum/help-1">https://www.odoo.com/forum/help-1</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_demo oe_picture oe_screenshot">
|
||||
<a href="https://www.odoo.com/saas_master/demo?lang=en_US&module=crm">
|
||||
<img src="crm_sc_01.png">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container">
|
||||
<div class="oe_row oe_spaced">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Known issues / Roadmap</h2>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<p class="oe_mt32">
|
||||
<ul>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
<div class="oe_span6">
|
||||
<div class="oe_demo oe_picture oe_screenshot">
|
||||
<a href="https://www.odoo.com/saas_master/demo?lang=en_US&module=crm">
|
||||
<img src="crm_sc_01.png">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="oe_container oe_dark">
|
||||
<div class="oe_row">
|
||||
<div class="oe_span12">
|
||||
<h2 class="oe_slogan">Credits</h2>
|
||||
</div>
|
||||
<div class="oe_span12">
|
||||
<h3>Contributors</h3>
|
||||
<ul>
|
||||
<li>ForgeFlow <<a href="mailto:email.address@example.com">email.address@example.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="oe_span12">
|
||||
<h3>Maintainer</h3>
|
||||
<p>
|
||||
This module is maintained by the OCA.<br/>
|
||||
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.<br/>
|
||||
To contribute to this module, please visit <a href="http://odoo-community.org">http://odoo-community.org</a>.<br/>
|
||||
<a href="http://odoo-community.org"><img class="oe_picture oe_centered" src="http://odoo-community.org/logo.png"></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
1
account_account_tag_code/tests/__init__.py
Normal file
1
account_account_tag_code/tests/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import test_account_tag_display_name
|
||||
@@ -0,0 +1,26 @@
|
||||
# Copyright 2014-2022 Acsone (http://acsone.eu)
|
||||
# Copyright 2016-2022 Akretion (http://www.akretion.com/)
|
||||
# @author Stéphane Bidoul <stephane.bidoul@acsone.eu>
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
class TestAccountTag(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.tag = cls.env["account.account.tag"].create(
|
||||
{
|
||||
"name": "Test Tag Name",
|
||||
}
|
||||
)
|
||||
|
||||
def test_display_name_without_code(self):
|
||||
self.assertEqual(self.tag.display_name, self.tag.name)
|
||||
|
||||
def test_display_name_with_code(self):
|
||||
self.tag.code = "Test"
|
||||
self.assertEqual(self.tag.display_name, f"[{self.tag.code}] {self.tag.name}")
|
||||
24
account_account_tag_code/views/account_account_tag_views.xml
Normal file
24
account_account_tag_code/views/account_account_tag_views.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="account_tag_view_form_code" model="ir.ui.view">
|
||||
<field name="name">account.tag.view.form.code</field>
|
||||
<field name="model">account.account.tag</field>
|
||||
<field name="inherit_id" ref="account.account_tag_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="after">
|
||||
<field name="code" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_tag_view_tree_code" model="ir.ui.view">
|
||||
<field name="name">account.tag.view.tree.code</field>
|
||||
<field name="model">account.account.tag</field>
|
||||
<field name="inherit_id" ref="account.account_tag_view_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="after">
|
||||
<field name="code" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user