diff --git a/setup/stock_picking_customer_ref/odoo/addons/stock_picking_customer_ref b/setup/stock_picking_customer_ref/odoo/addons/stock_picking_customer_ref new file mode 120000 index 000000000000..c457717f9231 --- /dev/null +++ b/setup/stock_picking_customer_ref/odoo/addons/stock_picking_customer_ref @@ -0,0 +1 @@ +../../../../stock_picking_customer_ref \ No newline at end of file diff --git a/setup/stock_picking_customer_ref/setup.py b/setup/stock_picking_customer_ref/setup.py new file mode 100644 index 000000000000..28c57bb64031 --- /dev/null +++ b/setup/stock_picking_customer_ref/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_picking_customer_ref/README.rst b/stock_picking_customer_ref/README.rst new file mode 100644 index 000000000000..07aee3aaab2f --- /dev/null +++ b/stock_picking_customer_ref/README.rst @@ -0,0 +1,103 @@ +================================ +Stock Picking Customer Reference +================================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:2fbacb74774bf89807c479c27f9d85e93a8be892453bb369018362a5293967e5 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-workflow/tree/15.0/stock_picking_customer_ref + :alt: OCA/stock-logistics-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/stock-logistics-workflow-15-0/stock-logistics-workflow-15-0-stock_picking_customer_ref + :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-workflow&target_branch=15.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module displays the Customer Reference in the pickings from Sale Order. +It also allows you to filter and search for this new field. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +Edit the client reference in a sale order with pickings. It will show up in +every picking associated. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/154/12.0 + +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 +~~~~~~~ + +* AvanzOSC +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* Pedro M. Baeza +* Ana Juaristi +* Mikel Arregi +* Alfredo de la Fuente +* David Vidal +* Andreas Dian Sukarno Putro +* Ruchir Shukla +* Divya Modi + +Other credits +~~~~~~~~~~~~~ + +Images +------ + +* Odoo Community Association: `Icon `_. + +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/stock-logistics-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_picking_customer_ref/__init__.py b/stock_picking_customer_ref/__init__.py new file mode 100644 index 000000000000..0650744f6bc6 --- /dev/null +++ b/stock_picking_customer_ref/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_picking_customer_ref/__manifest__.py b/stock_picking_customer_ref/__manifest__.py new file mode 100644 index 000000000000..5ee44f911fa9 --- /dev/null +++ b/stock_picking_customer_ref/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2015 Tecnativa - Pedro M. Baeza +# Copyright 2015 AvanzOSC - Ana Juaristi +# Copyright 2015 AvanzOSC - Mikel Arregi +# Copyright 2015 AvanzOSC - Alfredo de la Fuente +# Copyright 2017 Tecnativa - David Vidal +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Stock Picking Customer Reference", + "version": "15.0.1.0.0", + "category": "Warehouse", + "author": "AvanzOSC," "Tecnativa," "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/stock-logistics-workflow", + "license": "AGPL-3", + "summary": "This module displays the sale reference/description in the " "pickings", + "depends": ["sale_stock"], + "data": ["views/stock_picking_view.xml"], + "installable": True, +} diff --git a/stock_picking_customer_ref/i18n/de.po b/stock_picking_customer_ref/i18n/de.po new file mode 100644 index 000000000000..98217221935e --- /dev/null +++ b/stock_picking_customer_ref/i18n/de.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_customer_ref +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-01-03 09:25+0000\n" +"PO-Revision-Date: 2019-01-03 09:25+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: stock_picking_customer_ref +#: model_terms:ir.ui.view,arch_db:stock_picking_customer_ref.view_picking_internal_search_inh_customerinfo +msgid "Client order reference" +msgstr "" + +#. module: stock_picking_customer_ref +#: model:ir.model.fields,field_description:stock_picking_customer_ref.field_stock_picking__client_order_ref +msgid "Customer Reference" +msgstr "Kundenreferenz" + +#. module: stock_picking_customer_ref +#: model:ir.model,name:stock_picking_customer_ref.model_stock_picking +msgid "Transfer" +msgstr "Lieferung vornehmen" diff --git a/stock_picking_customer_ref/i18n/es.po b/stock_picking_customer_ref/i18n/es.po new file mode 100644 index 000000000000..f130ed740d08 --- /dev/null +++ b/stock_picking_customer_ref/i18n/es.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_customer_ref +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-01-03 09:26+0000\n" +"PO-Revision-Date: 2019-01-03 09:26+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: stock_picking_customer_ref +#: model_terms:ir.ui.view,arch_db:stock_picking_customer_ref.view_picking_internal_search_inh_customerinfo +msgid "Client order reference" +msgstr "Referencia pedido cliente" + +#. module: stock_picking_customer_ref +#: model:ir.model.fields,field_description:stock_picking_customer_ref.field_stock_picking__client_order_ref +msgid "Customer Reference" +msgstr "Referencia cliente" + +#. module: stock_picking_customer_ref +#: model:ir.model,name:stock_picking_customer_ref.model_stock_picking +msgid "Transfer" +msgstr "Transferir" diff --git a/stock_picking_customer_ref/i18n/fr.po b/stock_picking_customer_ref/i18n/fr.po new file mode 100644 index 000000000000..8a51fd6f5d5c --- /dev/null +++ b/stock_picking_customer_ref/i18n/fr.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_customer_ref +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-01-03 09:24+0000\n" +"PO-Revision-Date: 2019-01-03 09:24+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: stock_picking_customer_ref +#: model_terms:ir.ui.view,arch_db:stock_picking_customer_ref.view_picking_internal_search_inh_customerinfo +msgid "Client order reference" +msgstr "Référence de la commande client" + +#. module: stock_picking_customer_ref +#: model:ir.model.fields,field_description:stock_picking_customer_ref.field_stock_picking__client_order_ref +msgid "Customer Reference" +msgstr "Référence client" + +#. module: stock_picking_customer_ref +#: model:ir.model,name:stock_picking_customer_ref.model_stock_picking +msgid "Transfer" +msgstr "Transfert" diff --git a/stock_picking_customer_ref/i18n/hr.po b/stock_picking_customer_ref/i18n/hr.po new file mode 100644 index 000000000000..009cc56208ab --- /dev/null +++ b/stock_picking_customer_ref/i18n/hr.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_customer_ref +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-01-03 09:24+0000\n" +"PO-Revision-Date: 2019-01-03 09:24+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: stock_picking_customer_ref +#: model_terms:ir.ui.view,arch_db:stock_picking_customer_ref.view_picking_internal_search_inh_customerinfo +msgid "Client order reference" +msgstr "Referenca narudžbe kupca" + +#. module: stock_picking_customer_ref +#: model:ir.model.fields,field_description:stock_picking_customer_ref.field_stock_picking__client_order_ref +msgid "Customer Reference" +msgstr "Referenca kupca" + +#. module: stock_picking_customer_ref +#: model:ir.model,name:stock_picking_customer_ref.model_stock_picking +msgid "Transfer" +msgstr "Prenos" diff --git a/stock_picking_customer_ref/i18n/it.po b/stock_picking_customer_ref/i18n/it.po new file mode 100644 index 000000000000..44816e47a4bb --- /dev/null +++ b/stock_picking_customer_ref/i18n/it.po @@ -0,0 +1,33 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_customer_ref +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-01-03 09:25+0000\n" +"PO-Revision-Date: 2023-01-18 11:45+0000\n" +"Last-Translator: Francesco Foresti \n" +"Language-Team: \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.14.1\n" + +#. module: stock_picking_customer_ref +#: model_terms:ir.ui.view,arch_db:stock_picking_customer_ref.view_picking_internal_search_inh_customerinfo +msgid "Client order reference" +msgstr "" + +#. module: stock_picking_customer_ref +#: model:ir.model.fields,field_description:stock_picking_customer_ref.field_stock_picking__client_order_ref +msgid "Customer Reference" +msgstr "Riferimento cliente" + +#. module: stock_picking_customer_ref +#: model:ir.model,name:stock_picking_customer_ref.model_stock_picking +msgid "Transfer" +msgstr "Trasferimento" diff --git a/stock_picking_customer_ref/i18n/nl.po b/stock_picking_customer_ref/i18n/nl.po new file mode 100644 index 000000000000..1dcd2cdd577f --- /dev/null +++ b/stock_picking_customer_ref/i18n/nl.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_customer_ref +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-01-03 09:24+0000\n" +"PO-Revision-Date: 2019-01-03 09:24+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: stock_picking_customer_ref +#: model_terms:ir.ui.view,arch_db:stock_picking_customer_ref.view_picking_internal_search_inh_customerinfo +msgid "Client order reference" +msgstr "" + +#. module: stock_picking_customer_ref +#: model:ir.model.fields,field_description:stock_picking_customer_ref.field_stock_picking__client_order_ref +msgid "Customer Reference" +msgstr "Referentie klant" + +#. module: stock_picking_customer_ref +#: model:ir.model,name:stock_picking_customer_ref.model_stock_picking +msgid "Transfer" +msgstr "Verplaats" diff --git a/stock_picking_customer_ref/i18n/pt.po b/stock_picking_customer_ref/i18n/pt.po new file mode 100644 index 000000000000..4087683feda0 --- /dev/null +++ b/stock_picking_customer_ref/i18n/pt.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_customer_ref +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-01-03 09:26+0000\n" +"PO-Revision-Date: 2019-01-03 09:26+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: stock_picking_customer_ref +#: model_terms:ir.ui.view,arch_db:stock_picking_customer_ref.view_picking_internal_search_inh_customerinfo +msgid "Client order reference" +msgstr "" + +#. module: stock_picking_customer_ref +#: model:ir.model.fields,field_description:stock_picking_customer_ref.field_stock_picking__client_order_ref +msgid "Customer Reference" +msgstr "Referência do cliente" + +#. module: stock_picking_customer_ref +#: model:ir.model,name:stock_picking_customer_ref.model_stock_picking +msgid "Transfer" +msgstr "Transferência" diff --git a/stock_picking_customer_ref/i18n/pt_BR.po b/stock_picking_customer_ref/i18n/pt_BR.po new file mode 100644 index 000000000000..7451d3c7cfdd --- /dev/null +++ b/stock_picking_customer_ref/i18n/pt_BR.po @@ -0,0 +1,33 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_customer_ref +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-01-03 09:25+0000\n" +"PO-Revision-Date: 2020-06-23 03:19+0000\n" +"Last-Translator: Fernando Colus \n" +"Language-Team: \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: stock_picking_customer_ref +#: model_terms:ir.ui.view,arch_db:stock_picking_customer_ref.view_picking_internal_search_inh_customerinfo +msgid "Client order reference" +msgstr "Referência de pedido do cliente" + +#. module: stock_picking_customer_ref +#: model:ir.model.fields,field_description:stock_picking_customer_ref.field_stock_picking__client_order_ref +msgid "Customer Reference" +msgstr "Referência do Cliente" + +#. module: stock_picking_customer_ref +#: model:ir.model,name:stock_picking_customer_ref.model_stock_picking +msgid "Transfer" +msgstr "Transferência" diff --git a/stock_picking_customer_ref/i18n/sl_SI.po b/stock_picking_customer_ref/i18n/sl_SI.po new file mode 100644 index 000000000000..a45391c1f5c6 --- /dev/null +++ b/stock_picking_customer_ref/i18n/sl_SI.po @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_customer_ref +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-01-03 09:26+0000\n" +"PO-Revision-Date: 2019-01-03 09:26+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: stock_picking_customer_ref +#: model_terms:ir.ui.view,arch_db:stock_picking_customer_ref.view_picking_internal_search_inh_customerinfo +msgid "Client order reference" +msgstr "Sklic naročila stranke" + +#. module: stock_picking_customer_ref +#: model:ir.model.fields,field_description:stock_picking_customer_ref.field_stock_picking__client_order_ref +msgid "Customer Reference" +msgstr "" + +#. module: stock_picking_customer_ref +#: model:ir.model,name:stock_picking_customer_ref.model_stock_picking +msgid "Transfer" +msgstr "" diff --git a/stock_picking_customer_ref/i18n/stock_picking_customer_ref.pot b/stock_picking_customer_ref/i18n/stock_picking_customer_ref.pot new file mode 100644 index 000000000000..ab683291cb26 --- /dev/null +++ b/stock_picking_customer_ref/i18n/stock_picking_customer_ref.pot @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_customer_ref +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \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_picking_customer_ref +#: model_terms:ir.ui.view,arch_db:stock_picking_customer_ref.view_picking_internal_search_inh_customerinfo +msgid "Client order reference" +msgstr "" + +#. module: stock_picking_customer_ref +#: model:ir.model.fields,field_description:stock_picking_customer_ref.field_stock_picking__client_order_ref +msgid "Customer Reference" +msgstr "" + +#. module: stock_picking_customer_ref +#: model:ir.model,name:stock_picking_customer_ref.model_stock_picking +msgid "Transfer" +msgstr "" diff --git a/stock_picking_customer_ref/models/__init__.py b/stock_picking_customer_ref/models/__init__.py new file mode 100644 index 000000000000..ae4c27227f18 --- /dev/null +++ b/stock_picking_customer_ref/models/__init__.py @@ -0,0 +1 @@ +from . import stock_picking diff --git a/stock_picking_customer_ref/models/stock_picking.py b/stock_picking_customer_ref/models/stock_picking.py new file mode 100644 index 000000000000..8d1e46675cd9 --- /dev/null +++ b/stock_picking_customer_ref/models/stock_picking.py @@ -0,0 +1,13 @@ +# Copyright 2015 AvanzOSC - Alfredo de la Fuente +# Copyright 2017 Tecnativa - David Vidal +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class StockPicking(models.Model): + _inherit = "stock.picking" + + client_order_ref = fields.Char( + string="Customer Reference", related="sale_id.client_order_ref", store=True + ) diff --git a/stock_picking_customer_ref/readme/CONTRIBUTORS.rst b/stock_picking_customer_ref/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000000..107e9b95e924 --- /dev/null +++ b/stock_picking_customer_ref/readme/CONTRIBUTORS.rst @@ -0,0 +1,8 @@ +* Pedro M. Baeza +* Ana Juaristi +* Mikel Arregi +* Alfredo de la Fuente +* David Vidal +* Andreas Dian Sukarno Putro +* Ruchir Shukla +* Divya Modi diff --git a/stock_picking_customer_ref/readme/CREDITS.rst b/stock_picking_customer_ref/readme/CREDITS.rst new file mode 100644 index 000000000000..9baa7efb9c02 --- /dev/null +++ b/stock_picking_customer_ref/readme/CREDITS.rst @@ -0,0 +1,4 @@ +Images +------ + +* Odoo Community Association: `Icon `_. diff --git a/stock_picking_customer_ref/readme/DESCRIPTION.rst b/stock_picking_customer_ref/readme/DESCRIPTION.rst new file mode 100644 index 000000000000..fa2b3bc0930d --- /dev/null +++ b/stock_picking_customer_ref/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module displays the Customer Reference in the pickings from Sale Order. +It also allows you to filter and search for this new field. diff --git a/stock_picking_customer_ref/readme/USAGE.rst b/stock_picking_customer_ref/readme/USAGE.rst new file mode 100644 index 000000000000..c1ca8a3480b8 --- /dev/null +++ b/stock_picking_customer_ref/readme/USAGE.rst @@ -0,0 +1,6 @@ +Edit the client reference in a sale order with pickings. It will show up in +every picking associated. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/154/12.0 diff --git a/stock_picking_customer_ref/static/description/icon.png b/stock_picking_customer_ref/static/description/icon.png new file mode 100644 index 000000000000..3a0328b516c4 Binary files /dev/null and b/stock_picking_customer_ref/static/description/icon.png differ diff --git a/stock_picking_customer_ref/static/description/index.html b/stock_picking_customer_ref/static/description/index.html new file mode 100644 index 000000000000..908e70bd8f98 --- /dev/null +++ b/stock_picking_customer_ref/static/description/index.html @@ -0,0 +1,450 @@ + + + + + + +Stock Picking Customer Reference + + + +
+

Stock Picking Customer Reference

+ + +

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

+

This module displays the Customer Reference in the pickings from Sale Order. +It also allows you to filter and search for this new field.

+

Table of contents

+ +
+

Usage

+

Edit the client reference in a sale order with pickings. It will show up in +every picking associated.

+Try me on Runbot +
+
+

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

+
    +
  • AvanzOSC
  • +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+
+

Images

+
    +
  • Odoo Community Association: Icon.
  • +
+
+
+
+

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/stock-logistics-workflow project on GitHub.

+

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

+
+
+
+ + diff --git a/stock_picking_customer_ref/tests/__init__.py b/stock_picking_customer_ref/tests/__init__.py new file mode 100644 index 000000000000..a7d8bd613a58 --- /dev/null +++ b/stock_picking_customer_ref/tests/__init__.py @@ -0,0 +1 @@ +from . import test_stock_picking_customer_ref diff --git a/stock_picking_customer_ref/tests/test_stock_picking_customer_ref.py b/stock_picking_customer_ref/tests/test_stock_picking_customer_ref.py new file mode 100644 index 000000000000..1887ec901ba3 --- /dev/null +++ b/stock_picking_customer_ref/tests/test_stock_picking_customer_ref.py @@ -0,0 +1,84 @@ +# Copyright 2015 AvanzOSC - Alfredo de la Fuente +# Copyright 2017 Tecnativa - David Vidal +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase + + +class TestStockPickingCustomerRef(TransactionCase): + @classmethod + def setUpClass(cls): + super(TestStockPickingCustomerRef, cls).setUpClass() + cls.SaleOrderObj = cls.env["sale.order"] + + cls.product = cls.env["product.product"].create({"name": "Test stuff"}) + cls.partner = cls.env["res.partner"].create({"name": "Mr. Odoo"}) + cls.sale_order = cls.SaleOrderObj.create( + { + "partner_id": cls.partner.id, + "order_line": [(0, 0, {"product_id": cls.product.id})], + } + ) + cls.sale_order.with_context(show_sale=True).action_confirm() + cls.picking_type_id = cls.env.ref("stock.picking_type_in") + cls.location_id = cls.env.ref("stock.stock_location_suppliers") + cls.location_dest_id = cls.env.ref("stock.stock_location_stock") + + def test_stock_picking_customer_ref(self): + self.sale_order.client_order_ref = "EDIT123456" + for picking in self.sale_order.picking_ids: + self.assertEqual( + picking.client_order_ref, + self.sale_order.client_order_ref, + "Order ref of picking not equal to client order ref in sale", + ) + self.sale_order.client_order_ref = "AGAIN123456" + for picking in self.sale_order.picking_ids: + self.assertEqual( + picking.client_order_ref, + self.sale_order.client_order_ref, + "Order ref of picking not equal to client order ref in sale", + ) + + def test_stock_picking_customer_ref_on_sale_creation(self): + sale_order = self.SaleOrderObj.create( + { + "partner_id": self.partner.id, + "client_order_ref": "CREATE123456", + "order_line": [(0, 0, {"product_id": self.product.id})], + } + ) + sale_order.with_context(show_sale=True).action_confirm() + for picking in sale_order.picking_ids: + self.assertEqual( + picking.client_order_ref, + sale_order.client_order_ref, + "Order ref of picking not equal to client order ref in sale", + ) + + def test_stock_picking_customer_ref_without_sale(self): + stock_picking = self.env["stock.picking"].create( + { + "partner_id": self.partner.id, + "picking_type_id": self.picking_type_id.id, + "location_id": self.location_id.id, + "location_dest_id": self.location_dest_id.id, + "move_line_ids": [ + ( + 0, + 0, + { + "product_id": self.product.id, + "product_uom_id": self.env.ref("uom.product_uom_unit").id, + "product_uom_qty": 50.0, + "picking_type_id": self.picking_type_id.id, + "location_id": self.location_id.id, + "location_dest_id": self.location_dest_id.id, + }, + ) + ], + } + ) + self.assertFalse( + stock_picking.client_order_ref, "Client Order Reference is None" + ) diff --git a/stock_picking_customer_ref/views/stock_picking_view.xml b/stock_picking_customer_ref/views/stock_picking_view.xml new file mode 100644 index 000000000000..7721f1236f25 --- /dev/null +++ b/stock_picking_customer_ref/views/stock_picking_view.xml @@ -0,0 +1,47 @@ + + + + + vpicktree.inh.customerinfo + stock.picking + + + + + + + + + + view.picking.form.inh.customerinfo + stock.picking + + + + + + + + + + + view.picking.internal.search.inh.customerinfo + + stock.picking + + + + + + + + + + + +