diff --git a/setup/stock_picking_signature/odoo/addons/stock_picking_signature b/setup/stock_picking_signature/odoo/addons/stock_picking_signature new file mode 120000 index 000000000..93a4ce9bb --- /dev/null +++ b/setup/stock_picking_signature/odoo/addons/stock_picking_signature @@ -0,0 +1 @@ +../../../../stock_picking_signature \ No newline at end of file diff --git a/setup/stock_picking_signature/setup.py b/setup/stock_picking_signature/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/stock_picking_signature/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_picking_signature/README.rst b/stock_picking_signature/README.rst new file mode 100644 index 000000000..cea0f63ad --- /dev/null +++ b/stock_picking_signature/README.rst @@ -0,0 +1,104 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +======================= +Stock Picking Signature +======================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:24005c73b96dfbcba449a2d4db82c8ba8652b2ec2d38310e2bb6d1aebb242acd + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-nuobit%2Fodoo--addons-lightgray.png?logo=github + :target: https://github.com/nuobit/odoo-addons/tree/16.0/stock_picking_signature + :alt: nuobit/odoo-addons + +|badge1| |badge2| |badge3| + +This module extends the stock picking signature functionality in Odoo 16. + +While Odoo 16 already includes a signature field on pickings, it is limited to outgoing +deliveries only and lacks metadata tracking. This module adds: + +* **Configurable per picking type**: A ``Require Signature`` option on operation types + lets administrators enable signature requirements for any type of transfer (receipts, + deliveries, internal transfers). +* **Signature metadata**: ``Signed By`` and ``Signed On`` fields are automatically + populated when a signature is captured. +* **Validation enforcement**: Transfers with a required signature cannot be validated + without one. +* **Extended reports**: Signature block added to the Picking Operations report in + addition to the existing Delivery Slip report. +* **Signature tab**: A dedicated "Signature" notebook tab on the picking form shows + signature details. + +.. IMPORTANT:: + This is an alpha version, the data model and design can change at any time without warning. + Only for development or testing purpose, do not use in production. + `More details on development status `_ + +**Table of contents** + +.. contents:: + :local: + +Known issues / Roadmap +====================== + +* Integration with ``sign_oca`` (`OCA/sign `_) for PDF + document signing workflows on stock pickings. +* Integration with ``stock_picking_portal`` + (`OCA/stock-logistics-workflow `_) + for portal-based signature capture, allowing external partners to sign pickings + directly from the portal. + +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 +~~~~~~~ + +* NuoBiT Solutions SL + +Contributors +~~~~~~~~~~~~ + +* `NuoBiT `__: + + * Eric Antones + +Maintainers +~~~~~~~~~~~ + +.. |maintainer-eantones| image:: https://github.com/eantones.png?size=40px + :target: https://github.com/eantones + :alt: eantones + +Current maintainer: + +|maintainer-eantones| + +This module is part of the `nuobit/odoo-addons `_ project on GitHub. + +You are welcome to contribute. diff --git a/stock_picking_signature/__init__.py b/stock_picking_signature/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/stock_picking_signature/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_picking_signature/__manifest__.py b/stock_picking_signature/__manifest__.py new file mode 100644 index 000000000..d9c1eac71 --- /dev/null +++ b/stock_picking_signature/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright 2026 NuoBiT Solutions SL - Eric Antones +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Stock Picking Signature", + "summary": "Configurable signature requirement per picking type", + "author": "NuoBiT Solutions SL", + "maintainers": ["eantones"], + "category": "Warehouse", + "development_status": "Alpha", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "website": "https://github.com/nuobit/odoo-addons", + "depends": [ + "stock", + ], + "data": [ + "views/stock_picking_type_views.xml", + "views/stock_picking_views.xml", + "report/report_deliveryslip.xml", + "report/report_stockpicking_operations.xml", + ], + "installable": True, +} diff --git a/stock_picking_signature/i18n/ca.po b/stock_picking_signature/i18n/ca.po new file mode 100644 index 000000000..afdcc5e60 --- /dev/null +++ b/stock_picking_signature/i18n/ca.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_signature +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_picking_signature +#: model:ir.model.fields,field_description:stock_picking_signature.field_stock_picking__require_signature +#: model:ir.model.fields,field_description:stock_picking_signature.field_stock_picking_type__require_signature +msgid "Require Signature" +msgstr "Requerir signatura" + +#. module: stock_picking_signature +#: model:ir.model.fields,help:stock_picking_signature.field_stock_picking_type__require_signature +msgid "If enabled, a signature will be required to validate transfers of this operation type." +msgstr "Si s'activa, es requerirà una signatura per validar les transferències d'aquest tipus d'operació." + +#. module: stock_picking_signature +#: model:ir.model.fields,field_description:stock_picking_signature.field_stock_picking__signed_by +msgid "Signed By" +msgstr "Signat per" + +#. module: stock_picking_signature +#: model:ir.model.fields,field_description:stock_picking_signature.field_stock_picking__signed_on +msgid "Signed On" +msgstr "Signat el" + +#. module: stock_picking_signature +#: model_terms:ir.ui.view,arch_db:stock_picking_signature.report_picking +#: model_terms:ir.ui.view,arch_db:stock_picking_signature.view_picking_form +msgid "Signature" +msgstr "Signatura" + +#. module: stock_picking_signature +#: code:addons/stock_picking_signature/models/stock_picking.py:0 +#, python-format +msgid "The following transfers require a signature before validation:\n%s" +msgstr "Les transferències següents requereixen una signatura abans de la validació:\n%s" diff --git a/stock_picking_signature/i18n/es.po b/stock_picking_signature/i18n/es.po new file mode 100644 index 000000000..2a2af1f19 --- /dev/null +++ b/stock_picking_signature/i18n/es.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_picking_signature +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_picking_signature +#: model:ir.model.fields,field_description:stock_picking_signature.field_stock_picking__require_signature +#: model:ir.model.fields,field_description:stock_picking_signature.field_stock_picking_type__require_signature +msgid "Require Signature" +msgstr "Requerir firma" + +#. module: stock_picking_signature +#: model:ir.model.fields,help:stock_picking_signature.field_stock_picking_type__require_signature +msgid "If enabled, a signature will be required to validate transfers of this operation type." +msgstr "Si se activa, se requerirá una firma para validar las transferencias de este tipo de operación." + +#. module: stock_picking_signature +#: model:ir.model.fields,field_description:stock_picking_signature.field_stock_picking__signed_by +msgid "Signed By" +msgstr "Firmado por" + +#. module: stock_picking_signature +#: model:ir.model.fields,field_description:stock_picking_signature.field_stock_picking__signed_on +msgid "Signed On" +msgstr "Firmado el" + +#. module: stock_picking_signature +#: model_terms:ir.ui.view,arch_db:stock_picking_signature.report_picking +#: model_terms:ir.ui.view,arch_db:stock_picking_signature.view_picking_form +msgid "Signature" +msgstr "Firma" + +#. module: stock_picking_signature +#: code:addons/stock_picking_signature/models/stock_picking.py:0 +#, python-format +msgid "The following transfers require a signature before validation:\n%s" +msgstr "Las transferencias siguientes requieren una firma antes de la validación:\n%s" diff --git a/stock_picking_signature/models/__init__.py b/stock_picking_signature/models/__init__.py new file mode 100644 index 000000000..dae0bb2ef --- /dev/null +++ b/stock_picking_signature/models/__init__.py @@ -0,0 +1,2 @@ +from . import stock_picking +from . import stock_picking_type diff --git a/stock_picking_signature/models/stock_picking.py b/stock_picking_signature/models/stock_picking.py new file mode 100644 index 000000000..51e430e38 --- /dev/null +++ b/stock_picking_signature/models/stock_picking.py @@ -0,0 +1,47 @@ +# Copyright 2026 NuoBiT Solutions SL - Eric Antones +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, fields, models +from odoo.exceptions import UserError + + +class StockPicking(models.Model): + _inherit = "stock.picking" + + require_signature = fields.Boolean( + related="picking_type_id.require_signature", + ) + signed_by = fields.Char( + copy=False, + ) + signed_on = fields.Datetime( + copy=False, + ) + + def write(self, vals): + res = super().write(vals) + if vals.get("signature"): + now = fields.Datetime.now() + for picking in self: + sign_vals = {} + if not picking.signed_by and picking.partner_id: + sign_vals["signed_by"] = picking.partner_id.name + if not picking.signed_on: + sign_vals["signed_on"] = now + if sign_vals: + super(StockPicking, picking).write(sign_vals) + return res + + def button_validate(self): + pickings_require_sign = self.filtered( + lambda p: p.require_signature and not p.signature + ) + if pickings_require_sign: + raise UserError( + _( + "The following transfers require a signature" + " before validation:\n%s", + "\n".join(pickings_require_sign.mapped("name")), + ) + ) + return super().button_validate() diff --git a/stock_picking_signature/models/stock_picking_type.py b/stock_picking_signature/models/stock_picking_type.py new file mode 100644 index 000000000..aac0deedf --- /dev/null +++ b/stock_picking_signature/models/stock_picking_type.py @@ -0,0 +1,13 @@ +# Copyright 2026 NuoBiT Solutions SL - Eric Antones +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class StockPickingType(models.Model): + _inherit = "stock.picking.type" + + require_signature = fields.Boolean( + help="If enabled, a signature will be required to validate " + "transfers of this operation type.", + ) diff --git a/stock_picking_signature/readme/CONTRIBUTORS.rst b/stock_picking_signature/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..866096fcb --- /dev/null +++ b/stock_picking_signature/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* `NuoBiT `__: + + * Eric Antones diff --git a/stock_picking_signature/readme/DESCRIPTION.rst b/stock_picking_signature/readme/DESCRIPTION.rst new file mode 100644 index 000000000..ee6cb9e63 --- /dev/null +++ b/stock_picking_signature/readme/DESCRIPTION.rst @@ -0,0 +1,16 @@ +This module extends the stock picking signature functionality in Odoo 16. + +While Odoo 16 already includes a signature field on pickings, it is limited to outgoing +deliveries only and lacks metadata tracking. This module adds: + +* **Configurable per picking type**: A ``Require Signature`` option on operation types + lets administrators enable signature requirements for any type of transfer (receipts, + deliveries, internal transfers). +* **Signature metadata**: ``Signed By`` and ``Signed On`` fields are automatically + populated when a signature is captured. +* **Validation enforcement**: Transfers with a required signature cannot be validated + without one. +* **Extended reports**: Signature block added to the Picking Operations report in + addition to the existing Delivery Slip report. +* **Signature tab**: A dedicated "Signature" notebook tab on the picking form shows + signature details. diff --git a/stock_picking_signature/readme/ROADMAP.rst b/stock_picking_signature/readme/ROADMAP.rst new file mode 100644 index 000000000..dbaa8a002 --- /dev/null +++ b/stock_picking_signature/readme/ROADMAP.rst @@ -0,0 +1,6 @@ +* Integration with ``sign_oca`` (`OCA/sign `_) for PDF + document signing workflows on stock pickings. +* Integration with ``stock_picking_portal`` + (`OCA/stock-logistics-workflow `_) + for portal-based signature capture, allowing external partners to sign pickings + directly from the portal. diff --git a/stock_picking_signature/report/report_deliveryslip.xml b/stock_picking_signature/report/report_deliveryslip.xml new file mode 100644 index 000000000..1187cc4aa --- /dev/null +++ b/stock_picking_signature/report/report_deliveryslip.xml @@ -0,0 +1,19 @@ + + + + + diff --git a/stock_picking_signature/report/report_stockpicking_operations.xml b/stock_picking_signature/report/report_stockpicking_operations.xml new file mode 100644 index 000000000..6b190b25f --- /dev/null +++ b/stock_picking_signature/report/report_stockpicking_operations.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/stock_picking_signature/static/description/icon.png b/stock_picking_signature/static/description/icon.png new file mode 100644 index 000000000..1cd641e79 Binary files /dev/null and b/stock_picking_signature/static/description/icon.png differ diff --git a/stock_picking_signature/static/description/index.html b/stock_picking_signature/static/description/index.html new file mode 100644 index 000000000..10e1f8dfd --- /dev/null +++ b/stock_picking_signature/static/description/index.html @@ -0,0 +1,460 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Stock Picking Signature

+ +

Alpha License: AGPL-3 nuobit/odoo-addons

+

This module extends the stock picking signature functionality in Odoo 16.

+

While Odoo 16 already includes a signature field on pickings, it is limited to outgoing +deliveries only and lacks metadata tracking. This module adds:

+
    +
  • Configurable per picking type: A Require Signature option on operation types +lets administrators enable signature requirements for any type of transfer (receipts, +deliveries, internal transfers).
  • +
  • Signature metadata: Signed By and Signed On fields are automatically +populated when a signature is captured.
  • +
  • Validation enforcement: Transfers with a required signature cannot be validated +without one.
  • +
  • Extended reports: Signature block added to the Picking Operations report in +addition to the existing Delivery Slip report.
  • +
  • Signature tab: A dedicated “Signature” notebook tab on the picking form shows +signature details.
  • +
+
+

Important

+

This is an alpha version, the data model and design can change at any time without warning. +Only for development or testing purpose, do not use in production. +More details on development status

+
+

Table of contents

+ +
+

Known issues / Roadmap

+
    +
  • Integration with sign_oca (OCA/sign) for PDF +document signing workflows on stock pickings.
  • +
  • Integration with stock_picking_portal +(OCA/stock-logistics-workflow) +for portal-based signature capture, allowing external partners to sign pickings +directly from the portal.
  • +
+
+
+

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

+
    +
  • NuoBiT Solutions SL
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

Current maintainer:

+

eantones

+

This module is part of the nuobit/odoo-addons project on GitHub.

+

You are welcome to contribute.

+
+
+
+
+ + diff --git a/stock_picking_signature/views/stock_picking_type_views.xml b/stock_picking_signature/views/stock_picking_type_views.xml new file mode 100644 index 000000000..87e633940 --- /dev/null +++ b/stock_picking_signature/views/stock_picking_type_views.xml @@ -0,0 +1,15 @@ + + + + + stock.picking.type.form.inherit.signature + stock.picking.type + + + + + + + + diff --git a/stock_picking_signature/views/stock_picking_views.xml b/stock_picking_signature/views/stock_picking_views.xml new file mode 100644 index 000000000..373cec11c --- /dev/null +++ b/stock_picking_signature/views/stock_picking_views.xml @@ -0,0 +1,70 @@ + + + + + stock.picking.form.inherit.signature + stock.picking + + + + + + + + + + { + 'invisible': ['|', '|', + ('id', '=', False), + ('require_signature', '=', False), + ('state', '!=', 'done') + ] + } + + + + + + { + 'invisible': ['|', '|', + ('id', '=', False), + ('require_signature', '=', False), + ('state', 'not in', ['confirmed', 'assigned']) + ] + } + + + + + + + + + + + + + + +