From 463baa7353fafaaa95a21485a427dbe62a35bb4f Mon Sep 17 00:00:00 2001 From: Tran Anh Tuan Date: Fri, 29 Mar 2024 16:31:32 +0700 Subject: [PATCH] [ADD] stock_release_channel_shipment_advice_cash_on_delivery: Add buttons on release channel kanban to print cash on delivery invoices --- ...e_channel_shipment_advice_cash_on_delivery | 1 + .../setup.py | 6 + .../README.rst | 86 ++++ .../__init__.py | 1 + .../__manifest__.py | 21 + .../models/__init__.py | 1 + .../models/stock_release_channel.py | 14 + .../readme/CONTRIBUTORS.rst | 3 + .../readme/CREDITS.rst | 1 + .../readme/DESCRIPTION.rst | 2 + .../static/description/index.html | 430 ++++++++++++++++++ .../views/stock_release_channel.xml | 23 + test-requirements.txt | 1 + 13 files changed, 590 insertions(+) create mode 120000 setup/stock_release_channel_shipment_advice_cash_on_delivery/odoo/addons/stock_release_channel_shipment_advice_cash_on_delivery create mode 100644 setup/stock_release_channel_shipment_advice_cash_on_delivery/setup.py create mode 100644 stock_release_channel_shipment_advice_cash_on_delivery/README.rst create mode 100644 stock_release_channel_shipment_advice_cash_on_delivery/__init__.py create mode 100644 stock_release_channel_shipment_advice_cash_on_delivery/__manifest__.py create mode 100644 stock_release_channel_shipment_advice_cash_on_delivery/models/__init__.py create mode 100644 stock_release_channel_shipment_advice_cash_on_delivery/models/stock_release_channel.py create mode 100644 stock_release_channel_shipment_advice_cash_on_delivery/readme/CONTRIBUTORS.rst create mode 100644 stock_release_channel_shipment_advice_cash_on_delivery/readme/CREDITS.rst create mode 100644 stock_release_channel_shipment_advice_cash_on_delivery/readme/DESCRIPTION.rst create mode 100644 stock_release_channel_shipment_advice_cash_on_delivery/static/description/index.html create mode 100644 stock_release_channel_shipment_advice_cash_on_delivery/views/stock_release_channel.xml create mode 100644 test-requirements.txt diff --git a/setup/stock_release_channel_shipment_advice_cash_on_delivery/odoo/addons/stock_release_channel_shipment_advice_cash_on_delivery b/setup/stock_release_channel_shipment_advice_cash_on_delivery/odoo/addons/stock_release_channel_shipment_advice_cash_on_delivery new file mode 120000 index 00000000000..9161b530b00 --- /dev/null +++ b/setup/stock_release_channel_shipment_advice_cash_on_delivery/odoo/addons/stock_release_channel_shipment_advice_cash_on_delivery @@ -0,0 +1 @@ +../../../../stock_release_channel_shipment_advice_cash_on_delivery \ No newline at end of file diff --git a/setup/stock_release_channel_shipment_advice_cash_on_delivery/setup.py b/setup/stock_release_channel_shipment_advice_cash_on_delivery/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/stock_release_channel_shipment_advice_cash_on_delivery/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_release_channel_shipment_advice_cash_on_delivery/README.rst b/stock_release_channel_shipment_advice_cash_on_delivery/README.rst new file mode 100644 index 00000000000..b6af2c4be9f --- /dev/null +++ b/stock_release_channel_shipment_advice_cash_on_delivery/README.rst @@ -0,0 +1,86 @@ +====================================================== +Stock Release Channel Shipment Advice Cash on Delivery +====================================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:aae17766f9633eb8fcb4a5412e614dc4e8f0ba3cf65a8191d2baafeeb3a1b6ee + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fwms-lightgray.png?logo=github + :target: https://github.com/OCA/wms/tree/16.0/stock_release_channel_shipment_advice_cash_on_delivery + :alt: OCA/wms +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-stock_release_channel_shipment_advice_cash_on_delivery + :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/wms&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows users to print cash on delivery invoices from +a release channel. + +**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 +~~~~~~~ + +* BCIM +* ACSONE SA/NV +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* Jacques-Etienne Baudoux +* Souheil Bejaoui +* Tuan Tran + +Other credits +~~~~~~~~~~~~~ + +The creation of this module was financially supported by Camptocamp. + +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/wms `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_release_channel_shipment_advice_cash_on_delivery/__init__.py b/stock_release_channel_shipment_advice_cash_on_delivery/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/stock_release_channel_shipment_advice_cash_on_delivery/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_release_channel_shipment_advice_cash_on_delivery/__manifest__.py b/stock_release_channel_shipment_advice_cash_on_delivery/__manifest__.py new file mode 100644 index 00000000000..d5ff2de10f2 --- /dev/null +++ b/stock_release_channel_shipment_advice_cash_on_delivery/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2018 Jacques-Etienne Baudoux (BCIM) +# Copyright 2023 ACSONE SA/NV +# Copyright 2024 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Stock Release Channel Shipment Advice Cash on Delivery", + "summary": """This module allows users to print cash on delivery invoices + from a release channel and a shipment advice""", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "BCIM, ACSONE SA/NV, Camptocamp, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/wms", + "depends": [ + "shipment_advice_cash_on_delivery", + "stock_release_channel_shipment_advice", + ], + "data": [ + "views/stock_release_channel.xml", + ], +} diff --git a/stock_release_channel_shipment_advice_cash_on_delivery/models/__init__.py b/stock_release_channel_shipment_advice_cash_on_delivery/models/__init__.py new file mode 100644 index 00000000000..a0504e84078 --- /dev/null +++ b/stock_release_channel_shipment_advice_cash_on_delivery/models/__init__.py @@ -0,0 +1 @@ +from . import stock_release_channel diff --git a/stock_release_channel_shipment_advice_cash_on_delivery/models/stock_release_channel.py b/stock_release_channel_shipment_advice_cash_on_delivery/models/stock_release_channel.py new file mode 100644 index 00000000000..d5ba4acfa09 --- /dev/null +++ b/stock_release_channel_shipment_advice_cash_on_delivery/models/stock_release_channel.py @@ -0,0 +1,14 @@ +# Copyright 2018 Jacques-Etienne Baudoux (BCIM) +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class StockReleaseChannel(models.Model): + _inherit = "stock.release.channel" + + def action_print_cash_on_delivery_invoices(self): + if self.shipment_advice_to_print_ids: + return self.shipment_advice_to_print_ids.print_cash_on_delivery_invoices() + return {} diff --git a/stock_release_channel_shipment_advice_cash_on_delivery/readme/CONTRIBUTORS.rst b/stock_release_channel_shipment_advice_cash_on_delivery/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..e0ae86784fb --- /dev/null +++ b/stock_release_channel_shipment_advice_cash_on_delivery/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Jacques-Etienne Baudoux +* Souheil Bejaoui +* Tuan Tran diff --git a/stock_release_channel_shipment_advice_cash_on_delivery/readme/CREDITS.rst b/stock_release_channel_shipment_advice_cash_on_delivery/readme/CREDITS.rst new file mode 100644 index 00000000000..ac19123b04a --- /dev/null +++ b/stock_release_channel_shipment_advice_cash_on_delivery/readme/CREDITS.rst @@ -0,0 +1 @@ +The creation of this module was financially supported by Camptocamp. diff --git a/stock_release_channel_shipment_advice_cash_on_delivery/readme/DESCRIPTION.rst b/stock_release_channel_shipment_advice_cash_on_delivery/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..6e144bda585 --- /dev/null +++ b/stock_release_channel_shipment_advice_cash_on_delivery/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module allows users to print cash on delivery invoices from +a release channel. diff --git a/stock_release_channel_shipment_advice_cash_on_delivery/static/description/index.html b/stock_release_channel_shipment_advice_cash_on_delivery/static/description/index.html new file mode 100644 index 00000000000..360309c3612 --- /dev/null +++ b/stock_release_channel_shipment_advice_cash_on_delivery/static/description/index.html @@ -0,0 +1,430 @@ + + + + + +Stock Release Channel Shipment Advice Cash on Delivery + + + +
+

Stock Release Channel Shipment Advice Cash on Delivery

+ + +

Beta License: AGPL-3 OCA/wms Translate me on Weblate Try me on Runboat

+

This module allows users to print cash on delivery invoices from +a release channel.

+

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

+
    +
  • BCIM
  • +
  • ACSONE SA/NV
  • +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

The creation of this module was financially supported by Camptocamp.

+
+
+

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/wms project on GitHub.

+

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

+
+
+
+ + diff --git a/stock_release_channel_shipment_advice_cash_on_delivery/views/stock_release_channel.xml b/stock_release_channel_shipment_advice_cash_on_delivery/views/stock_release_channel.xml new file mode 100644 index 00000000000..0aac6a499d0 --- /dev/null +++ b/stock_release_channel_shipment_advice_cash_on_delivery/views/stock_release_channel.xml @@ -0,0 +1,23 @@ + + + + stock.release.channel + + + + + + + + + + diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000000..9a8e1054cb3 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +odoo-addon-shipment-advice-cash-on-delivery @ git+https://github.com/OCA/stock-logistics-transport.git@refs/pull/118/head#subdirectory=setup/shipment_advice_cash_on_delivery