Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][ADD] stock_picking_out_lock_immediate_validation #123

Open
wants to merge 1 commit into
base: 14.0
Choose a base branch
from
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
60 changes: 60 additions & 0 deletions stock_picking_out_lock_immediate_validation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
===========================================
Stock Picking Out Lock Immediate Validation
===========================================

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

.. |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-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-solvosci%2Fslv--stock-lightgray.png?logo=github
:target: https://github.com/solvosci/slv-stock/tree/14.0/stock_picking_out_lock_immediate_validation
:alt: solvosci/slv-stock

|badge1| |badge2| |badge3|

Adds lock on the validate button for outputs picking if there is no quantity made.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/solvosci/slv-stock/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/solvosci/slv-stock/issues/new?body=module:%20stock_picking_out_lock_immediate_validation%0Aversion:%2014.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
~~~~~~~

* Solvos

Contributors
~~~~~~~~~~~~

* Christian Santamaría <[email protected]>

Maintainers
~~~~~~~~~~~

This module is part of the `solvosci/slv-stock <https://github.com/solvosci/slv-stock/tree/14.0/stock_picking_out_lock_immediate_validation>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions stock_picking_out_lock_immediate_validation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions stock_picking_out_lock_immediate_validation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# © 2024 Solvos Consultoría Informática (<http://www.solvos.es>)
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html
{
"name": "Stock Picking Out Lock Immediate Validation",
"summary": """
Adds lock on the validate button for outputs picking if there is no quantity made.
""",
"author": "Solvos",
"license": "LGPL-3",
"version": "14.0.1.0.0",
"category": "Inventory",
"website": "https://github.com/solvosci/slv-stock",
"depends": ["stock"],
"data": [],
'installable': True,
}
42 changes: 42 additions & 0 deletions stock_picking_out_lock_immediate_validation/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:
# * stock_picking_out_lock_immediate_validation
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-27 09:34+0000\n"
"PO-Revision-Date: 2024-05-27 09:34+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_out_lock_immediate_validation
#: code:addons/stock_picking_out_lock_immediate_validation/models/stock_picking.py:0
#, python-format
msgid "Picking cannot be validated if there is no quantity done."
msgstr "El albarán no puede validarse si no hay cantidades hechas."

#. module: stock_picking_out_lock_immediate_validation
#: model:ir.model.fields,field_description:stock_picking_out_lock_immediate_validation.field_stock_picking__display_name
msgid "Display Name"
msgstr "Nombre a mostrar"

#. module: stock_picking_out_lock_immediate_validation
#: model:ir.model.fields,field_description:stock_picking_out_lock_immediate_validation.field_stock_picking__id
msgid "ID"
msgstr ""

#. module: stock_picking_out_lock_immediate_validation
#: model:ir.model.fields,field_description:stock_picking_out_lock_immediate_validation.field_stock_picking____last_update
msgid "Last Modified on"
msgstr "Última modificación en"

#. module: stock_picking_out_lock_immediate_validation
#: model:ir.model,name:stock_picking_out_lock_immediate_validation.model_stock_picking
msgid "Transfer"
msgstr "Transferencia"
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:
# * stock_picking_out_lock_immediate_validation
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-27 09:33+0000\n"
"PO-Revision-Date: 2024-05-27 09:33+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_out_lock_immediate_validation
#: code:addons/stock_picking_out_lock_immediate_validation/models/stock_picking.py:0
#, python-format
msgid "Picking cannot be validated if there is no quantity done."
msgstr ""

#. module: stock_picking_out_lock_immediate_validation
#: model:ir.model.fields,field_description:stock_picking_out_lock_immediate_validation.field_stock_picking__display_name
msgid "Display Name"
msgstr ""

#. module: stock_picking_out_lock_immediate_validation
#: model:ir.model.fields,field_description:stock_picking_out_lock_immediate_validation.field_stock_picking__id
msgid "ID"
msgstr ""

#. module: stock_picking_out_lock_immediate_validation
#: model:ir.model.fields,field_description:stock_picking_out_lock_immediate_validation.field_stock_picking____last_update
msgid "Last Modified on"
msgstr ""

#. module: stock_picking_out_lock_immediate_validation
#: model:ir.model,name:stock_picking_out_lock_immediate_validation.model_stock_picking
msgid "Transfer"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock_picking
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# © 2024 Solvos Consultoría Informática (<http://www.solvos.es>)
# License LGPL-3.0 (http://www.gnu.org/licenses/lgpl-3.0.html)

from odoo import models, _
from odoo.exceptions import ValidationError


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

def _action_generate_immediate_wizard(self, show_transfers=False):
if self.filtered(lambda x: x.picking_type_code == 'outgoing'):
raise ValidationError(
_("Picking cannot be validated if there is no quantity done.")
)

return super()._action_generate_immediate_wizard(
show_transfers=show_transfers
)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Christian Santamaría <[email protected]>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds lock on the validate button for outputs picking if there is no quantity made.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading