diff --git a/l10n_br_fiscal_comment_product_ean/README.rst b/l10n_br_fiscal_comment_product_ean/README.rst new file mode 100644 index 0000000..382a802 --- /dev/null +++ b/l10n_br_fiscal_comment_product_ean/README.rst @@ -0,0 +1,102 @@ +========================== +Product Ean Fiscal Comment +========================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:738bfec1705ac5d85ea6a41a05d056cf9fbc962096cb6662814b12537929a821 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fkmee--odoo--addons-lightgray.png?logo=github + :target: https://github.com/OCA/kmee-odoo-addons/tree/14.0/l10n_br_fiscal_comment_product_ean + :alt: OCA/kmee-odoo-addons +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/kmee-odoo-addons-14-0/kmee-odoo-addons-14-0-l10n_br_fiscal_comment_product_ean + :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/kmee-odoo-addons&target_branch=14.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows the user to enter the product ean in comment of the +fiscal document. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To add the product ean used in the fiscal document: + +:: + + 1. Go to **Fiscal > Configuration > Operation**. + 2. Enter the main operation of your workflow, edit and reset to draft. + 3. Click on the operation line where you want to insert the product ean comment. + 4. Go to **Extra Info**, click on the field **Comment** and select "Ean". + 5. Save, click on "Review" and "Approval" and save again. + +Usage +===== + +To use this module, you need to: + +:: + + 1. Follow the steps provided in the file "CONFIGURE.md". + 2. Download the fiscal document xml and search for "EAN:", if it appears, the module is working. + +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 +------- + +* KMEE + +Contributors +------------ + +- ``KMEE ``\ \_\_: + + - Bruno Corredato Botti + +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/kmee-odoo-addons `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_br_fiscal_comment_product_ean/__init__.py b/l10n_br_fiscal_comment_product_ean/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/l10n_br_fiscal_comment_product_ean/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/l10n_br_fiscal_comment_product_ean/__manifest__.py b/l10n_br_fiscal_comment_product_ean/__manifest__.py new file mode 100644 index 0000000..4a29e25 --- /dev/null +++ b/l10n_br_fiscal_comment_product_ean/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2024 KMEE +# License LGPL-3 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Product Ean Fiscal Comment", + "version": "14.0.1.0.0", + "license": "AGPL-3", + "author": "KMEE", + "website": "https://github.com/KMEE/kmee-odoo-addons", + "depends": [ + "l10n_br_fiscal", + ], + "data": [ + "data/prod_ean_fiscal_comment.xml", + ], +} diff --git a/l10n_br_fiscal_comment_product_ean/data/prod_ean_fiscal_comment.xml b/l10n_br_fiscal_comment_product_ean/data/prod_ean_fiscal_comment.xml new file mode 100644 index 0000000..57b3130 --- /dev/null +++ b/l10n_br_fiscal_comment_product_ean/data/prod_ean_fiscal_comment.xml @@ -0,0 +1,9 @@ + + + + Ean + EAN: ${ barcode } + fiscal + l10n_br_fiscal.document.line.mixin + + diff --git a/l10n_br_fiscal_comment_product_ean/models/__init__.py b/l10n_br_fiscal_comment_product_ean/models/__init__.py new file mode 100644 index 0000000..9f5fe50 --- /dev/null +++ b/l10n_br_fiscal_comment_product_ean/models/__init__.py @@ -0,0 +1 @@ +from . import document_fiscal_line_mixin diff --git a/l10n_br_fiscal_comment_product_ean/models/document_fiscal_line_mixin.py b/l10n_br_fiscal_comment_product_ean/models/document_fiscal_line_mixin.py new file mode 100644 index 0000000..4d3b04b --- /dev/null +++ b/l10n_br_fiscal_comment_product_ean/models/document_fiscal_line_mixin.py @@ -0,0 +1,12 @@ +from odoo import models + + +class FiscalDocumentLineMixinMethods(models.AbstractModel): + _inherit = "l10n_br_fiscal.document.line.mixin.methods" + + def __document_comment_vals(self): + res = super(FiscalDocumentLineMixinMethods, self).__document_comment_vals() + res["barcode"] = ", ".join( + self.account_line_ids.mapped("product_id").mapped("barcode") + ) + return res diff --git a/l10n_br_fiscal_comment_product_ean/readme/CONFIGURE.md b/l10n_br_fiscal_comment_product_ean/readme/CONFIGURE.md new file mode 100644 index 0000000..7aaf244 --- /dev/null +++ b/l10n_br_fiscal_comment_product_ean/readme/CONFIGURE.md @@ -0,0 +1,7 @@ +To add the product ean used in the fiscal document: + + 1. Go to **Fiscal > Configuration > Operation**. + 2. Enter the main operation of your workflow, edit and reset to draft. + 3. Click on the operation line where you want to insert the product ean comment. + 4. Go to **Extra Info**, click on the field **Comment** and select "Ean". + 5. Save, click on "Review" and "Approval" and save again. diff --git a/l10n_br_fiscal_comment_product_ean/readme/CONTRIBUTORS.md b/l10n_br_fiscal_comment_product_ean/readme/CONTRIBUTORS.md new file mode 100644 index 0000000..98374df --- /dev/null +++ b/l10n_br_fiscal_comment_product_ean/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +* `KMEE `__: + + * Bruno Corredato Botti diff --git a/l10n_br_fiscal_comment_product_ean/readme/DESCRIPTION.md b/l10n_br_fiscal_comment_product_ean/readme/DESCRIPTION.md new file mode 100644 index 0000000..d35207a --- /dev/null +++ b/l10n_br_fiscal_comment_product_ean/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This module allows the user to enter the product ean in comment of the fiscal document. diff --git a/l10n_br_fiscal_comment_product_ean/readme/USAGE.md b/l10n_br_fiscal_comment_product_ean/readme/USAGE.md new file mode 100644 index 0000000..d10eaf4 --- /dev/null +++ b/l10n_br_fiscal_comment_product_ean/readme/USAGE.md @@ -0,0 +1,4 @@ +To use this module, you need to: + + 1. Follow the steps provided in the file "CONFIGURE.md". + 2. Download the fiscal document xml and search for "EAN:", if it appears, the module is working. diff --git a/l10n_br_fiscal_comment_product_ean/static/description/index.html b/l10n_br_fiscal_comment_product_ean/static/description/index.html new file mode 100644 index 0000000..b3ef576 --- /dev/null +++ b/l10n_br_fiscal_comment_product_ean/static/description/index.html @@ -0,0 +1,448 @@ + + + + + +Product Ean Fiscal Comment + + + +
+

Product Ean Fiscal Comment

+ + +

Beta License: AGPL-3 OCA/kmee-odoo-addons Translate me on Weblate Try me on Runboat

+

This module allows the user to enter the product ean in comment of the +fiscal document.

+

Table of contents

+ +
+

Configuration

+

To add the product ean used in the fiscal document:

+
+1. Go to **Fiscal > Configuration > Operation**.
+2. Enter the main operation of your workflow, edit and reset to draft.
+3. Click on the operation line where you want to insert the product ean comment.
+4. Go to **Extra Info**, click on the field **Comment** and select "Ean".
+5. Save, click on "Review" and "Approval" and save again.
+
+
+
+

Usage

+

To use this module, you need to:

+
+1. Follow the steps provided in the file "CONFIGURE.md".
+2. Download the fiscal document xml and search for "EAN:", if it appears, the module is working.
+
+
+
+

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

+
    +
  • KMEE
  • +
+
+
+

Contributors

+
    +
  • KMEE <https://www.kmee.com.br>__:
      +
    • Bruno Corredato Botti
    • +
    +
  • +
+
+
+

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/kmee-odoo-addons project on GitHub.

+

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

+
+
+
+ + diff --git a/setup/l10n_br_fiscal_comment_product_ean/odoo/addons/l10n_br_fiscal_comment_product_ean b/setup/l10n_br_fiscal_comment_product_ean/odoo/addons/l10n_br_fiscal_comment_product_ean new file mode 120000 index 0000000..3c2739b --- /dev/null +++ b/setup/l10n_br_fiscal_comment_product_ean/odoo/addons/l10n_br_fiscal_comment_product_ean @@ -0,0 +1 @@ +../../../../l10n_br_fiscal_comment_product_ean \ No newline at end of file diff --git a/setup/l10n_br_fiscal_comment_product_ean/setup.py b/setup/l10n_br_fiscal_comment_product_ean/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/l10n_br_fiscal_comment_product_ean/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)