diff --git a/setup/stock_quant_expiration_date_tree/odoo/addons/stock_quant_expiration_date_tree b/setup/stock_quant_expiration_date_tree/odoo/addons/stock_quant_expiration_date_tree new file mode 120000 index 000000000..01bbc29bf --- /dev/null +++ b/setup/stock_quant_expiration_date_tree/odoo/addons/stock_quant_expiration_date_tree @@ -0,0 +1 @@ +../../../../stock_quant_expiration_date_tree \ No newline at end of file diff --git a/setup/stock_quant_expiration_date_tree/setup.py b/setup/stock_quant_expiration_date_tree/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/stock_quant_expiration_date_tree/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_quant_expiration_date_tree/README.rst b/stock_quant_expiration_date_tree/README.rst new file mode 100644 index 000000000..5e0e06436 --- /dev/null +++ b/stock_quant_expiration_date_tree/README.rst @@ -0,0 +1,84 @@ +================================ +Stock Quant Expiration Date Tree +================================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:79ed76834756e5524f01ec75609bf8d1b2f301a65fac6985238f6fc929c541c8 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fstock--logistics--warehouse-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_quant_expiration_date_tree + :alt: OCA/stock-logistics-warehouse +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_quant_expiration_date_tree + :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/stock-logistics-warehouse&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to display expirations dates on stock quant tree view. + +**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 +~~~~~~~ + +* Xtendoo + +Contributors +~~~~~~~~~~~~ + +* Manuel Calero + +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. + +.. |maintainer-Manuel Calero| image:: https://github.com/Manuel Calero.png?size=40px + :target: https://github.com/Manuel Calero + :alt: Manuel Calero + +Current `maintainer `__: + +|maintainer-Manuel Calero| + +This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_quant_expiration_date_tree/__init__.py b/stock_quant_expiration_date_tree/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/stock_quant_expiration_date_tree/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_quant_expiration_date_tree/__manifest__.py b/stock_quant_expiration_date_tree/__manifest__.py new file mode 100644 index 000000000..72ca865d8 --- /dev/null +++ b/stock_quant_expiration_date_tree/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2021 Xtendoo +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Stock Quant Expiration Date Tree", + "summary": """ + Allows to display expirations dates on stock quant tree view""", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "Xtendoo, Odoo Community Association (OCA)", + "maintainers": ["Manuel Calero"], + "website": "https://github.com/OCA/stock-logistics-warehouse", + "depends": ["stock", "product_expiry"], + "data": ["views/stock_quant.xml"], +} diff --git a/stock_quant_expiration_date_tree/i18n/es.po b/stock_quant_expiration_date_tree/i18n/es.po new file mode 100644 index 000000000..05069a6f8 --- /dev/null +++ b/stock_quant_expiration_date_tree/i18n/es.po @@ -0,0 +1,61 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_quant_expiration_date_tree +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-17 12:31+0000\n" +"PO-Revision-Date: 2024-07-17 12:31+0000\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: stock_quant_expiration_date_tree +#: model:ir.model.fields,field_description:stock_quant_expiration_date_tree.field_stock_quant__alert_date +msgid "Alert Date" +msgstr "Fecha Alerta" + +#. module: stock_quant_expiration_date_tree +#: model:ir.model.fields,field_description:stock_quant_expiration_date_tree.field_stock_quant__use_date +msgid "Best before Date" +msgstr "Consumir Preferentemente" + +#. module: stock_quant_expiration_date_tree +#: model:ir.model.fields,help:stock_quant_expiration_date_tree.field_stock_quant__alert_date +msgid "" +"Date to determine the expired lots and serial numbers using the filter " +"\"Expiration Alerts\"." +msgstr "" +"Fecha para determinar los lotes caducados y los números de serie mediante el" +" filtro\"Alertas de caducidad\"." + +#. module: stock_quant_expiration_date_tree +#: model:ir.model.fields,field_description:stock_quant_expiration_date_tree.field_stock_quant__expiration_date +msgid "Expiration Date" +msgstr "Fecha de caducidad" + +#. module: stock_quant_expiration_date_tree +#: model:ir.model,name:stock_quant_expiration_date_tree.model_stock_quant +msgid "Quants" +msgstr "" + +#. module: stock_quant_expiration_date_tree +#: model:ir.model.fields,help:stock_quant_expiration_date_tree.field_stock_quant__expiration_date +msgid "" +"This is the date on which the goods with this Serial Number may become " +"dangerous and must not be consumed." +msgstr "" + +#. module: stock_quant_expiration_date_tree +#: model:ir.model.fields,help:stock_quant_expiration_date_tree.field_stock_quant__use_date +msgid "" +"This is the date on which the goods with this Serial Number start " +"deteriorating, without being dangerous yet." +msgstr "" +"Ésta es la fecha en la que los bienes con este nº de serie empiezan a " +"deteriorarse, pero sin ser peligroso aún." \ No newline at end of file diff --git a/stock_quant_expiration_date_tree/i18n/stock_quant_expiration_date_tree.pot b/stock_quant_expiration_date_tree/i18n/stock_quant_expiration_date_tree.pot new file mode 100644 index 000000000..5eacd94bd --- /dev/null +++ b/stock_quant_expiration_date_tree/i18n/stock_quant_expiration_date_tree.pot @@ -0,0 +1,57 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_quant_expiration_date_tree +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-17 12:33+0000\n" +"PO-Revision-Date: 2024-07-17 12:33+0000\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: stock_quant_expiration_date_tree +#: model:ir.model.fields,field_description:stock_quant_expiration_date_tree.field_stock_quant__alert_date +msgid "Alert Date" +msgstr "" + +#. module: stock_quant_expiration_date_tree +#: model:ir.model.fields,field_description:stock_quant_expiration_date_tree.field_stock_quant__use_date +msgid "Best before Date" +msgstr "" + +#. module: stock_quant_expiration_date_tree +#: model:ir.model.fields,help:stock_quant_expiration_date_tree.field_stock_quant__alert_date +msgid "" +"Date to determine the expired lots and serial numbers using the filter " +"\"Expiration Alerts\"." +msgstr "" + +#. module: stock_quant_expiration_date_tree +#: model:ir.model.fields,field_description:stock_quant_expiration_date_tree.field_stock_quant__expiration_date +msgid "Expiration Date" +msgstr "" + +#. module: stock_quant_expiration_date_tree +#: model:ir.model,name:stock_quant_expiration_date_tree.model_stock_quant +msgid "Quants" +msgstr "" + +#. module: stock_quant_expiration_date_tree +#: model:ir.model.fields,help:stock_quant_expiration_date_tree.field_stock_quant__expiration_date +msgid "" +"This is the date on which the goods with this Serial Number may become " +"dangerous and must not be consumed." +msgstr "" + +#. module: stock_quant_expiration_date_tree +#: model:ir.model.fields,help:stock_quant_expiration_date_tree.field_stock_quant__use_date +msgid "" +"This is the date on which the goods with this Serial Number start " +"deteriorating, without being dangerous yet." +msgstr "" \ No newline at end of file diff --git a/stock_quant_expiration_date_tree/models/__init__.py b/stock_quant_expiration_date_tree/models/__init__.py new file mode 100644 index 000000000..70f8e6c8d --- /dev/null +++ b/stock_quant_expiration_date_tree/models/__init__.py @@ -0,0 +1 @@ +from . import stock_quant diff --git a/stock_quant_expiration_date_tree/models/stock_quant.py b/stock_quant_expiration_date_tree/models/stock_quant.py new file mode 100644 index 000000000..d7a0df93f --- /dev/null +++ b/stock_quant_expiration_date_tree/models/stock_quant.py @@ -0,0 +1,18 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +# Copyright 2021 Xtendoo - Manuel Calero + +from odoo import fields, models + + +class StockQuant(models.Model): + _inherit = "stock.quant" + + expiration_date = fields.Datetime( + related="lot_id.expiration_date", + ) + use_date = fields.Datetime( + related="lot_id.use_date", + ) + alert_date = fields.Datetime( + related="lot_id.alert_date", + ) diff --git a/stock_quant_expiration_date_tree/readme/CONTRIBUTORS.rst b/stock_quant_expiration_date_tree/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..08a373a66 --- /dev/null +++ b/stock_quant_expiration_date_tree/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Manuel Calero diff --git a/stock_quant_expiration_date_tree/readme/DESCRIPTION.rst b/stock_quant_expiration_date_tree/readme/DESCRIPTION.rst new file mode 100644 index 000000000..ee5923b5b --- /dev/null +++ b/stock_quant_expiration_date_tree/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module allows to display expirations dates on stock quant tree view. diff --git a/stock_quant_expiration_date_tree/static/description/icon.png b/stock_quant_expiration_date_tree/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/stock_quant_expiration_date_tree/static/description/icon.png differ diff --git a/stock_quant_expiration_date_tree/static/description/index.html b/stock_quant_expiration_date_tree/static/description/index.html new file mode 100644 index 000000000..b7c684e75 --- /dev/null +++ b/stock_quant_expiration_date_tree/static/description/index.html @@ -0,0 +1,422 @@ + + + + + +Stock Quant Expiration Date Tree + + + +
+

Stock Quant Expiration Date Tree

+ + +

Beta License: AGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runboat

+

This module allows to display expirations dates on stock quant tree view.

+

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

+
    +
  • Xtendoo
  • +
+
+
+

Contributors

+ +
+
+

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.

+

Current maintainer:

+

Manuel Calero

+

This module is part of the OCA/stock-logistics-warehouse project on GitHub.

+

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

+
+
+
+ + diff --git a/stock_quant_expiration_date_tree/views/stock_quant.xml b/stock_quant_expiration_date_tree/views/stock_quant.xml new file mode 100644 index 000000000..5b0d3a2e4 --- /dev/null +++ b/stock_quant_expiration_date_tree/views/stock_quant.xml @@ -0,0 +1,17 @@ + + + + + stock.quant.tree.editable.inherit + stock.quant + + + + + + + + + +