From d820a6e97c4226439faaf4ed6e763fd9fc04020e Mon Sep 17 00:00:00 2001 From: Telmo Santos Date: Mon, 29 Jan 2024 12:18:00 +0100 Subject: [PATCH 01/17] [ADD] stock_picking_partner_note --- stock_picking_partner_note/README.rst | 88 ++++ stock_picking_partner_note/__init__.py | 1 + stock_picking_partner_note/__manifest__.py | 24 + stock_picking_partner_note/i18n/fr.po | 54 +++ .../i18n/stock_picking_partner_note.pot | 147 ++++++ stock_picking_partner_note/models/__init__.py | 5 + .../models/res_partner.py | 14 + .../models/stock_picking.py | 25 + .../models/stock_picking_note.py | 16 + .../models/stock_picking_note_type.py | 14 + .../models/stock_picking_type.py | 15 + .../readme/CONFIGURE.rst | 3 + .../readme/CONTRIBUTORS.rst | 2 + .../readme/DESCRIPTION.rst | 4 + .../security/ir.model.access.csv | 3 + .../static/description/index.html | 433 ++++++++++++++++++ stock_picking_partner_note/tests/__init__.py | 1 + .../tests/test_stock_picking_partner_note.py | 44 ++ .../views/res_partner.xml | 29 ++ .../views/stock_picking_note.xml | 16 + .../views/stock_picking_note_type.xml | 33 ++ .../stock_picking_partner_note_menus.xml | 17 + .../views/stock_picking_type.xml | 13 + 23 files changed, 1001 insertions(+) create mode 100644 stock_picking_partner_note/README.rst create mode 100644 stock_picking_partner_note/__init__.py create mode 100644 stock_picking_partner_note/__manifest__.py create mode 100644 stock_picking_partner_note/i18n/fr.po create mode 100644 stock_picking_partner_note/i18n/stock_picking_partner_note.pot create mode 100644 stock_picking_partner_note/models/__init__.py create mode 100644 stock_picking_partner_note/models/res_partner.py create mode 100644 stock_picking_partner_note/models/stock_picking.py create mode 100644 stock_picking_partner_note/models/stock_picking_note.py create mode 100644 stock_picking_partner_note/models/stock_picking_note_type.py create mode 100644 stock_picking_partner_note/models/stock_picking_type.py create mode 100644 stock_picking_partner_note/readme/CONFIGURE.rst create mode 100644 stock_picking_partner_note/readme/CONTRIBUTORS.rst create mode 100644 stock_picking_partner_note/readme/DESCRIPTION.rst create mode 100644 stock_picking_partner_note/security/ir.model.access.csv create mode 100644 stock_picking_partner_note/static/description/index.html create mode 100644 stock_picking_partner_note/tests/__init__.py create mode 100644 stock_picking_partner_note/tests/test_stock_picking_partner_note.py create mode 100644 stock_picking_partner_note/views/res_partner.xml create mode 100644 stock_picking_partner_note/views/stock_picking_note.xml create mode 100644 stock_picking_partner_note/views/stock_picking_note_type.xml create mode 100644 stock_picking_partner_note/views/stock_picking_partner_note_menus.xml create mode 100644 stock_picking_partner_note/views/stock_picking_type.xml diff --git a/stock_picking_partner_note/README.rst b/stock_picking_partner_note/README.rst new file mode 100644 index 000000000000..7cb91cf8742c --- /dev/null +++ b/stock_picking_partner_note/README.rst @@ -0,0 +1,88 @@ +========================== +Stock Picking Partner Note +========================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:6b4a55a5fdd412f48d5058ba02b8f222f60cd690468612419b6ce3966c84275c + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/16.0/stock_picking_partner_note + :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-16-0/stock-logistics-workflow-16-0-stock_picking_partner_note + :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=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Allow to record a message for the person in charge of order preparation at the level of the customer, +then have it as a note on the picking transfer. + + + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +* Create partner note types in Inventory > Configuration > Note Types. +* In shipping operation types set field `Partner Note Type`. Only these types will be shown in picking operations notes. +* On contacts add picking notes. + +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 +* BCIM + +Contributors +~~~~~~~~~~~~ + +* Telmo Santos +* Jacques-Etienne Baudoux + +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_partner_note/__init__.py b/stock_picking_partner_note/__init__.py new file mode 100644 index 000000000000..0650744f6bc6 --- /dev/null +++ b/stock_picking_partner_note/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_picking_partner_note/__manifest__.py b/stock_picking_partner_note/__manifest__.py new file mode 100644 index 000000000000..909d3a4e85d9 --- /dev/null +++ b/stock_picking_partner_note/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright 2024 Camptocamp (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Stock Picking Partner Note", + "version": "16.0.1.0.0", + "development_status": "Beta", + "category": "Product", + "summary": "Add partner notes on picking", + "author": "Camptocamp, BCIM, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/stock-logistics-workflow", + "license": "AGPL-3", + "depends": ["sale_stock"], + "data": [ + "security/ir.model.access.csv", + "views/res_partner.xml", + "views/stock_picking_note_type.xml", + "views/stock_picking_type.xml", + "views/stock_picking_note.xml", + "views/stock_picking_partner_note_menus.xml", + ], + "installable": True, + "auto_install": False, +} diff --git a/stock_picking_partner_note/i18n/fr.po b/stock_picking_partner_note/i18n/fr.po new file mode 100644 index 000000000000..3c7a4f74ed1d --- /dev/null +++ b/stock_picking_partner_note/i18n/fr.po @@ -0,0 +1,54 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_partner_note +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-05 10:49+0000\n" +"PO-Revision-Date: 2024-02-05 10:49+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_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__name +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__name +msgid "Name" +msgstr "Nom" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__note_type_id +msgid "Note Type" +msgstr "Type de note" + +#. module: stock_picking_partner_note +#: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_note_types_menu_menu +msgid "Note Types" +msgstr "Type de notes" + + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_type__partner_note_type_ids +msgid "Partner Note Type" +msgstr "Type de note partenaire" + +#. module: stock_picking_partner_note +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_form +msgid "Picking Note" +msgstr "Note d'opération" + +#. module: stock_picking_partner_note +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_type_form +msgid "Picking Note Type" +msgstr "Opération Type de note" + +#. module: stock_picking_partner_note +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_type_tree +msgid "Picking Note Types" +msgstr "Opération Types de note" diff --git a/stock_picking_partner_note/i18n/stock_picking_partner_note.pot b/stock_picking_partner_note/i18n/stock_picking_partner_note.pot new file mode 100644 index 000000000000..afbbce0cdc56 --- /dev/null +++ b/stock_picking_partner_note/i18n/stock_picking_partner_note.pot @@ -0,0 +1,147 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_partner_note +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-02-05 10:49+0000\n" +"PO-Revision-Date: 2024-02-05 10:49+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_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__active +msgid "Active" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__create_uid +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__create_uid +msgid "Created by" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__create_date +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__create_date +msgid "Created on" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__display_name +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__id +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__id +msgid "ID" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note____last_update +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type____last_update +msgid "Last Modified on" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__write_uid +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__write_date +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__write_date +msgid "Last Updated on" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__name +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__name +msgid "Name" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__note_type_id +msgid "Note Type" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_note_types_menu_menu +msgid "Note Types" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking__note +msgid "Notes" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_type__partner_note_type_ids +msgid "Partner Note Type" +msgstr "" + +#. module: stock_picking_partner_note +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_form +msgid "Picking Note" +msgstr "" + +#. module: stock_picking_partner_note +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_type_form +msgid "Picking Note Type" +msgstr "" + +#. module: stock_picking_partner_note +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_type_tree +msgid "Picking Note Types" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_partner__stock_picking_note_ids +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_users__stock_picking_note_ids +#: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_notes_menu +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_partner_form_inherit +msgid "Picking Notes" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_type +msgid "Picking Type" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_res_partner +msgid "Res Partner" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__sequence +msgid "Sequence" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking +msgid "Stock Picking" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.actions.act_window,name:stock_picking_partner_note.stock_picking_note_types_act_window +msgid "Stock Picking Note Types" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_note +msgid "stock.picking.note" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_note_type +msgid "stock.picking.note.type" +msgstr "" diff --git a/stock_picking_partner_note/models/__init__.py b/stock_picking_partner_note/models/__init__.py new file mode 100644 index 000000000000..d84a8c844c26 --- /dev/null +++ b/stock_picking_partner_note/models/__init__.py @@ -0,0 +1,5 @@ +from . import stock_picking_note_type +from . import stock_picking_note +from . import stock_picking_type +from . import stock_picking +from . import res_partner diff --git a/stock_picking_partner_note/models/res_partner.py b/stock_picking_partner_note/models/res_partner.py new file mode 100644 index 000000000000..439e070d85c9 --- /dev/null +++ b/stock_picking_partner_note/models/res_partner.py @@ -0,0 +1,14 @@ +# Copyright 2024 Camptocamp (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +from odoo import fields, models + + +class ResPartner(models.Model): + _inherit = "res.partner" + + stock_picking_note_ids = fields.Many2many( + comodel_name="stock.picking.note", + string="Picking Notes", + ) diff --git a/stock_picking_partner_note/models/stock_picking.py b/stock_picking_partner_note/models/stock_picking.py new file mode 100644 index 000000000000..652097208aa3 --- /dev/null +++ b/stock_picking_partner_note/models/stock_picking.py @@ -0,0 +1,25 @@ +# Copyright 2024 Camptocamp (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +from odoo import api, fields, models + + +class StockPicking(models.Model): + _inherit = "stock.picking" + + note = fields.Html(compute="_compute_note", store=True) + + @api.depends("partner_id") + def _compute_note(self): + for picking in self: + picking_type_note_type_ids = picking.picking_type_id.partner_note_type_ids + picking_notes = picking.partner_id.stock_picking_note_ids.filtered( + lambda n: n.note_type_id in picking_type_note_type_ids + ) + picking_notes = [ + note.name.strip() + for note in picking_notes + if note.name and note.name.strip() + ] + picking.note = "
".join(picking_notes) diff --git a/stock_picking_partner_note/models/stock_picking_note.py b/stock_picking_partner_note/models/stock_picking_note.py new file mode 100644 index 000000000000..aba199a23bbe --- /dev/null +++ b/stock_picking_partner_note/models/stock_picking_note.py @@ -0,0 +1,16 @@ +# Copyright 2024 Camptocamp (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +from odoo import fields, models + + +class StockPickingNote(models.Model): + _name = "stock.picking.note" + _description = "Picking Note" + _order = "sequence,name" + + name = fields.Text(required=True) + active = fields.Boolean(default=True) + note_type_id = fields.Many2one("stock.picking.note.type", required=True) + sequence = sequence = fields.Integer(related="note_type_id.sequence", store=True) diff --git a/stock_picking_partner_note/models/stock_picking_note_type.py b/stock_picking_partner_note/models/stock_picking_note_type.py new file mode 100644 index 000000000000..10d5988d4b2e --- /dev/null +++ b/stock_picking_partner_note/models/stock_picking_note_type.py @@ -0,0 +1,14 @@ +# Copyright 2024 Camptocamp (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +from odoo import fields, models + + +class StockPickingNoteType(models.Model): + _name = "stock.picking.note.type" + _description = "Picking Note Type" + _order = "sequence,name" + + sequence = fields.Integer() + name = fields.Char(required=True) diff --git a/stock_picking_partner_note/models/stock_picking_type.py b/stock_picking_partner_note/models/stock_picking_type.py new file mode 100644 index 000000000000..291f18f6cb51 --- /dev/null +++ b/stock_picking_partner_note/models/stock_picking_type.py @@ -0,0 +1,15 @@ +# Copyright 2024 Camptocamp (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +from odoo import fields, models + + +class StockPickingType(models.Model): + _inherit = "stock.picking.type" + + partner_note_type_ids = fields.Many2many( + "stock.picking.note.type", + help="Type of note with customer preferences on how his products are prepared " + "for delivery.", + ) diff --git a/stock_picking_partner_note/readme/CONFIGURE.rst b/stock_picking_partner_note/readme/CONFIGURE.rst new file mode 100644 index 000000000000..056b7576929c --- /dev/null +++ b/stock_picking_partner_note/readme/CONFIGURE.rst @@ -0,0 +1,3 @@ +* Create partner note types in Inventory > Configuration > Note Types. +* In shipping operation types set field `Partner Note Type`. Only these types will be shown in picking operations notes. +* On contacts add picking notes. diff --git a/stock_picking_partner_note/readme/CONTRIBUTORS.rst b/stock_picking_partner_note/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000000..22612a25009e --- /dev/null +++ b/stock_picking_partner_note/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Telmo Santos +* Jacques-Etienne Baudoux diff --git a/stock_picking_partner_note/readme/DESCRIPTION.rst b/stock_picking_partner_note/readme/DESCRIPTION.rst new file mode 100644 index 000000000000..f5a6ef308b30 --- /dev/null +++ b/stock_picking_partner_note/readme/DESCRIPTION.rst @@ -0,0 +1,4 @@ +Allow to record a message for the person in charge of order preparation at the level of the customer, +then have it as a note on the picking transfer. + + diff --git a/stock_picking_partner_note/security/ir.model.access.csv b/stock_picking_partner_note/security/ir.model.access.csv new file mode 100644 index 000000000000..920562ef3a3b --- /dev/null +++ b/stock_picking_partner_note/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_stock_picking_note_type_manager,stock.picking.note.type manager,model_stock_picking_note_type,stock.group_stock_manager,1,1,1,1 +access_stock_picking_note_user,stock.picking.note user,model_stock_picking_note,sales_team.group_sale_salesman,1,1,1,1 diff --git a/stock_picking_partner_note/static/description/index.html b/stock_picking_partner_note/static/description/index.html new file mode 100644 index 000000000000..7a162bc6c807 --- /dev/null +++ b/stock_picking_partner_note/static/description/index.html @@ -0,0 +1,433 @@ + + + + + + +Stock Picking Partner Note + + + +
+

Stock Picking Partner Note

+ + +

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

+

Allow to record a message for the person in charge of order preparation at the level of the customer, +then have it as a note on the picking transfer.

+

Table of contents

+ +
+

Configuration

+
    +
  • Create partner note types in Inventory > Configuration > Note Types.
  • +
  • In shipping operation types set field Partner Note Type. Only these types will be shown in picking operations notes.
  • +
  • On contacts add picking notes.
  • +
+
+
+

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
  • +
  • BCIM
  • +
+
+
+

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.

+

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_partner_note/tests/__init__.py b/stock_picking_partner_note/tests/__init__.py new file mode 100644 index 000000000000..b25c719d4f0a --- /dev/null +++ b/stock_picking_partner_note/tests/__init__.py @@ -0,0 +1 @@ +from . import test_stock_picking_partner_note diff --git a/stock_picking_partner_note/tests/test_stock_picking_partner_note.py b/stock_picking_partner_note/tests/test_stock_picking_partner_note.py new file mode 100644 index 000000000000..59e554ea5673 --- /dev/null +++ b/stock_picking_partner_note/tests/test_stock_picking_partner_note.py @@ -0,0 +1,44 @@ +# Copyright 2024 Camptocamp (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo.tests import Form, common + +from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT + + +class StockPickingPartnerNote(common.TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env["base"].with_context(**DISABLED_MAIL_CONTEXT).env + cls.product_a = cls.env.ref("product.product_product_4") + cls.note_type1 = cls.env["stock.picking.note.type"].create( + {"name": "Note type 1", "sequence": 10} + ) + cls.note_type2 = cls.env["stock.picking.note.type"].create( + {"name": "Note type 2", "sequence": 20} + ) + cls.partner_a = cls.env["res.partner"].create( + { + "name": "Customer A", + "stock_picking_note_ids": [ + (0, 0, {"name": "Note 1 ", "note_type_id": cls.note_type1.id}), + (0, 0, {"name": "Note 2", "note_type_id": cls.note_type2.id}), + (0, 0, {"name": " ", "note_type_id": cls.note_type2.id}), + ], + } + ) + + def test_picking_partner_note(self): + with Form(self.env["sale.order"]) as order_form: + order_form.partner_id = self.partner_a + with order_form.order_line.new() as line_form: + line_form.product_id = self.product_a + line_form.product_uom_qty = 1 + + self.order = order_form.save() + self.order.warehouse_id.out_type_id.partner_note_type_ids = [ + (6, 0, (self.note_type1 | self.note_type2).ids) + ] + self.order.action_confirm() + self.assertIn("

Note 1
Note 2

", self.order.picking_ids[0].note) diff --git a/stock_picking_partner_note/views/res_partner.xml b/stock_picking_partner_note/views/res_partner.xml new file mode 100644 index 000000000000..81cb99253248 --- /dev/null +++ b/stock_picking_partner_note/views/res_partner.xml @@ -0,0 +1,29 @@ + + + + res.partner.form.inherit + res.partner + + + + + + + + + + + + + + + diff --git a/stock_picking_partner_note/views/stock_picking_note.xml b/stock_picking_partner_note/views/stock_picking_note.xml new file mode 100644 index 000000000000..20c27c0a979a --- /dev/null +++ b/stock_picking_partner_note/views/stock_picking_note.xml @@ -0,0 +1,16 @@ + + + + stock.picking.note.form + stock.picking.note + +
+ + + + + +
+
+
+
diff --git a/stock_picking_partner_note/views/stock_picking_note_type.xml b/stock_picking_partner_note/views/stock_picking_note_type.xml new file mode 100644 index 000000000000..8000067f196b --- /dev/null +++ b/stock_picking_partner_note/views/stock_picking_note_type.xml @@ -0,0 +1,33 @@ + + + + stock.picking.note.type.tree + stock.picking.note.type + + + + + + + + + + stock.picking.note.type.form + stock.picking.note.type + +
+ + + +
+
+
+ + + Stock Picking Note Types + stock.picking.note.type + tree,form + [] + {} + +
diff --git a/stock_picking_partner_note/views/stock_picking_partner_note_menus.xml b/stock_picking_partner_note/views/stock_picking_partner_note_menus.xml new file mode 100644 index 000000000000..aea41f86d48a --- /dev/null +++ b/stock_picking_partner_note/views/stock_picking_partner_note_menus.xml @@ -0,0 +1,17 @@ + + + + + diff --git a/stock_picking_partner_note/views/stock_picking_type.xml b/stock_picking_partner_note/views/stock_picking_type.xml new file mode 100644 index 000000000000..39055dcd383f --- /dev/null +++ b/stock_picking_partner_note/views/stock_picking_type.xml @@ -0,0 +1,13 @@ + + + + Operation Types + stock.picking.type + + + + + + + + From e651fdab0657de7d6d3c3eae86bc7a29bd2ab53a Mon Sep 17 00:00:00 2001 From: oca-ci Date: Tue, 13 Feb 2024 08:29:28 +0000 Subject: [PATCH 02/17] [UPD] Update stock_picking_partner_note.pot --- .../i18n/stock_picking_partner_note.pot | 41 ++++++++----------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/stock_picking_partner_note/i18n/stock_picking_partner_note.pot b/stock_picking_partner_note/i18n/stock_picking_partner_note.pot index afbbce0cdc56..5e96fcc60d07 100644 --- a/stock_picking_partner_note/i18n/stock_picking_partner_note.pot +++ b/stock_picking_partner_note/i18n/stock_picking_partner_note.pot @@ -4,10 +4,8 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0+e\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-05 10:49+0000\n" -"PO-Revision-Date: 2024-02-05 10:49+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -20,6 +18,11 @@ msgstr "" msgid "Active" msgstr "" +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_res_partner +msgid "Contact" +msgstr "" + #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__create_uid #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__create_uid @@ -74,7 +77,7 @@ msgid "Note Type" msgstr "" #. module: stock_picking_partner_note -#: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_note_types_menu_menu +#: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_note_types_menu msgid "Note Types" msgstr "" @@ -89,24 +92,21 @@ msgid "Partner Note Type" msgstr "" #. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_note #: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_form msgid "Picking Note" msgstr "" #. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_note_type #: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_type_form msgid "Picking Note Type" msgstr "" -#. module: stock_picking_partner_note -#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_type_tree -msgid "Picking Note Types" -msgstr "" - #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_partner__stock_picking_note_ids #: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_users__stock_picking_note_ids -#: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_notes_menu +#: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_notes_root #: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_partner_form_inherit msgid "Picking Notes" msgstr "" @@ -117,31 +117,24 @@ msgid "Picking Type" msgstr "" #. module: stock_picking_partner_note -#: model:ir.model,name:stock_picking_partner_note.model_res_partner -msgid "Res Partner" -msgstr "" - -#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__sequence #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__sequence msgid "Sequence" msgstr "" -#. module: stock_picking_partner_note -#: model:ir.model,name:stock_picking_partner_note.model_stock_picking -msgid "Stock Picking" -msgstr "" - #. module: stock_picking_partner_note #: model:ir.actions.act_window,name:stock_picking_partner_note.stock_picking_note_types_act_window msgid "Stock Picking Note Types" msgstr "" #. module: stock_picking_partner_note -#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_note -msgid "stock.picking.note" +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking +msgid "Transfer" msgstr "" #. module: stock_picking_partner_note -#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_note_type -msgid "stock.picking.note.type" +#: model:ir.model.fields,help:stock_picking_partner_note.field_stock_picking_type__partner_note_type_ids +msgid "" +"Type of note with customer preferences on how his products are prepared for " +"delivery." msgstr "" From e235129837e8434d8efbc6ab91433ad97a484021 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 13 Feb 2024 08:34:19 +0000 Subject: [PATCH 03/17] [BOT] post-merge updates --- .../static/description/icon.png | Bin 0 -> 9455 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 stock_picking_partner_note/static/description/icon.png diff --git a/stock_picking_partner_note/static/description/icon.png b/stock_picking_partner_note/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d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5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 From 3e3aba6b7b4893997e58e6f8c650b2e1e9466a8a Mon Sep 17 00:00:00 2001 From: mymage Date: Fri, 16 Feb 2024 14:04:34 +0000 Subject: [PATCH 04/17] Added translation using Weblate (Italian) --- stock_picking_partner_note/i18n/it.po | 141 ++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 stock_picking_partner_note/i18n/it.po diff --git a/stock_picking_partner_note/i18n/it.po b/stock_picking_partner_note/i18n/it.po new file mode 100644 index 000000000000..d356e565bce6 --- /dev/null +++ b/stock_picking_partner_note/i18n/it.po @@ -0,0 +1,141 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_partner_note +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\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" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__active +msgid "Active" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_res_partner +msgid "Contact" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__create_uid +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__create_uid +msgid "Created by" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__create_date +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__create_date +msgid "Created on" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__display_name +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__id +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__id +msgid "ID" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note____last_update +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type____last_update +msgid "Last Modified on" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__write_uid +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__write_date +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__write_date +msgid "Last Updated on" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__name +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__name +msgid "Name" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__note_type_id +msgid "Note Type" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_note_types_menu +msgid "Note Types" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking__note +msgid "Notes" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_type__partner_note_type_ids +msgid "Partner Note Type" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_note +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_form +msgid "Picking Note" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_note_type +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_type_form +msgid "Picking Note Type" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_partner__stock_picking_note_ids +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_users__stock_picking_note_ids +#: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_notes_root +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_partner_form_inherit +msgid "Picking Notes" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_type +msgid "Picking Type" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__sequence +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__sequence +msgid "Sequence" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.actions.act_window,name:stock_picking_partner_note.stock_picking_note_types_act_window +msgid "Stock Picking Note Types" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking +msgid "Transfer" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,help:stock_picking_partner_note.field_stock_picking_type__partner_note_type_ids +msgid "" +"Type of note with customer preferences on how his products are prepared for " +"delivery." +msgstr "" From afc4032e9b849daf912963b352d49242eb635bcd Mon Sep 17 00:00:00 2001 From: mymage Date: Fri, 16 Feb 2024 14:09:38 +0000 Subject: [PATCH 05/17] Translated using Weblate (Italian) Currently translated at 100.0% (22 of 22 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_partner_note Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_partner_note/it/ --- stock_picking_partner_note/i18n/it.po | 48 +++++++++++++++------------ 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/stock_picking_partner_note/i18n/it.po b/stock_picking_partner_note/i18n/it.po index d356e565bce6..bd86480d4601 100644 --- a/stock_picking_partner_note/i18n/it.po +++ b/stock_picking_partner_note/i18n/it.po @@ -6,103 +6,105 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2024-02-16 16:37+0000\n" +"Last-Translator: mymage \n" "Language-Team: none\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.17\n" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__active msgid "Active" -msgstr "" +msgstr "Attiva" #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_res_partner msgid "Contact" -msgstr "" +msgstr "Contatto" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__create_uid #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__create_uid msgid "Created by" -msgstr "" +msgstr "Creato da" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__create_date #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__create_date msgid "Created on" -msgstr "" +msgstr "Creato il" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__display_name #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__display_name msgid "Display Name" -msgstr "" +msgstr "Nome visualizzato" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__id #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__id msgid "ID" -msgstr "" +msgstr "ID" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note____last_update #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type____last_update msgid "Last Modified on" -msgstr "" +msgstr "Ultima modifica il" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__write_uid #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__write_uid msgid "Last Updated by" -msgstr "" +msgstr "Ultimo aggiornamento di" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__write_date #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__write_date msgid "Last Updated on" -msgstr "" +msgstr "Ultimo aggiornamento il" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__name #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__name msgid "Name" -msgstr "" +msgstr "Nome" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__note_type_id msgid "Note Type" -msgstr "" +msgstr "Tipo nota" #. module: stock_picking_partner_note #: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_note_types_menu msgid "Note Types" -msgstr "" +msgstr "Tipi nota" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking__note msgid "Notes" -msgstr "" +msgstr "Note" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_type__partner_note_type_ids msgid "Partner Note Type" -msgstr "" +msgstr "Tipo nota pertner" #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_stock_picking_note #: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_form msgid "Picking Note" -msgstr "" +msgstr "Nota prelievo" #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_stock_picking_note_type #: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_type_form msgid "Picking Note Type" -msgstr "" +msgstr "Tipo nota prelievo" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_partner__stock_picking_note_ids @@ -110,28 +112,28 @@ msgstr "" #: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_notes_root #: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_partner_form_inherit msgid "Picking Notes" -msgstr "" +msgstr "Note prelievo" #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_stock_picking_type msgid "Picking Type" -msgstr "" +msgstr "Tipologia prelievo" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__sequence #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__sequence msgid "Sequence" -msgstr "" +msgstr "Sequenza" #. module: stock_picking_partner_note #: model:ir.actions.act_window,name:stock_picking_partner_note.stock_picking_note_types_act_window msgid "Stock Picking Note Types" -msgstr "" +msgstr "Tipi nota prelievo magazzino" #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_stock_picking msgid "Transfer" -msgstr "" +msgstr "Trasferimento" #. module: stock_picking_partner_note #: model:ir.model.fields,help:stock_picking_partner_note.field_stock_picking_type__partner_note_type_ids @@ -139,3 +141,5 @@ msgid "" "Type of note with customer preferences on how his products are prepared for " "delivery." msgstr "" +"Tipo nota con preferenze cliente su come i suoi prodotti sono preparati per " +"la spedizione." From 7b5706b05685cc4468d01d6fc23924576d24dd6e Mon Sep 17 00:00:00 2001 From: JuMiSanAr Date: Mon, 4 Mar 2024 15:23:24 +0100 Subject: [PATCH 06/17] stock_picking_partner_note: only use active notes --- stock_picking_partner_note/models/stock_picking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_picking_partner_note/models/stock_picking.py b/stock_picking_partner_note/models/stock_picking.py index 652097208aa3..a86e315908d5 100644 --- a/stock_picking_partner_note/models/stock_picking.py +++ b/stock_picking_partner_note/models/stock_picking.py @@ -15,7 +15,7 @@ def _compute_note(self): for picking in self: picking_type_note_type_ids = picking.picking_type_id.partner_note_type_ids picking_notes = picking.partner_id.stock_picking_note_ids.filtered( - lambda n: n.note_type_id in picking_type_note_type_ids + lambda n: n.active and n.note_type_id in picking_type_note_type_ids ) picking_notes = [ note.name.strip() From 487c20ffd5f04a64367cacc72fd335575a11187c Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 4 Mar 2024 14:43:49 +0000 Subject: [PATCH 07/17] [BOT] post-merge updates --- stock_picking_partner_note/README.rst | 2 +- stock_picking_partner_note/__manifest__.py | 2 +- stock_picking_partner_note/static/description/index.html | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/stock_picking_partner_note/README.rst b/stock_picking_partner_note/README.rst index 7cb91cf8742c..043cf355660f 100644 --- a/stock_picking_partner_note/README.rst +++ b/stock_picking_partner_note/README.rst @@ -7,7 +7,7 @@ Stock Picking Partner Note !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:6b4a55a5fdd412f48d5058ba02b8f222f60cd690468612419b6ce3966c84275c + !! source digest: sha256:64e21fed2985a09f0a10ef6763d0dc6d45a8a863c6a23312967a4e559ac9e7c8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/stock_picking_partner_note/__manifest__.py b/stock_picking_partner_note/__manifest__.py index 909d3a4e85d9..8edb62d82ad5 100644 --- a/stock_picking_partner_note/__manifest__.py +++ b/stock_picking_partner_note/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Stock Picking Partner Note", - "version": "16.0.1.0.0", + "version": "16.0.1.0.1", "development_status": "Beta", "category": "Product", "summary": "Add partner notes on picking", diff --git a/stock_picking_partner_note/static/description/index.html b/stock_picking_partner_note/static/description/index.html index 7a162bc6c807..81e680c62cb9 100644 --- a/stock_picking_partner_note/static/description/index.html +++ b/stock_picking_partner_note/static/description/index.html @@ -1,4 +1,3 @@ - @@ -367,7 +366,7 @@

Stock Picking Partner Note

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:6b4a55a5fdd412f48d5058ba02b8f222f60cd690468612419b6ce3966c84275c +!! source digest: sha256:64e21fed2985a09f0a10ef6763d0dc6d45a8a863c6a23312967a4e559ac9e7c8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

Allow to record a message for the person in charge of order preparation at the level of the customer, From 4fdbfef3162739351624307a7d700d4a35febb64 Mon Sep 17 00:00:00 2001 From: Telmo Santos Date: Thu, 14 Mar 2024 11:57:15 +0100 Subject: [PATCH 08/17] [IMP] stock_picking_partner_note check note already in use --- stock_picking_partner_note/__manifest__.py | 1 + stock_picking_partner_note/i18n/fr.po | 23 ++++++++++++++++ .../i18n/stock_picking_partner_note.pot | 26 ++++++++++++++++--- stock_picking_partner_note/models/__init__.py | 2 ++ .../models/res_company.py | 13 ++++++++++ .../models/res_config_settings.py | 15 +++++++++++ .../models/stock_picking_note.py | 25 +++++++++++++++++- .../readme/CONFIGURE.rst | 3 +++ .../tests/test_stock_picking_partner_note.py | 24 +++++++++++++++++ .../views/res_config_settings.xml | 26 +++++++++++++++++++ 10 files changed, 154 insertions(+), 4 deletions(-) create mode 100644 stock_picking_partner_note/models/res_company.py create mode 100644 stock_picking_partner_note/models/res_config_settings.py create mode 100644 stock_picking_partner_note/views/res_config_settings.xml diff --git a/stock_picking_partner_note/__manifest__.py b/stock_picking_partner_note/__manifest__.py index 8edb62d82ad5..66ce80579e9b 100644 --- a/stock_picking_partner_note/__manifest__.py +++ b/stock_picking_partner_note/__manifest__.py @@ -18,6 +18,7 @@ "views/stock_picking_type.xml", "views/stock_picking_note.xml", "views/stock_picking_partner_note_menus.xml", + "views/res_config_settings.xml", ], "installable": True, "auto_install": False, diff --git a/stock_picking_partner_note/i18n/fr.po b/stock_picking_partner_note/i18n/fr.po index 3c7a4f74ed1d..a7c50f994d93 100644 --- a/stock_picking_partner_note/i18n/fr.po +++ b/stock_picking_partner_note/i18n/fr.po @@ -52,3 +52,26 @@ msgstr "Opération Type de note" #: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_type_tree msgid "Picking Note Types" msgstr "Opération Types de note" + +#. module: stock_picking_partner_note +#. odoo-python +#: code:addons/stock_picking_partner_note/models/stock_picking_note.py:0 +#, python-format +msgid "" +"You cannot update or delete a note that linked to multiple contacts: " +"%(partner_ids)s" +msgstr "Vous ne pouvez pas mettre à jour ou supprimer une note liée à plusieurs contacts." + +#. module: stock_picking_partner_note +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.res_config_settings_view_form +msgid "" +"Add a constraint to check if the picking note is already in use on multiple " +"partner" +msgstr "Ajout d'une contrainte pour vérifier si la note de prélèvement est déjà utilisée par plusieurs " +"partenaires" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_company__check_note_already_in_use +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_config_settings__check_note_already_in_use +msgid "Check picking note already in use" +msgstr "Vérifier la note de prélèvement déjà utilisée" diff --git a/stock_picking_partner_note/i18n/stock_picking_partner_note.pot b/stock_picking_partner_note/i18n/stock_picking_partner_note.pot index 5e96fcc60d07..0cd60d1a5194 100644 --- a/stock_picking_partner_note/i18n/stock_picking_partner_note.pot +++ b/stock_picking_partner_note/i18n/stock_picking_partner_note.pot @@ -4,8 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" +"Project-Id-Version: Odoo Server 16.0+e\n" "Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-03-14 10:52+0000\n" +"PO-Revision-Date: 2024-03-14 10:52+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -19,10 +21,19 @@ msgid "Active" msgstr "" #. module: stock_picking_partner_note -#: model:ir.model,name:stock_picking_partner_note.model_res_partner -msgid "Contact" +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.res_config_settings_view_form +msgid "" +"Add a constraint to check if the picking note is already in use on multiple " +"partner" msgstr "" +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_company__check_note_already_in_use +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_config_settings__check_note_already_in_use +msgid "Check picking note already in use" +msgstr "" + + #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__create_uid #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__create_uid @@ -138,3 +149,12 @@ msgid "" "Type of note with customer preferences on how his products are prepared for " "delivery." msgstr "" + +#. module: stock_picking_partner_note +#. odoo-python +#: code:addons/stock_picking_partner_note/models/stock_picking_note.py:0 +#, python-format +msgid "" +"You cannot update or delete a note that linked to multiple contacts: " +"%(partner_ids)s" +msgstr "" diff --git a/stock_picking_partner_note/models/__init__.py b/stock_picking_partner_note/models/__init__.py index d84a8c844c26..3a2047306a5b 100644 --- a/stock_picking_partner_note/models/__init__.py +++ b/stock_picking_partner_note/models/__init__.py @@ -3,3 +3,5 @@ from . import stock_picking_type from . import stock_picking from . import res_partner +from . import res_company +from . import res_config_settings diff --git a/stock_picking_partner_note/models/res_company.py b/stock_picking_partner_note/models/res_company.py new file mode 100644 index 000000000000..fdc0133f3b64 --- /dev/null +++ b/stock_picking_partner_note/models/res_company.py @@ -0,0 +1,13 @@ +# Copyright 2024 Camptocamp (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class ResCompany(models.Model): + _inherit = "res.company" + + check_note_already_in_use = fields.Boolean( + string="Check picking note already in use", + default=False, + ) diff --git a/stock_picking_partner_note/models/res_config_settings.py b/stock_picking_partner_note/models/res_config_settings.py new file mode 100644 index 000000000000..64f4f0066e4d --- /dev/null +++ b/stock_picking_partner_note/models/res_config_settings.py @@ -0,0 +1,15 @@ +# Copyright 2024 Camptocamp (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + check_note_already_in_use = fields.Boolean( + related="company_id.check_note_already_in_use", + readonly=False, + help="That must be activated if you want to prevent the update or deletion " + "of a note that is already in use by multiple contacts.", + ) diff --git a/stock_picking_partner_note/models/stock_picking_note.py b/stock_picking_partner_note/models/stock_picking_note.py index aba199a23bbe..9556e85b301a 100644 --- a/stock_picking_partner_note/models/stock_picking_note.py +++ b/stock_picking_partner_note/models/stock_picking_note.py @@ -2,7 +2,8 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo import fields, models +from odoo import _, api, fields, models +from odoo.exceptions import UserError class StockPickingNote(models.Model): @@ -14,3 +15,25 @@ class StockPickingNote(models.Model): active = fields.Boolean(default=True) note_type_id = fields.Many2one("stock.picking.note.type", required=True) sequence = sequence = fields.Integer(related="note_type_id.sequence", store=True) + + def write(self, vals): + self.check_note_already_in_use() + return super().write(vals) + + @api.ondelete(at_uninstall=False) + def check_note_already_in_use(self): + if not self.env.user.company_id.check_note_already_in_use: + return True + for note in self: + partners = self.env["res.partner"].search( + [("stock_picking_note_ids", "in", note.ids)] + ) + if len(partners) > 1: + raise UserError( + _( + "You cannot update or delete a note that linked to multiple" + " contacts: %(partner_ids)s", + partner_ids=", ".join(partners.mapped("name")), + ) + ) + return True diff --git a/stock_picking_partner_note/readme/CONFIGURE.rst b/stock_picking_partner_note/readme/CONFIGURE.rst index 056b7576929c..7a1236ef54b3 100644 --- a/stock_picking_partner_note/readme/CONFIGURE.rst +++ b/stock_picking_partner_note/readme/CONFIGURE.rst @@ -1,3 +1,6 @@ * Create partner note types in Inventory > Configuration > Note Types. * In shipping operation types set field `Partner Note Type`. Only these types will be shown in picking operations notes. * On contacts add picking notes. + + +You can prevent users ot update or delete notes alredy in use by multiple customers by activating setting `Prevent update or delete of notes in use by multiple customers` in Inventory > Configuration > Settings. diff --git a/stock_picking_partner_note/tests/test_stock_picking_partner_note.py b/stock_picking_partner_note/tests/test_stock_picking_partner_note.py index 59e554ea5673..fdb0fab5f8f5 100644 --- a/stock_picking_partner_note/tests/test_stock_picking_partner_note.py +++ b/stock_picking_partner_note/tests/test_stock_picking_partner_note.py @@ -1,6 +1,7 @@ # Copyright 2024 Camptocamp (). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from odoo.exceptions import UserError from odoo.tests import Form, common from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT @@ -42,3 +43,26 @@ def test_picking_partner_note(self): ] self.order.action_confirm() self.assertIn("

Note 1
Note 2

", self.order.picking_ids[0].note) + + def test_no_check_note_already_in_use(self): + self.assertTrue( + self.partner_a.stock_picking_note_ids.check_note_already_in_use() + ) + + def test_picking_partner_note_already_in_use(self): + """Test that we cannot update or delete a note that is already in use.""" + self.env.user.company_id.check_note_already_in_use = True + partner_b = self.env["res.partner"].create( + { + "name": "Customer B", + "stock_picking_note_ids": [ + (4, self.partner_a.stock_picking_note_ids[0].id), + ], + } + ) + # We cannot update a note that is already in use + with self.assertRaises(UserError): + partner_b.stock_picking_note_ids.write({"name": "Changed Note"}) + # We cannot delete a note that is already in use + with self.assertRaises(UserError): + partner_b.stock_picking_note_ids.unlink() diff --git a/stock_picking_partner_note/views/res_config_settings.xml b/stock_picking_partner_note/views/res_config_settings.xml new file mode 100644 index 000000000000..11c4f1a7e8d0 --- /dev/null +++ b/stock_picking_partner_note/views/res_config_settings.xml @@ -0,0 +1,26 @@ + + + + res.config.settings.view.form + res.config.settings + + + +
+
+ +
+
+
+
+
+
+
+
From d9115aa592438eddddc4b419d2e2264dae19b290 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Tue, 26 Mar 2024 11:10:43 +0000 Subject: [PATCH 09/17] [UPD] Update stock_picking_partner_note.pot --- .../i18n/stock_picking_partner_note.pot | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/stock_picking_partner_note/i18n/stock_picking_partner_note.pot b/stock_picking_partner_note/i18n/stock_picking_partner_note.pot index 0cd60d1a5194..3c977959f812 100644 --- a/stock_picking_partner_note/i18n/stock_picking_partner_note.pot +++ b/stock_picking_partner_note/i18n/stock_picking_partner_note.pot @@ -4,10 +4,8 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0+e\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-14 10:52+0000\n" -"PO-Revision-Date: 2024-03-14 10:52+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -33,6 +31,20 @@ msgstr "" msgid "Check picking note already in use" msgstr "" +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_res_company +msgid "Companies" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_res_partner +msgid "Contact" +msgstr "" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__create_uid @@ -138,6 +150,13 @@ msgstr "" msgid "Stock Picking Note Types" msgstr "" +#. module: stock_picking_partner_note +#: model:ir.model.fields,help:stock_picking_partner_note.field_res_config_settings__check_note_already_in_use +msgid "" +"That must be activated if you want to prevent the update or deletion of a " +"note that is already in use by multiple contacts." +msgstr "" + #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_stock_picking msgid "Transfer" From ac21480b7b5fac3502f0177811fc2f759aba05b6 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 26 Mar 2024 11:15:57 +0000 Subject: [PATCH 10/17] [BOT] post-merge updates --- stock_picking_partner_note/README.rst | 5 ++++- stock_picking_partner_note/__manifest__.py | 2 +- stock_picking_partner_note/static/description/index.html | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/stock_picking_partner_note/README.rst b/stock_picking_partner_note/README.rst index 043cf355660f..9c49ef920846 100644 --- a/stock_picking_partner_note/README.rst +++ b/stock_picking_partner_note/README.rst @@ -7,7 +7,7 @@ Stock Picking Partner Note !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:64e21fed2985a09f0a10ef6763d0dc6d45a8a863c6a23312967a4e559ac9e7c8 + !! source digest: sha256:f95766f575f6b83457b2b0d305d7506a2be1f61adfe5eb9f8581aff1fa377bb9 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -45,6 +45,9 @@ Configuration * In shipping operation types set field `Partner Note Type`. Only these types will be shown in picking operations notes. * On contacts add picking notes. + +You can prevent users ot update or delete notes alredy in use by multiple customers by activating setting `Prevent update or delete of notes in use by multiple customers` in Inventory > Configuration > Settings. + Bug Tracker =========== diff --git a/stock_picking_partner_note/__manifest__.py b/stock_picking_partner_note/__manifest__.py index 66ce80579e9b..66d1f553fbf0 100644 --- a/stock_picking_partner_note/__manifest__.py +++ b/stock_picking_partner_note/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Stock Picking Partner Note", - "version": "16.0.1.0.1", + "version": "16.0.1.1.0", "development_status": "Beta", "category": "Product", "summary": "Add partner notes on picking", diff --git a/stock_picking_partner_note/static/description/index.html b/stock_picking_partner_note/static/description/index.html index 81e680c62cb9..b73d7157f4bc 100644 --- a/stock_picking_partner_note/static/description/index.html +++ b/stock_picking_partner_note/static/description/index.html @@ -366,7 +366,7 @@

Stock Picking Partner Note

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:64e21fed2985a09f0a10ef6763d0dc6d45a8a863c6a23312967a4e559ac9e7c8 +!! source digest: sha256:f95766f575f6b83457b2b0d305d7506a2be1f61adfe5eb9f8581aff1fa377bb9 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

Allow to record a message for the person in charge of order preparation at the level of the customer, @@ -391,6 +391,7 @@

Configuration

  • In shipping operation types set field Partner Note Type. Only these types will be shown in picking operations notes.
  • On contacts add picking notes.
  • +

    You can prevent users ot update or delete notes alredy in use by multiple customers by activating setting Prevent update or delete of notes in use by multiple customers in Inventory > Configuration > Settings.

    Bug Tracker

    From b4ac3d6dd5a1655a1efa2b389b6acfb76ad566a1 Mon Sep 17 00:00:00 2001 From: Weblate Date: Tue, 26 Mar 2024 11:16:18 +0000 Subject: [PATCH 11/17] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_partner_note Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_partner_note/ --- stock_picking_partner_note/i18n/fr.po | 148 ++++++++++++++++++++++---- stock_picking_partner_note/i18n/it.po | 39 +++++++ 2 files changed, 169 insertions(+), 18 deletions(-) diff --git a/stock_picking_partner_note/i18n/fr.po b/stock_picking_partner_note/i18n/fr.po index a7c50f994d93..2c7eb8435121 100644 --- a/stock_picking_partner_note/i18n/fr.po +++ b/stock_picking_partner_note/i18n/fr.po @@ -10,11 +10,88 @@ msgstr "" "PO-Revision-Date: 2024-02-05 10:49+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_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__active +msgid "Active" +msgstr "" + +#. module: stock_picking_partner_note +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.res_config_settings_view_form +msgid "" +"Add a constraint to check if the picking note is already in use on multiple " +"partner" +msgstr "" +"Ajout d'une contrainte pour vérifier si la note de prélèvement est déjà " +"utilisée par plusieurs partenaires" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_company__check_note_already_in_use +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_config_settings__check_note_already_in_use +msgid "Check picking note already in use" +msgstr "Vérifier la note de prélèvement déjà utilisée" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_res_company +msgid "Companies" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_res_partner +msgid "Contact" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__create_uid +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__create_uid +msgid "Created by" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__create_date +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__create_date +msgid "Created on" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__display_name +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__display_name +msgid "Display Name" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__id +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__id +msgid "ID" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note____last_update +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type____last_update +msgid "Last Modified on" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__write_uid +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__write_date +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__write_date +msgid "Last Updated on" +msgstr "" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__name @@ -28,10 +105,14 @@ msgid "Note Type" msgstr "Type de note" #. module: stock_picking_partner_note -#: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_note_types_menu_menu +#: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_note_types_menu msgid "Note Types" msgstr "Type de notes" +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking__note +msgid "Notes" +msgstr "" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_type__partner_note_type_ids @@ -39,19 +120,59 @@ msgid "Partner Note Type" msgstr "Type de note partenaire" #. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_note #: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_form msgid "Picking Note" msgstr "Note d'opération" #. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_note_type #: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_type_form msgid "Picking Note Type" msgstr "Opération Type de note" #. module: stock_picking_partner_note -#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_stock_picking_note_type_tree -msgid "Picking Note Types" -msgstr "Opération Types de note" +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_partner__stock_picking_note_ids +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_users__stock_picking_note_ids +#: model:ir.ui.menu,name:stock_picking_partner_note.stock_picking_notes_root +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.view_partner_form_inherit +msgid "Picking Notes" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking_type +msgid "Picking Type" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__sequence +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note_type__sequence +msgid "Sequence" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.actions.act_window,name:stock_picking_partner_note.stock_picking_note_types_act_window +msgid "Stock Picking Note Types" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,help:stock_picking_partner_note.field_res_config_settings__check_note_already_in_use +msgid "" +"That must be activated if you want to prevent the update or deletion of a " +"note that is already in use by multiple contacts." +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_stock_picking +msgid "Transfer" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,help:stock_picking_partner_note.field_stock_picking_type__partner_note_type_ids +msgid "" +"Type of note with customer preferences on how his products are prepared for " +"delivery." +msgstr "" #. module: stock_picking_partner_note #. odoo-python @@ -60,18 +181,9 @@ msgstr "Opération Types de note" msgid "" "You cannot update or delete a note that linked to multiple contacts: " "%(partner_ids)s" -msgstr "Vous ne pouvez pas mettre à jour ou supprimer une note liée à plusieurs contacts." - -#. module: stock_picking_partner_note -#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.res_config_settings_view_form -msgid "" -"Add a constraint to check if the picking note is already in use on multiple " -"partner" -msgstr "Ajout d'une contrainte pour vérifier si la note de prélèvement est déjà utilisée par plusieurs " -"partenaires" +msgstr "" +"Vous ne pouvez pas mettre à jour ou supprimer une note liée à plusieurs " +"contacts." -#. module: stock_picking_partner_note -#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_company__check_note_already_in_use -#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_config_settings__check_note_already_in_use -msgid "Check picking note already in use" -msgstr "Vérifier la note de prélèvement déjà utilisée" +#~ msgid "Picking Note Types" +#~ msgstr "Opération Types de note" diff --git a/stock_picking_partner_note/i18n/it.po b/stock_picking_partner_note/i18n/it.po index bd86480d4601..7667168dbf04 100644 --- a/stock_picking_partner_note/i18n/it.po +++ b/stock_picking_partner_note/i18n/it.po @@ -21,6 +21,29 @@ msgstr "" msgid "Active" msgstr "Attiva" +#. module: stock_picking_partner_note +#: model_terms:ir.ui.view,arch_db:stock_picking_partner_note.res_config_settings_view_form +msgid "" +"Add a constraint to check if the picking note is already in use on multiple " +"partner" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_company__check_note_already_in_use +#: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_config_settings__check_note_already_in_use +msgid "Check picking note already in use" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_res_company +msgid "Companies" +msgstr "" + +#. module: stock_picking_partner_note +#: model:ir.model,name:stock_picking_partner_note.model_res_config_settings +msgid "Config Settings" +msgstr "" + #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_res_partner msgid "Contact" @@ -130,6 +153,13 @@ msgstr "Sequenza" msgid "Stock Picking Note Types" msgstr "Tipi nota prelievo magazzino" +#. module: stock_picking_partner_note +#: model:ir.model.fields,help:stock_picking_partner_note.field_res_config_settings__check_note_already_in_use +msgid "" +"That must be activated if you want to prevent the update or deletion of a " +"note that is already in use by multiple contacts." +msgstr "" + #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_stock_picking msgid "Transfer" @@ -143,3 +173,12 @@ msgid "" msgstr "" "Tipo nota con preferenze cliente su come i suoi prodotti sono preparati per " "la spedizione." + +#. module: stock_picking_partner_note +#. odoo-python +#: code:addons/stock_picking_partner_note/models/stock_picking_note.py:0 +#, python-format +msgid "" +"You cannot update or delete a note that linked to multiple contacts: " +"%(partner_ids)s" +msgstr "" From ffc43151796c4e0d55f739735e7a2f3dc8ef32b0 Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 2 Apr 2024 10:02:56 +0000 Subject: [PATCH 12/17] Translated using Weblate (Italian) Currently translated at 100.0% (28 of 28 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_partner_note Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_partner_note/it/ --- stock_picking_partner_note/i18n/it.po | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/stock_picking_partner_note/i18n/it.po b/stock_picking_partner_note/i18n/it.po index 7667168dbf04..f89e55e5665c 100644 --- a/stock_picking_partner_note/i18n/it.po +++ b/stock_picking_partner_note/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2024-02-16 16:37+0000\n" +"PO-Revision-Date: 2024-04-02 12:36+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -27,22 +27,24 @@ msgid "" "Add a constraint to check if the picking note is already in use on multiple " "partner" msgstr "" +"Aggiungere un vincolo per verificare se la nota del prelievo è già in uso su " +"più partner" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_company__check_note_already_in_use #: model:ir.model.fields,field_description:stock_picking_partner_note.field_res_config_settings__check_note_already_in_use msgid "Check picking note already in use" -msgstr "" +msgstr "Contollo nota prelievo già in uso" #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_res_company msgid "Companies" -msgstr "" +msgstr "Aziende" #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_res_config_settings msgid "Config Settings" -msgstr "" +msgstr "Impostazioni configurazione" #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_res_partner @@ -159,6 +161,8 @@ msgid "" "That must be activated if you want to prevent the update or deletion of a " "note that is already in use by multiple contacts." msgstr "" +"Questo deve essere attivato se si vuole prevenire la modifica o la " +"cancellazione di una nota che è già in uso da più contatti." #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_stock_picking @@ -182,3 +186,5 @@ msgid "" "You cannot update or delete a note that linked to multiple contacts: " "%(partner_ids)s" msgstr "" +"Non si può modificare o cancellare una nota che è collegata a più contatti: " +"%(partner_ids)s" From 671e0c89a131ddcc47dda014e638657c4370faf4 Mon Sep 17 00:00:00 2001 From: mymage Date: Thu, 22 Aug 2024 08:51:04 +0000 Subject: [PATCH 13/17] Translated using Weblate (Italian) Currently translated at 100.0% (28 of 28 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_partner_note Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_partner_note/it/ --- stock_picking_partner_note/i18n/it.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stock_picking_partner_note/i18n/it.po b/stock_picking_partner_note/i18n/it.po index f89e55e5665c..70a1093c83aa 100644 --- a/stock_picking_partner_note/i18n/it.po +++ b/stock_picking_partner_note/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2024-04-02 12:36+0000\n" +"PO-Revision-Date: 2024-08-22 10:06+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.17\n" +"X-Generator: Weblate 5.6.2\n" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__active @@ -142,7 +142,7 @@ msgstr "Note prelievo" #. module: stock_picking_partner_note #: model:ir.model,name:stock_picking_partner_note.model_stock_picking_type msgid "Picking Type" -msgstr "Tipologia prelievo" +msgstr "Tipo prelievo" #. module: stock_picking_partner_note #: model:ir.model.fields,field_description:stock_picking_partner_note.field_stock_picking_note__sequence From d65cef6800dbc97b0fad00c5926178838b31daa8 Mon Sep 17 00:00:00 2001 From: andrea Date: Tue, 8 Oct 2024 18:12:48 +0200 Subject: [PATCH 14/17] [MIG] stock_picking_partner_note: pre-commit --- stock_picking_partner_note/README.rst | 40 ++++++++++--------- stock_picking_partner_note/pyproject.toml | 3 ++ .../readme/CONFIGURE.md | 9 +++++ .../readme/CONFIGURE.rst | 6 --- .../readme/CONTRIBUTORS.md | 2 + .../readme/CONTRIBUTORS.rst | 2 - .../readme/DESCRIPTION.md | 3 ++ .../readme/DESCRIPTION.rst | 4 -- .../static/description/index.html | 19 +++++---- 9 files changed, 50 insertions(+), 38 deletions(-) create mode 100644 stock_picking_partner_note/pyproject.toml create mode 100644 stock_picking_partner_note/readme/CONFIGURE.md delete mode 100644 stock_picking_partner_note/readme/CONFIGURE.rst create mode 100644 stock_picking_partner_note/readme/CONTRIBUTORS.md delete mode 100644 stock_picking_partner_note/readme/CONTRIBUTORS.rst create mode 100644 stock_picking_partner_note/readme/DESCRIPTION.md delete mode 100644 stock_picking_partner_note/readme/DESCRIPTION.rst diff --git a/stock_picking_partner_note/README.rst b/stock_picking_partner_note/README.rst index 9c49ef920846..ee9a6b423f8d 100644 --- a/stock_picking_partner_note/README.rst +++ b/stock_picking_partner_note/README.rst @@ -17,21 +17,20 @@ Stock Picking Partner Note :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/16.0/stock_picking_partner_note + :target: https://github.com/OCA/stock-logistics-workflow/tree/17.0/stock_picking_partner_note :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-16-0/stock-logistics-workflow-16-0-stock_picking_partner_note + :target: https://translation.odoo-community.org/projects/stock-logistics-workflow-17-0/stock-logistics-workflow-17-0-stock_picking_partner_note :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=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-workflow&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -Allow to record a message for the person in charge of order preparation at the level of the customer, -then have it as a note on the picking transfer. - - +Allow to record a message for the person in charge of order preparation +at the level of the customer, then have it as a note on the picking +transfer. **Table of contents** @@ -41,12 +40,15 @@ then have it as a note on the picking transfer. Configuration ============= -* Create partner note types in Inventory > Configuration > Note Types. -* In shipping operation types set field `Partner Note Type`. Only these types will be shown in picking operations notes. -* On contacts add picking notes. - +- Create partner note types in Inventory > Configuration > Note Types. +- In shipping operation types set field Partner Note Type. Only these + types will be shown in picking operations notes. +- On contacts add picking notes. -You can prevent users ot update or delete notes alredy in use by multiple customers by activating setting `Prevent update or delete of notes in use by multiple customers` in Inventory > Configuration > Settings. +You can prevent users ot update or delete notes alredy in use by +multiple customers by activating setting Prevent update or delete of +notes in use by multiple customers in Inventory > Configuration > +Settings. Bug Tracker =========== @@ -54,7 +56,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -62,19 +64,19 @@ Credits ======= Authors -~~~~~~~ +------- * Camptocamp * BCIM Contributors -~~~~~~~~~~~~ +------------ -* Telmo Santos -* Jacques-Etienne Baudoux +- Telmo Santos +- Jacques-Etienne Baudoux Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -86,6 +88,6 @@ 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. +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_partner_note/pyproject.toml b/stock_picking_partner_note/pyproject.toml new file mode 100644 index 000000000000..4231d0cccb3d --- /dev/null +++ b/stock_picking_partner_note/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/stock_picking_partner_note/readme/CONFIGURE.md b/stock_picking_partner_note/readme/CONFIGURE.md new file mode 100644 index 000000000000..0b72dd705047 --- /dev/null +++ b/stock_picking_partner_note/readme/CONFIGURE.md @@ -0,0 +1,9 @@ +- Create partner note types in Inventory \> Configuration \> Note Types. +- In shipping operation types set field Partner Note Type. Only these + types will be shown in picking operations notes. +- On contacts add picking notes. + +You can prevent users ot update or delete notes alredy in use by +multiple customers by activating setting Prevent update or delete of +notes in use by multiple customers in Inventory \> Configuration \> +Settings. diff --git a/stock_picking_partner_note/readme/CONFIGURE.rst b/stock_picking_partner_note/readme/CONFIGURE.rst deleted file mode 100644 index 7a1236ef54b3..000000000000 --- a/stock_picking_partner_note/readme/CONFIGURE.rst +++ /dev/null @@ -1,6 +0,0 @@ -* Create partner note types in Inventory > Configuration > Note Types. -* In shipping operation types set field `Partner Note Type`. Only these types will be shown in picking operations notes. -* On contacts add picking notes. - - -You can prevent users ot update or delete notes alredy in use by multiple customers by activating setting `Prevent update or delete of notes in use by multiple customers` in Inventory > Configuration > Settings. diff --git a/stock_picking_partner_note/readme/CONTRIBUTORS.md b/stock_picking_partner_note/readme/CONTRIBUTORS.md new file mode 100644 index 000000000000..5b399cf242fa --- /dev/null +++ b/stock_picking_partner_note/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Telmo Santos \<\> +- Jacques-Etienne Baudoux \<\> diff --git a/stock_picking_partner_note/readme/CONTRIBUTORS.rst b/stock_picking_partner_note/readme/CONTRIBUTORS.rst deleted file mode 100644 index 22612a25009e..000000000000 --- a/stock_picking_partner_note/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,2 +0,0 @@ -* Telmo Santos -* Jacques-Etienne Baudoux diff --git a/stock_picking_partner_note/readme/DESCRIPTION.md b/stock_picking_partner_note/readme/DESCRIPTION.md new file mode 100644 index 000000000000..050904944e2f --- /dev/null +++ b/stock_picking_partner_note/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +Allow to record a message for the person in charge of order preparation +at the level of the customer, then have it as a note on the picking +transfer. diff --git a/stock_picking_partner_note/readme/DESCRIPTION.rst b/stock_picking_partner_note/readme/DESCRIPTION.rst deleted file mode 100644 index f5a6ef308b30..000000000000 --- a/stock_picking_partner_note/readme/DESCRIPTION.rst +++ /dev/null @@ -1,4 +0,0 @@ -Allow to record a message for the person in charge of order preparation at the level of the customer, -then have it as a note on the picking transfer. - - diff --git a/stock_picking_partner_note/static/description/index.html b/stock_picking_partner_note/static/description/index.html index b73d7157f4bc..51cdd739e857 100644 --- a/stock_picking_partner_note/static/description/index.html +++ b/stock_picking_partner_note/static/description/index.html @@ -368,9 +368,10 @@

    Stock Picking Partner Note

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:f95766f575f6b83457b2b0d305d7506a2be1f61adfe5eb9f8581aff1fa377bb9 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

    -

    Allow to record a message for the person in charge of order preparation at the level of the customer, -then have it as a note on the picking transfer.

    +

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

    +

    Allow to record a message for the person in charge of order preparation +at the level of the customer, then have it as a note on the picking +transfer.

    Table of contents

      @@ -388,17 +389,21 @@

      Stock Picking Partner Note

      Configuration

      • Create partner note types in Inventory > Configuration > Note Types.
      • -
      • In shipping operation types set field Partner Note Type. Only these types will be shown in picking operations notes.
      • +
      • In shipping operation types set field Partner Note Type. Only these +types will be shown in picking operations notes.
      • On contacts add picking notes.
      -

      You can prevent users ot update or delete notes alredy in use by multiple customers by activating setting Prevent update or delete of notes in use by multiple customers in Inventory > Configuration > Settings.

      +

      You can prevent users ot update or delete notes alredy in use by +multiple customers by activating setting Prevent update or delete of +notes in use by multiple customers in Inventory > Configuration > +Settings.

    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.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -424,7 +429,7 @@

    Maintainers

    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.

    +

    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.

    From 095bdddac1a74379a8a00a78c3a98ab73f7a9896 Mon Sep 17 00:00:00 2001 From: andrea Date: Tue, 8 Oct 2024 18:20:55 +0200 Subject: [PATCH 15/17] [MIG] stock_picking_partner_note: migrate to V17 --- stock_picking_partner_note/README.rst | 3 +++ stock_picking_partner_note/__manifest__.py | 2 +- .../models/stock_picking.py | 3 ++- .../readme/CONTRIBUTORS.md | 2 ++ .../static/description/index.html | 4 ++++ .../views/res_config_settings.xml | 22 ++++++++----------- .../views/stock_picking_type.xml | 4 ++-- 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/stock_picking_partner_note/README.rst b/stock_picking_partner_note/README.rst index ee9a6b423f8d..b1dca34f14c7 100644 --- a/stock_picking_partner_note/README.rst +++ b/stock_picking_partner_note/README.rst @@ -74,6 +74,9 @@ Contributors - Telmo Santos - Jacques-Etienne Baudoux +- `360ERP `__: + + - Andrea Stirpe Maintainers ----------- diff --git a/stock_picking_partner_note/__manifest__.py b/stock_picking_partner_note/__manifest__.py index 66d1f553fbf0..ca12d2c88531 100644 --- a/stock_picking_partner_note/__manifest__.py +++ b/stock_picking_partner_note/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Stock Picking Partner Note", - "version": "16.0.1.1.0", + "version": "17.0.1.0.0", "development_status": "Beta", "category": "Product", "summary": "Add partner notes on picking", diff --git a/stock_picking_partner_note/models/stock_picking.py b/stock_picking_partner_note/models/stock_picking.py index a86e315908d5..c5346cbb66fc 100644 --- a/stock_picking_partner_note/models/stock_picking.py +++ b/stock_picking_partner_note/models/stock_picking.py @@ -15,7 +15,8 @@ def _compute_note(self): for picking in self: picking_type_note_type_ids = picking.picking_type_id.partner_note_type_ids picking_notes = picking.partner_id.stock_picking_note_ids.filtered( - lambda n: n.active and n.note_type_id in picking_type_note_type_ids + lambda n, ptnts=picking_type_note_type_ids: n.active + and n.note_type_id in ptnts ) picking_notes = [ note.name.strip() diff --git a/stock_picking_partner_note/readme/CONTRIBUTORS.md b/stock_picking_partner_note/readme/CONTRIBUTORS.md index 5b399cf242fa..77dda21fcce0 100644 --- a/stock_picking_partner_note/readme/CONTRIBUTORS.md +++ b/stock_picking_partner_note/readme/CONTRIBUTORS.md @@ -1,2 +1,4 @@ - Telmo Santos \<\> - Jacques-Etienne Baudoux \<\> +- [360ERP](https://www.360erp.com): + - Andrea Stirpe diff --git a/stock_picking_partner_note/static/description/index.html b/stock_picking_partner_note/static/description/index.html index 51cdd739e857..96d2b397e196 100644 --- a/stock_picking_partner_note/static/description/index.html +++ b/stock_picking_partner_note/static/description/index.html @@ -420,6 +420,10 @@

    Contributors

    diff --git a/stock_picking_partner_note/views/res_config_settings.xml b/stock_picking_partner_note/views/res_config_settings.xml index 11c4f1a7e8d0..a4bd1239d53b 100644 --- a/stock_picking_partner_note/views/res_config_settings.xml +++ b/stock_picking_partner_note/views/res_config_settings.xml @@ -5,21 +5,17 @@ res.config.settings - -
    + -
    - -
    -
    -
    -
    + +
    diff --git a/stock_picking_partner_note/views/stock_picking_type.xml b/stock_picking_partner_note/views/stock_picking_type.xml index 39055dcd383f..4dea63854fbe 100644 --- a/stock_picking_partner_note/views/stock_picking_type.xml +++ b/stock_picking_partner_note/views/stock_picking_type.xml @@ -1,11 +1,11 @@ - + Operation Types stock.picking.type - + From 7d323f93d8c9e00c8276c2b9a40c614ad7228955 Mon Sep 17 00:00:00 2001 From: Andrea Stirpe Date: Wed, 15 Jan 2025 21:14:23 +0100 Subject: [PATCH 16/17] [MIG] stock_picking_partner_note: Improving help messages and readme Update stock_picking_partner_note/models/res_config_settings.py Update stock_picking_partner_note/models/stock_picking_note.py Update stock_picking_partner_note/readme/CONFIGURE.md Update stock_picking_partner_note/readme/DESCRIPTION.md Co-authored-by: Stefan Rijnhart (Opener) --- stock_picking_partner_note/models/res_config_settings.py | 4 ++-- stock_picking_partner_note/models/stock_picking_note.py | 2 +- stock_picking_partner_note/readme/CONFIGURE.md | 2 +- stock_picking_partner_note/readme/DESCRIPTION.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stock_picking_partner_note/models/res_config_settings.py b/stock_picking_partner_note/models/res_config_settings.py index 64f4f0066e4d..794a6f8a2895 100644 --- a/stock_picking_partner_note/models/res_config_settings.py +++ b/stock_picking_partner_note/models/res_config_settings.py @@ -10,6 +10,6 @@ class ResConfigSettings(models.TransientModel): check_note_already_in_use = fields.Boolean( related="company_id.check_note_already_in_use", readonly=False, - help="That must be activated if you want to prevent the update or deletion " - "of a note that is already in use by multiple contacts.", + help="Prevent the update or deletion of a note that is already in use by " + "more than one contact.", ) diff --git a/stock_picking_partner_note/models/stock_picking_note.py b/stock_picking_partner_note/models/stock_picking_note.py index 9556e85b301a..5ebfbf51489b 100644 --- a/stock_picking_partner_note/models/stock_picking_note.py +++ b/stock_picking_partner_note/models/stock_picking_note.py @@ -31,7 +31,7 @@ def check_note_already_in_use(self): if len(partners) > 1: raise UserError( _( - "You cannot update or delete a note that linked to multiple" + "You cannot update or delete a note that is linked to multiple" " contacts: %(partner_ids)s", partner_ids=", ".join(partners.mapped("name")), ) diff --git a/stock_picking_partner_note/readme/CONFIGURE.md b/stock_picking_partner_note/readme/CONFIGURE.md index 0b72dd705047..40be90e324cb 100644 --- a/stock_picking_partner_note/readme/CONFIGURE.md +++ b/stock_picking_partner_note/readme/CONFIGURE.md @@ -3,7 +3,7 @@ types will be shown in picking operations notes. - On contacts add picking notes. -You can prevent users ot update or delete notes alredy in use by +You can prevent users from updating or deleting notes already in use by multiple customers by activating setting Prevent update or delete of notes in use by multiple customers in Inventory \> Configuration \> Settings. diff --git a/stock_picking_partner_note/readme/DESCRIPTION.md b/stock_picking_partner_note/readme/DESCRIPTION.md index 050904944e2f..b06393ff2588 100644 --- a/stock_picking_partner_note/readme/DESCRIPTION.md +++ b/stock_picking_partner_note/readme/DESCRIPTION.md @@ -1,3 +1,3 @@ Allow to record a message for the person in charge of order preparation at the level of the customer, then have it as a note on the picking -transfer. +transfer. This reuses the existing note field on the picking and will make it read-only. From 16ab42a1aa9af095deee857976afc6b83b612210 Mon Sep 17 00:00:00 2001 From: andrea Date: Wed, 15 Jan 2025 21:22:51 +0100 Subject: [PATCH 17/17] [MIG] stock_picking_partner_note: make use of html_escape in picking note --- stock_picking_partner_note/models/stock_picking.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock_picking_partner_note/models/stock_picking.py b/stock_picking_partner_note/models/stock_picking.py index c5346cbb66fc..ca0add34e3c6 100644 --- a/stock_picking_partner_note/models/stock_picking.py +++ b/stock_picking_partner_note/models/stock_picking.py @@ -1,8 +1,8 @@ # Copyright 2024 Camptocamp (). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - from odoo import api, fields, models +from odoo.tools import html_escape class StockPicking(models.Model): @@ -19,7 +19,7 @@ def _compute_note(self): and n.note_type_id in ptnts ) picking_notes = [ - note.name.strip() + html_escape(note.name.strip()) for note in picking_notes if note.name and note.name.strip() ]