diff --git a/sale_section_stock_move/README.rst b/sale_section_stock_move/README.rst new file mode 100644 index 00000000000..7516a491ae7 --- /dev/null +++ b/sale_section_stock_move/README.rst @@ -0,0 +1,84 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +======================= +sale_section_stock_move +======================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:1a15957a7c317b5ac5c3812ac5ec0227e3470b1cacc0023c2c642ac5178c10a9 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-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%2Fsale--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/sale-workflow/tree/19.0/sale_section_stock_move + :alt: OCA/sale-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/sale-workflow-19-0/sale-workflow-19-0-sale_section_stock_move + :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/sale-workflow&target_branch=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module propagates sale order section information to stock +operations. + +It adds a Sale Section on stock moves from the related sale order line +section, and exposes the section name on stock moves and stock move +lines. + +The section information is available in stock move and stock move line +list views, search filters, group by options, and in the Operations tab +of stock pickings. + +**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 +------- + +* 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/sale-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/sale_section_stock_move/__init__.py b/sale_section_stock_move/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/sale_section_stock_move/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/sale_section_stock_move/__manifest__.py b/sale_section_stock_move/__manifest__.py new file mode 100644 index 00000000000..cfb216bb0d3 --- /dev/null +++ b/sale_section_stock_move/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2026 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +{ + "name": "sale_section_stock_move", + "summary": "Sale section on stock moves", + "version": "19.0.1.0.0", + "category": "Sale", + "website": "https://github.com/OCA/sale-workflow", + "author": "Camptocamp, Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": [ + "sale_stock", + "sale_order_line_section", + ], + "data": [ + "views/stock_picking_views.xml", + ], +} diff --git a/sale_section_stock_move/i18n/fr.po b/sale_section_stock_move/i18n/fr.po new file mode 100644 index 00000000000..d7854fb8e7b --- /dev/null +++ b/sale_section_stock_move/i18n/fr.po @@ -0,0 +1,65 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_section_stock_move +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-04-08 11:50+0000\n" +"PO-Revision-Date: 2026-04-08 11:50+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: sale_section_stock_move +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move__display_name +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move_line__display_name +msgid "Display Name" +msgstr "Nom Affiche" + +#. module: sale_section_stock_move +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move__id +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move_line__id +msgid "ID" +msgstr "ID" + +#. module: sale_section_stock_move +#: model:ir.model,name:sale_section_stock_move.model_stock_move_line +msgid "Product Moves (Stock Move Line)" +msgstr "Mouvements Produit (Ligne Mouvement Stock)" + +#. module: sale_section_stock_move +#: model_terms:ir.ui.view,arch_db:sale_section_stock_move.stock_move_line_view_search +#: model_terms:ir.ui.view,arch_db:sale_section_stock_move.view_move_search +msgid "Sale Order" +msgstr "Commande Client" + +#. module: sale_section_stock_move +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move__sale_section_id +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move_line__sale_section_id +#: model_terms:ir.ui.view,arch_db:sale_section_stock_move.stock_move_line_view_search +#: model_terms:ir.ui.view,arch_db:sale_section_stock_move.view_move_search +msgid "Sale Section" +msgstr "Section Vente" + +#. module: sale_section_stock_move +#: model_terms:ir.ui.view,arch_db:sale_section_stock_move.stock_move_line_view_search +#: model_terms:ir.ui.view,arch_db:sale_section_stock_move.view_move_search +msgid "Section" +msgstr "Section" + +#. module: sale_section_stock_move +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move__sale_section_name +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move_line__sale_section_name +msgid "Section Name" +msgstr "Nom Section" + +#. module: sale_section_stock_move +#: model:ir.model,name:sale_section_stock_move.model_stock_move +msgid "Stock Move" +msgstr "Mouvement Stock" diff --git a/sale_section_stock_move/i18n/sale_section_stock_move.pot b/sale_section_stock_move/i18n/sale_section_stock_move.pot new file mode 100644 index 00000000000..2fc59394a35 --- /dev/null +++ b/sale_section_stock_move/i18n/sale_section_stock_move.pot @@ -0,0 +1,64 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_section_stock_move +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 19.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-04-08 11:50+0000\n" +"PO-Revision-Date: 2026-04-08 11:50+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: sale_section_stock_move +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move__display_name +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move_line__display_name +msgid "Display Name" +msgstr "" + +#. module: sale_section_stock_move +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move__id +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move_line__id +msgid "ID" +msgstr "" + +#. module: sale_section_stock_move +#: model:ir.model,name:sale_section_stock_move.model_stock_move_line +msgid "Product Moves (Stock Move Line)" +msgstr "" + +#. module: sale_section_stock_move +#: model_terms:ir.ui.view,arch_db:sale_section_stock_move.stock_move_line_view_search +#: model_terms:ir.ui.view,arch_db:sale_section_stock_move.view_move_search +msgid "Sale Order" +msgstr "" + +#. module: sale_section_stock_move +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move__sale_section_id +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move_line__sale_section_id +#: model_terms:ir.ui.view,arch_db:sale_section_stock_move.stock_move_line_view_search +#: model_terms:ir.ui.view,arch_db:sale_section_stock_move.view_move_search +msgid "Sale Section" +msgstr "" + +#. module: sale_section_stock_move +#: model_terms:ir.ui.view,arch_db:sale_section_stock_move.stock_move_line_view_search +#: model_terms:ir.ui.view,arch_db:sale_section_stock_move.view_move_search +msgid "Section" +msgstr "" + +#. module: sale_section_stock_move +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move__sale_section_name +#: model:ir.model.fields,field_description:sale_section_stock_move.field_stock_move_line__sale_section_name +msgid "Section Name" +msgstr "" + +#. module: sale_section_stock_move +#: model:ir.model,name:sale_section_stock_move.model_stock_move +msgid "Stock Move" +msgstr "" diff --git a/sale_section_stock_move/models/__init__.py b/sale_section_stock_move/models/__init__.py new file mode 100644 index 00000000000..f800274cd97 --- /dev/null +++ b/sale_section_stock_move/models/__init__.py @@ -0,0 +1,2 @@ +from . import stock_move +from . import stock_move_line diff --git a/sale_section_stock_move/models/stock_move.py b/sale_section_stock_move/models/stock_move.py new file mode 100644 index 00000000000..dda26d284cd --- /dev/null +++ b/sale_section_stock_move/models/stock_move.py @@ -0,0 +1,23 @@ +# Copyright 2026 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class StockMove(models.Model): + _inherit = "stock.move" + + sale_section_id = fields.Many2one( + comodel_name="sale.order.line", + string="Sale Section", + related="sale_line_id.section_id", + store=True, + readonly=True, + index="btree_not_null", + ) + sale_section_name = fields.Text( + string="Section Name", + related="sale_section_id.name", + store=True, + readonly=True, + ) diff --git a/sale_section_stock_move/models/stock_move_line.py b/sale_section_stock_move/models/stock_move_line.py new file mode 100644 index 00000000000..6563df7ee9f --- /dev/null +++ b/sale_section_stock_move/models/stock_move_line.py @@ -0,0 +1,23 @@ +# Copyright 2026 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class StockMoveLine(models.Model): + _inherit = "stock.move.line" + + sale_section_id = fields.Many2one( + comodel_name="sale.order.line", + string="Sale Section", + related="move_id.sale_section_id", + store=True, + readonly=True, + index="btree_not_null", + ) + sale_section_name = fields.Text( + string="Section Name", + related="sale_section_id.name", + store=True, + readonly=True, + ) diff --git a/sale_section_stock_move/pyproject.toml b/sale_section_stock_move/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/sale_section_stock_move/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/sale_section_stock_move/readme/CONTRIBUTOR.rst b/sale_section_stock_move/readme/CONTRIBUTOR.rst new file mode 100644 index 00000000000..8ed3aebaca0 --- /dev/null +++ b/sale_section_stock_move/readme/CONTRIBUTOR.rst @@ -0,0 +1 @@ +* Telmo Santos diff --git a/sale_section_stock_move/readme/DESCRIPTION.md b/sale_section_stock_move/readme/DESCRIPTION.md new file mode 100644 index 00000000000..5d621083406 --- /dev/null +++ b/sale_section_stock_move/readme/DESCRIPTION.md @@ -0,0 +1,7 @@ +This module propagates sale order section information to stock operations. + +It adds a Sale Section on stock moves from the related sale order line section, +and exposes the section name on stock moves and stock move lines. + +The section information is available in stock move and stock move line list views, +search filters, group by options, and in the Operations tab of stock pickings. diff --git a/sale_section_stock_move/static/description/index.html b/sale_section_stock_move/static/description/index.html new file mode 100644 index 00000000000..4b1c06234bd --- /dev/null +++ b/sale_section_stock_move/static/description/index.html @@ -0,0 +1,429 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

sale_section_stock_move

+ +

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

+

This module propagates sale order section information to stock +operations.

+

It adds a Sale Section on stock moves from the related sale order line +section, and exposes the section name on stock moves and stock move +lines.

+

The section information is available in stock move and stock move line +list views, search filters, group by options, and in the Operations tab +of stock pickings.

+

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

+
    +
  • 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/sale-workflow project on GitHub.

+

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

+
+
+
+
+ + diff --git a/sale_section_stock_move/views/stock_picking_views.xml b/sale_section_stock_move/views/stock_picking_views.xml new file mode 100644 index 00000000000..6d953514b16 --- /dev/null +++ b/sale_section_stock_move/views/stock_picking_views.xml @@ -0,0 +1,109 @@ + + + + stock.move + + + + + + + + + + stock.move + + + + + + + + + + stock.move + + + + + + + + + + + + + + stock.move.line + + + + + + + + + + stock.move.line + + + + + + + + + + stock.move.line + + + + + + + + + + + + + + stock.picking + + + + + + + + diff --git a/test-requirements.txt b/test-requirements.txt index e69de29bb2d..9e81da9df57 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -0,0 +1 @@ +odoo-addon-sale_order_line_section @ git+https://github.com/OCA/sale-workflow.git@refs/pull/4260/head#subdirectory=sale_order_line_section