Skip to content

Commit

Permalink
[ADD] stock_picking_out_lock_immediate_validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianSantamaria committed May 27, 2024
1 parent 402d24a commit 10fbf0e
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 0 deletions.
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
""",
"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 "Cannot be validated if there is no quantity done."
msgstr "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 "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.picking_type_code == 'outgoing':
raise ValidationError(
_("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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 10fbf0e

Please sign in to comment.