Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions sy_stock_picking_responsible_autoassign/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

====================================
Stock Picking Responsible Autoassign
====================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a26710c90a02ed0f99c26077a79c79a76c22e517a92118be7679b8a51832f700
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-sygel--technology%2Fsy--stock--logistics--workflow-lightgray.png?logo=github
:target: https://github.com/sygel-technology/sy-stock-logistics-workflow/tree/17.0/sy_stock_picking_responsible_autoassign
:alt: sygel-technology/sy-stock-logistics-workflow

|badge1| |badge2| |badge3|

When enabled, the user validating the picking is automatically set as
responsible if no responsible is defined.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module:

1. Go to Inventory > Configuration > Operation Types.
2. Open the desired operation type.
3. Enable the option "Assign Responsible on Validation".
4. Validate a picking of this type without a responsible user.

The user performing the validation will be automatically set as
responsible if none is defined.

Note: If a responsible is already set on the picking, it will not be
overwritten.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/sygel-technology/sy-stock-logistics-workflow/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 <https://github.com/sygel-technology/sy-stock-logistics-workflow/issues/new?body=module:%20sy_stock_picking_responsible_autoassign%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Sygel

Contributors
------------

- `Sygel <https://www.sygel.es>`__:

- Ángel Rivas
- Valentin Vinagre
- Harald Panten

Maintainers
-----------

This module is part of the `sygel-technology/sy-stock-logistics-workflow <https://github.com/sygel-technology/sy-stock-logistics-workflow/tree/17.0/sy_stock_picking_responsible_autoassign>`_ project on GitHub.

You are welcome to contribute.
3 changes: 3 additions & 0 deletions sy_stock_picking_responsible_autoassign/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
18 changes: 18 additions & 0 deletions sy_stock_picking_responsible_autoassign/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2026 Ángel Rivas <angel.rivas@sygel.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Stock Picking Responsible Autoassign",
"summary": "Assign the validating user as responsible on picking validation",
"version": "17.0.1.0.0",
"category": "Inventory",
"author": "Sygel",
"website": "https://github.com/sygel-technology/sy-stock-logistics-workflow",
"license": "AGPL-3",
"installable": True,
"application": False,
"depends": ["stock"],
"data": [
"views/stock_picking_type_views.xml",
],
}
42 changes: 42 additions & 0 deletions sy_stock_picking_responsible_autoassign/i18n/ca_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sy_stock_picking_responsible_autoassign
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-22 14:03+0000\n"
"PO-Revision-Date: 2026-04-22 16:06+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ca_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.9\n"

#. module: sy_stock_picking_responsible_autoassign
#: model:ir.model.fields,field_description:sy_stock_picking_responsible_autoassign.field_stock_picking_type__assign_responsible_on_validate
msgid "Assign Responsible on Validation"
msgstr "Assignar responsable en la validació"

#. module: sy_stock_picking_responsible_autoassign
#: model:ir.model.fields,help:sy_stock_picking_responsible_autoassign.field_stock_picking_type__assign_responsible_on_validate
msgid ""
"If enabled, the user validating the picking will be set as responsible if "
"none is defined."
msgstr ""
"Si està activat, l’usuari que valida l’albarà s’assignarà com a "
"responsable si no n’hi ha cap de definit."

#. module: sy_stock_picking_responsible_autoassign
#: model:ir.model,name:sy_stock_picking_responsible_autoassign.model_stock_picking_type
msgid "Picking Type"
msgstr "Tipus de picking"

#. module: sy_stock_picking_responsible_autoassign
#: model:ir.model,name:sy_stock_picking_responsible_autoassign.model_stock_picking
msgid "Transfer"
msgstr "Transferència"
42 changes: 42 additions & 0 deletions sy_stock_picking_responsible_autoassign/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sy_stock_picking_responsible_autoassign
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-22 14:03+0000\n"
"PO-Revision-Date: 2026-04-22 16:06+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.9\n"

#. module: sy_stock_picking_responsible_autoassign
#: model:ir.model.fields,field_description:sy_stock_picking_responsible_autoassign.field_stock_picking_type__assign_responsible_on_validate
msgid "Assign Responsible on Validation"
msgstr "Asignar responsable en la validación"

#. module: sy_stock_picking_responsible_autoassign
#: model:ir.model.fields,help:sy_stock_picking_responsible_autoassign.field_stock_picking_type__assign_responsible_on_validate
msgid ""
"If enabled, the user validating the picking will be set as responsible if "
"none is defined."
msgstr ""
"Si está activado, el usuario que valide el albarán se establecerá como "
"responsable si no hay ninguno definido."

#. module: sy_stock_picking_responsible_autoassign
#: model:ir.model,name:sy_stock_picking_responsible_autoassign.model_stock_picking_type
msgid "Picking Type"
msgstr "Tipo de albarán"

#. module: sy_stock_picking_responsible_autoassign
#: model:ir.model,name:sy_stock_picking_responsible_autoassign.model_stock_picking
msgid "Transfer"
msgstr "Traslado"
4 changes: 4 additions & 0 deletions sy_stock_picking_responsible_autoassign/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import stock_picking
from . import stock_picking_type
17 changes: 17 additions & 0 deletions sy_stock_picking_responsible_autoassign/models/stock_picking.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2026 Ángel Rivas <angel.rivas@sygel.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models


class StockPicking(models.Model):
_inherit = "stock.picking"

def button_validate(self):
for picking in self:
if (
picking.picking_type_id.assign_responsible_on_validate
and not picking.user_id
):
picking.user_id = self.env.user
return super().button_validate()
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2026 Ángel Rivas <angel.rivas@sygel.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class StockPickingType(models.Model):
_inherit = "stock.picking.type"

assign_responsible_on_validate = fields.Boolean(
string="Assign Responsible on Validation",
help=(
"If enabled, the user validating the picking will be set as responsible "
"if none is defined."
),
)
3 changes: 3 additions & 0 deletions sy_stock_picking_responsible_autoassign/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- [Sygel](https://www.sygel.es):
- Ángel Rivas
- Valentin Vinagre
- Harald Panten
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When enabled, the user validating the picking is automatically set as responsible if no responsible is defined.
10 changes: 10 additions & 0 deletions sy_stock_picking_responsible_autoassign/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
To use this module:

1. Go to Inventory > Configuration > Operation Types.
2. Open the desired operation type.
3. Enable the option "Assign Responsible on Validation".
4. Validate a picking of this type without a responsible user.

The user performing the validation will be automatically set as responsible if none is defined.

>Note: If a responsible is already set on the picking, it will not be overwritten.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading