diff --git a/calendar_event_link_stock_picking/README.rst b/calendar_event_link_stock_picking/README.rst new file mode 100644 index 00000000..628c2f3e --- /dev/null +++ b/calendar_event_link_stock_picking/README.rst @@ -0,0 +1,77 @@ +==================================== +Calendar Event Link To Stock picking +==================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f7b4e537cd4fb72c4a0d4ee737e6c62818906783834ccdadeb04a9bb82d0e362 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fcalendar-lightgray.png?logo=github + :target: https://github.com/OCA/calendar/tree/18.0/calendar_event_link_stock_picking + :alt: OCA/calendar +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/calendar-18-0/calendar-18-0-calendar_event_link_stock_picking + :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/calendar&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module add a link between stock pickings and calendar events + +**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 +------- + +* INVITU + +Contributors +------------ + +- Souheil Bejaoui +- Cyril VINH-TUNG + +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/calendar `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/calendar_event_link_stock_picking/__init__.py b/calendar_event_link_stock_picking/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/calendar_event_link_stock_picking/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/calendar_event_link_stock_picking/__manifest__.py b/calendar_event_link_stock_picking/__manifest__.py new file mode 100644 index 00000000..0cb13400 --- /dev/null +++ b/calendar_event_link_stock_picking/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2019 ACSONE SA/NV +# Copyright 2024 INVITU +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Calendar Event Link To Stock picking", + "summary": """ + This module add a link between stock pickings and calendar events""", + "version": "18.0.1.0.0", + "license": "AGPL-3", + "author": "INVITU," "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/calendar", + "depends": ["stock", "calendar_event_link_base"], + "data": ["views/stock_picking_views.xml"], + "demo": [], +} diff --git a/calendar_event_link_stock_picking/models/__init__.py b/calendar_event_link_stock_picking/models/__init__.py new file mode 100644 index 00000000..ae4c2722 --- /dev/null +++ b/calendar_event_link_stock_picking/models/__init__.py @@ -0,0 +1 @@ +from . import stock_picking diff --git a/calendar_event_link_stock_picking/models/stock_picking.py b/calendar_event_link_stock_picking/models/stock_picking.py new file mode 100644 index 00000000..f7b2ecb8 --- /dev/null +++ b/calendar_event_link_stock_picking/models/stock_picking.py @@ -0,0 +1,10 @@ +# Copyright 2019 ACSONE SA/NV +# Copyright 2024 INVITU +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class Picking(models.Model): + _name = "stock.picking" + _inherit = ["stock.picking", "calendar.event.link.mixin"] diff --git a/calendar_event_link_stock_picking/pyproject.toml b/calendar_event_link_stock_picking/pyproject.toml new file mode 100644 index 00000000..4231d0cc --- /dev/null +++ b/calendar_event_link_stock_picking/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/calendar_event_link_stock_picking/readme/CONTRIBUTORS.md b/calendar_event_link_stock_picking/readme/CONTRIBUTORS.md new file mode 100644 index 00000000..daa168ed --- /dev/null +++ b/calendar_event_link_stock_picking/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Souheil Bejaoui \<\> +- Cyril VINH-TUNG \<\> diff --git a/calendar_event_link_stock_picking/readme/DESCRIPTION.md b/calendar_event_link_stock_picking/readme/DESCRIPTION.md new file mode 100644 index 00000000..3e4adf3f --- /dev/null +++ b/calendar_event_link_stock_picking/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This module add a link between stock pickings and calendar events diff --git a/calendar_event_link_stock_picking/static/description/icon.png b/calendar_event_link_stock_picking/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/calendar_event_link_stock_picking/static/description/icon.png differ diff --git a/calendar_event_link_stock_picking/static/description/index.html b/calendar_event_link_stock_picking/static/description/index.html new file mode 100644 index 00000000..705acf1f --- /dev/null +++ b/calendar_event_link_stock_picking/static/description/index.html @@ -0,0 +1,424 @@ + + + + + +Calendar Event Link To Stock picking + + + + + + diff --git a/calendar_event_link_stock_picking/tests/test_calendar_picking_link.py b/calendar_event_link_stock_picking/tests/test_calendar_picking_link.py new file mode 100644 index 00000000..1cd9827f --- /dev/null +++ b/calendar_event_link_stock_picking/tests/test_calendar_picking_link.py @@ -0,0 +1,30 @@ +# Copyright 2019 ACSONE SA/NV +# Copyright 2024 INVITU +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase + + +class TestCalendarPickingLink(TransactionCase): + def setUp(self): + super().setUp() + self.picking = self.env["stock.picking"].search([], limit=1) + + def test_calendar_picking_link(self): + calendar_picking_link_action = self.picking.action_show_events() + event = ( + self.env["calendar.event"] + .with_context(**calendar_picking_link_action["context"]) + .create( + { + "name": "picking", + "start": "2019-10-29 10:00:00", + "stop": "2019-10-29 11:00:00", + } + ) + ) + self.assertEqual(self.picking.event_count, 1) + self.assertEqual( + self.env["calendar.event"].search(calendar_picking_link_action["domain"]), + event, + ) diff --git a/calendar_event_link_stock_picking/views/stock_picking_views.xml b/calendar_event_link_stock_picking/views/stock_picking_views.xml new file mode 100644 index 00000000..0f4ee619 --- /dev/null +++ b/calendar_event_link_stock_picking/views/stock_picking_views.xml @@ -0,0 +1,29 @@ + + + + stock.picking + + + + + + + +