diff --git a/account_move_tag/README.rst b/account_move_tag/README.rst new file mode 100644 index 00000000000..8187052ce24 --- /dev/null +++ b/account_move_tag/README.rst @@ -0,0 +1,79 @@ +================ +Account Move Tag +================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:d0ae882a6e997e4ba0e939e2abcbf805d1c4a971aa50a4a33506f462e18518fd + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github + :target: https://github.com/OCA/account-invoicing/tree/17.0/account_move_tag + :alt: OCA/account-invoicing +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-invoicing-17-0/account-invoicing-17-0-account_move_tag + :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-invoicing&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Adds tags to the account move so vendor bills and customer invoices can +be easily distinguished in the accounting journal. + +:: + +**Table of contents** + +.. contents:: + :local: + +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 +------- + +* Codeforward B.V. + +Contributors +------------ + +- Joep Sanders joep.sanders@codeforward.nl + +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-invoicing `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_move_tag/__init__.py b/account_move_tag/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/account_move_tag/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/account_move_tag/__manifest__.py b/account_move_tag/__manifest__.py new file mode 100644 index 00000000000..acde72786c7 --- /dev/null +++ b/account_move_tag/__manifest__.py @@ -0,0 +1,20 @@ +{ + "name": "Account Move Tag", + "summary": """ + Adds tags to the account move so vendor bills and customer invoices can be + easily distinguished in the accounting journal. + """, + "author": "Codeforward B.V., Odoo Community Association (OCA)", + "website": "https://github.com/OCA/account-invoicing", + "category": "Hidden", + "version": "17.0.1.0.0", + "depends": ["account"], + "license": "LGPL-3", + "data": [ + "views/account_move_views.xml", + "views/account_move_line_views.xml", + "views/account_move_tag_views.xml", + "views/account_move_tag_menu_views.xml", + "security/ir.model.access.csv", + ], +} diff --git a/account_move_tag/models/__init__.py b/account_move_tag/models/__init__.py new file mode 100644 index 00000000000..aca94259f17 --- /dev/null +++ b/account_move_tag/models/__init__.py @@ -0,0 +1,3 @@ +from . import account_move_tag +from . import account_move +from . import account_move_line diff --git a/account_move_tag/models/account_move.py b/account_move_tag/models/account_move.py new file mode 100644 index 00000000000..a3b027f2163 --- /dev/null +++ b/account_move_tag/models/account_move.py @@ -0,0 +1,15 @@ +from odoo import fields, models + + +class AccountMove(models.Model): + _inherit = "account.move" + + tag_ids = fields.Many2many( + comodel_name="account.move.tag", + relation="account_move_tag_rel", + column1="move_id", + column2="tag_id", + string="Account Move Tags", + help="Classify and analyze your account move categories " + "like bills, payments, deposits, etc.", + ) diff --git a/account_move_tag/models/account_move_line.py b/account_move_tag/models/account_move_line.py new file mode 100644 index 00000000000..4611c4c80e1 --- /dev/null +++ b/account_move_tag/models/account_move_line.py @@ -0,0 +1,7 @@ +from odoo import fields, models + + +class AccountMoveLine(models.Model): + _inherit = "account.move.line" + + tag_ids = fields.Many2many(related="move_id.tag_ids") diff --git a/account_move_tag/models/account_move_tag.py b/account_move_tag/models/account_move_tag.py new file mode 100644 index 00000000000..7311c336174 --- /dev/null +++ b/account_move_tag/models/account_move_tag.py @@ -0,0 +1,18 @@ +from random import randint + +from odoo import fields, models + + +class Tag(models.Model): + _name = "account.move.tag" + _description = "Account Move Tag" + + def _get_default_color(self): + return randint(1, 11) + + name = fields.Char("Tag Name", required=True, translate=True) + color = fields.Integer(default=_get_default_color) + + _sql_constraints = [ + ("name_uniq", "unique (name)", "Tag name already exists!"), + ] diff --git a/account_move_tag/pyproject.toml b/account_move_tag/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/account_move_tag/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/account_move_tag/readme/CONTRIBUTORS.md b/account_move_tag/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..79373464b18 --- /dev/null +++ b/account_move_tag/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Joep Sanders diff --git a/account_move_tag/readme/DESCRIPTION.md b/account_move_tag/readme/DESCRIPTION.md new file mode 100644 index 00000000000..e4bf10a2382 --- /dev/null +++ b/account_move_tag/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +Adds tags to the account move so vendor bills and customer invoices can be +easily distinguished in the accounting journal. +``` diff --git a/account_move_tag/security/ir.model.access.csv b/account_move_tag/security/ir.model.access.csv new file mode 100644 index 00000000000..6f16d772dad --- /dev/null +++ b/account_move_tag/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_account_move_tag,account_move_tag,model_account_move_tag,base.group_user,1,0,0,0 +access_account_move_tag_manager,account_move_tag manager,model_account_move_tag,account.group_account_manager,1,1,1,1 diff --git a/account_move_tag/static/description/index.html b/account_move_tag/static/description/index.html new file mode 100644 index 00000000000..b0d1dafea4e --- /dev/null +++ b/account_move_tag/static/description/index.html @@ -0,0 +1,426 @@ + + + + + +Account Move Tag + + + +
+

Account Move Tag

+ + +

Beta License: LGPL-3 OCA/account-invoicing Translate me on Weblate Try me on Runboat

+

Adds tags to the account move so vendor bills and customer invoices can +be easily distinguished in the accounting journal.

+
+**Table of contents**
+
+ +
+

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

+
    +
  • Codeforward B.V.
  • +
+
+ +
+

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.

+

This module is part of the OCA/account-invoicing project on GitHub.

+

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

+
+
+
+ + diff --git a/account_move_tag/views/account_move_line_views.xml b/account_move_tag/views/account_move_line_views.xml new file mode 100644 index 00000000000..09ccea7976f --- /dev/null +++ b/account_move_tag/views/account_move_line_views.xml @@ -0,0 +1,29 @@ + + + account.move.line.search.inherit + account.move.line + + + + + + + + + + account.move.line.tree.inherit + account.move.line + + + + + + + + diff --git a/account_move_tag/views/account_move_tag_menu_views.xml b/account_move_tag/views/account_move_tag_menu_views.xml new file mode 100644 index 00000000000..6a245d86d59 --- /dev/null +++ b/account_move_tag/views/account_move_tag_menu_views.xml @@ -0,0 +1,9 @@ + + + diff --git a/account_move_tag/views/account_move_tag_views.xml b/account_move_tag/views/account_move_tag_views.xml new file mode 100644 index 00000000000..0212bc462a0 --- /dev/null +++ b/account_move_tag/views/account_move_tag_views.xml @@ -0,0 +1,47 @@ + + + account.move.tag.view.form + account.move.tag + +
+ +
+
+ + + + + +
+
+
+
+ + + account.move.tag.view.tree + account.move.tag + + + + + + + + + + Tags + account.move.tag + + +

+ Create Account Move Tags +

+ Use Tags to manage and track your invoices (credit card, ...) +

+
+
+
diff --git a/account_move_tag/views/account_move_views.xml b/account_move_tag/views/account_move_views.xml new file mode 100644 index 00000000000..26b2b39cb1e --- /dev/null +++ b/account_move_tag/views/account_move_views.xml @@ -0,0 +1,62 @@ + + + account.move.form + account.move + + + + + + + + + + account.move.select.inherit + account.move + + + + + + + + + + account.invoice.tree.inherit + account.move + + + + + + + + + + account.view.move.tree.inherit + account.move + + + + + + + +