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

[15.0][IMP] stock_barcodes: Add pending move with difference between demand and reserved #628

Open
wants to merge 11 commits into
base: 15.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
28 changes: 15 additions & 13 deletions stock_barcodes/hooks.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Copyright 2021 Tecnativa - Sergio Teruel
# Copyright 2024 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import tools


def pre_init_hook(cr):
if not tools.column_exists(cr, "stock_move_line", "barcode_scan_state"):
cr.execute(
"""
ALTER TABLE stock_move_line
ADD COLUMN barcode_scan_state varchar"""
)
cr.execute(
"""
UPDATE stock_move_line sml
SET barcode_scan_state = 'pending'
"""
)
cr.execute(
"""
ALTER TABLE stock_move_line
ADD COLUMN IF NOT EXISTS barcode_scan_state VARCHAR DEFAULT 'pending';
ALTER TABLE stock_move_line ALTER COLUMN barcode_scan_state DROP DEFAULT;
"""
)
cr.execute(
"""
ALTER TABLE stock_move
ADD COLUMN IF NOT EXISTS barcode_backorder_action VARCHAR DEFAULT 'pending';
ALTER TABLE stock_move ALTER COLUMN barcode_backorder_action DROP DEFAULT;
"""
)
202 changes: 69 additions & 133 deletions stock_barcodes/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-02-06 20:07+0000\n"
"PO-Revision-Date: 2023-10-30 21:36+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"POT-Creation-Date: 2024-07-19 08:31+0000\n"
"PO-Revision-Date: 2024-07-19 10:32+0200\n"
"Last-Translator: Sergio Teruel <[email protected]>\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: Weblate 4.17\n"
"X-Generator: Poedit 3.0.1\n"

#. module: stock_barcodes
#: model:ir.model.fields,help:stock_barcodes.field_wiz_candidate_picking__state
Expand Down Expand Up @@ -152,11 +152,11 @@ msgstr "<i class=\"fa fa-trash-o\" title=\"Limpiar valores\"/>"
#. module: stock_barcodes
#: model_terms:ir.ui.view,arch_db:stock_barcodes.view_stock_barcodes_read_picking_form
msgid ""
"<i class=\"fa fa-upload\" title=\"Fill from pencil\" style=\"font-size:1.5em"
"\"/>"
"<i class=\"fa fa-upload\" title=\"Fill from pencil\" style=\"font-"
"size:1.5em\"/>"
msgstr ""
"<i class=\"fa fa-upload\" title=\"Fill from pencil\" style=\"font-size:1.5em"
"\"/>"
"<i class=\"fa fa-upload\" title=\"Fill from pencil\" style=\"font-"
"size:1.5em\"/>"

#. module: stock_barcodes
#: model_terms:ir.ui.view,arch_db:stock_barcodes.view_stock_barcodes_read_form
Expand Down Expand Up @@ -330,6 +330,11 @@ msgstr "Poner en paquete automáticamente antes de la validación del albarán"
msgid "Back"
msgstr "Atrás"

#. module: stock_barcodes
#: model:ir.model.fields,field_description:stock_barcodes.field_stock_move__barcode_backorder_action
msgid "Backorder action"
msgstr "Acción entrega parcial"

#. module: stock_barcodes
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read__barcode
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read_inventory__barcode
Expand Down Expand Up @@ -515,6 +520,12 @@ msgstr "movimientos confirmados"
msgid "Context"
msgstr "Contexto"

#. module: stock_barcodes
#: model:ir.model.fields.selection,name:stock_barcodes.selection__stock_move__barcode_backorder_action__create_backorder
#: model_terms:ir.ui.view,arch_db:stock_barcodes.view_stock_barcodes_todo_kanban
msgid "Create Backorder"
msgstr "Crear entrega parcial"

#. module: stock_barcodes
#: model:ir.model.fields,field_description:stock_barcodes.field_stock_barcodes_option_group__create_lot
msgid "Create lots if not match"
Expand Down Expand Up @@ -578,6 +589,13 @@ msgstr "Registro del producto escaneado"
msgid "Customers"
msgstr "Clientes"

#. module: stock_barcodes
#: model:ir.model.fields,help:stock_barcodes.field_wiz_stock_barcodes_read__product_uom_id
#: model:ir.model.fields,help:stock_barcodes.field_wiz_stock_barcodes_read_inventory__product_uom_id
#: model:ir.model.fields,help:stock_barcodes.field_wiz_stock_barcodes_read_picking__product_uom_id
msgid "Default unit of measure used for all stock operations."
msgstr ""

#. module: stock_barcodes
#: model:ir.model.fields,help:stock_barcodes.field_stock_barcodes_option_group__manual_entry
msgid "Default value when open scan interface"
Expand Down Expand Up @@ -900,6 +918,12 @@ msgstr "Cantidad inventariada"
msgid "Inventory quants"
msgstr "Cantds de Inventario"

#. module: stock_barcodes
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read_picking__todo_line_is_extra_line
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read_todo__is_extra_line
msgid "Is Extra Line"
msgstr ""

#. module: stock_barcodes
#: model:ir.model.fields,field_description:stock_barcodes.field_stock_barcodes_option_group__is_manual_confirm
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read__is_manual_confirm
Expand Down Expand Up @@ -1159,6 +1183,11 @@ msgstr "Se ha encontrado más de un producto"
msgid "Move Line"
msgstr "Línea de Movimiento"

#. module: stock_barcodes
#: model_terms:ir.ui.view,arch_db:stock_barcodes.view_stock_barcodes_todo_kanban
msgid "NOT AVAILABLE"
msgstr ""

#. module: stock_barcodes
#: model:ir.model.fields,field_description:stock_barcodes.field_stock_barcodes_action__name
#: model:ir.model.fields,field_description:stock_barcodes.field_stock_barcodes_option__name
Expand All @@ -1183,6 +1212,12 @@ msgstr "Nuevo movimiento:"
msgid "New Picking Barcode Option Group"
msgstr "Nuevo Grupo de Opciones de Código de Barras de Albarán"

#. module: stock_barcodes
#: model:ir.model.fields.selection,name:stock_barcodes.selection__stock_move__barcode_backorder_action__skip_backorder
#: model_terms:ir.ui.view,arch_db:stock_barcodes.view_stock_barcodes_todo_kanban
msgid "No Backorder"
msgstr "No crear entrega parcial"

#. module: stock_barcodes
#: model:ir.model.fields.selection,name:stock_barcodes.selection__wiz_stock_barcodes_read__message_type__not_found
#: model:ir.model.fields.selection,name:stock_barcodes.selection__wiz_stock_barcodes_read_inventory__message_type__not_found
Expand Down Expand Up @@ -1213,6 +1248,11 @@ msgstr "Notas"
msgid "OK"
msgstr "Aceptar"

#. module: stock_barcodes
#: model_terms:ir.ui.view,arch_db:stock_barcodes.view_stock_barcodes_todo_kanban
msgid "Odoo will not create a backorder for this move. Are you sure?"
msgstr "Odoo no creará una entrega parcial para este movimiento. ¿Está seguro?"

#. module: stock_barcodes
#: model_terms:ir.ui.view,arch_db:stock_barcodes.view_stock_barcodes_read_picking_form
msgid "Open"
Expand Down Expand Up @@ -1306,6 +1346,7 @@ msgid "Partner"
msgstr "Empresa"

#. module: stock_barcodes
#: model:ir.model.fields.selection,name:stock_barcodes.selection__stock_move__barcode_backorder_action__pending
#: model:ir.model.fields.selection,name:stock_barcodes.selection__stock_move_line__barcode_scan_state__pending
#: model:ir.model.fields.selection,name:stock_barcodes.selection__wiz_stock_barcodes_read_todo__state__pending
msgid "Pending"
Expand Down Expand Up @@ -1416,13 +1457,6 @@ msgstr "Cdad. de producto"
msgid "Product Qty. Done"
msgstr ""

#. module: stock_barcodes
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read__product_uom_id
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read_inventory__product_uom_id
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read_picking__product_uom_id
msgid "Product Uom"
msgstr "Udm del Producto"

#. module: stock_barcodes
#: model_terms:ir.ui.view,arch_db:stock_barcodes.view_stock_barcodes_read_picking_form
msgid "Put in pack"
Expand Down Expand Up @@ -1506,6 +1540,11 @@ msgstr "Modelo"
msgid "Reserved"
msgstr "Reservado"

#. module: stock_barcodes
#: model_terms:ir.ui.view,arch_db:stock_barcodes.view_stock_barcodes_todo_kanban
msgid "Restore to pending"
msgstr ""

#. module: stock_barcodes
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read__result_package_id
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read_inventory__result_package_id
Expand Down Expand Up @@ -1655,6 +1694,7 @@ msgid "Steps to scan"
msgstr "Pasos a escanear"

#. module: stock_barcodes
#: model:ir.model,name:stock_barcodes.model_stock_move
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read_todo__stock_move_ids
msgid "Stock Move"
msgstr "Movimiento de Existencias"
Expand Down Expand Up @@ -1691,6 +1731,11 @@ msgstr ""
"botón \"Nuevo\" en un tipo de operación. Se utilizará para crear un albarán "
"no planificado."

#. module: stock_barcodes
#: model_terms:ir.ui.view,arch_db:stock_barcodes.view_stock_barcodes_todo_kanban
msgid "This move will be set to pending. Are you sure?"
msgstr ""

#. module: stock_barcodes
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read_picking__todo_line_ids
msgid "To Do Lines"
Expand Down Expand Up @@ -1734,6 +1779,13 @@ msgstr "Tipo de operación"
msgid "Type of operation"
msgstr "Tipo de operación"

#. module: stock_barcodes
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read__product_uom_id
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read_inventory__product_uom_id
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read_picking__product_uom_id
msgid "Unit of Measure"
msgstr ""

#. module: stock_barcodes
#: model:ir.model.fields,field_description:stock_barcodes.field_wiz_stock_barcodes_read_todo__uom_id
msgid "Uom"
Expand Down Expand Up @@ -1830,9 +1882,8 @@ msgstr "Asistente para leer códigos de barras desde el inventario"

#. module: stock_barcodes
#: model:ir.model,name:stock_barcodes.model_wiz_stock_barcodes_read_picking
msgid "Wizard to read barcode on picking batch"
msgstr ""
"Asistente para leer códigos de barras desde las agrupaciones de albaranes"
msgid "Wizard to read barcode on picking"
msgstr "Asistente para leer códigos de barras desde los albaranes"

#. module: stock_barcodes
#: model:ir.model,name:stock_barcodes.model_wiz_stock_barcodes_read_todo
Expand Down Expand Up @@ -1920,118 +1971,3 @@ msgstr "desbloquear el albarán"
#, python-format
msgid "{name} is required"
msgstr ""

#~ msgid "<span>Apply inventory</span>"
#~ msgstr "<span>Aplicar inventario</span>"

#~ msgid "<span>Total Qty</span>"
#~ msgstr "<span>Cdad. total</span>"

#~ msgid "<i class=\"fa fa-upload fa-2x\" title=\"Fill from pencil\"/>"
#~ msgstr "<i class=\"fa fa-upload fa-2x\" title=\"Rellenar desde lápiz\"/>"

#~ msgid "Wizard to read barcode on picking"
#~ msgstr "Asistente para leer códigos de barras desde los albaranes"

#~ msgid "List view of lines"
#~ msgstr "Vista lista de líneas"

#, python-format
#~ msgid "There is no lots to assign quantities"
#~ msgstr "No hay lotes para asignar la cantidad"

#~ msgid "<span>New lot</span>"
#~ msgstr "<span>Nuevo lote</span>"

#~ msgid "Barcode not found"
#~ msgstr "Código de barras no encontrado"

#~ msgid "Barcode: %s (%s)"
#~ msgstr "Cód. Barras: %s (%s)"

#~ msgid "Clean lot"
#~ msgstr "Borrar lote"

#~ msgid "Companies"
#~ msgstr "Compañías"

#~ msgid "Confirmed moves allowed"
#~ msgstr "Permitir movimientos confirmados"

#~ msgid "Demand:"
#~ msgstr "Demanda:"

#~ msgid "Done:"
#~ msgstr "Hecho:"

#~ msgid "Get lots automatically for inventories"
#~ msgstr "Obtener lotes automáticamente para inventarios"

#~ msgid ""
#~ "If checked the lot will be set automatically with the same removal "
#~ "strategy"
#~ msgstr ""
#~ "Si esta marcado el lote se establecerá automáticamente según la "
#~ "estrategia de retirada"

#~ msgid ""
#~ "If checked, after a product barcode is read, the quantities will be "
#~ "distributed\n"
#~ " among all existing lots by removal "
#~ "strategy order."
#~ msgstr ""
#~ "Si está marcado, después de escanear un código de barras de producto, las "
#~ "cantidades se distribuirán entre todos los lotes existentes por orden "
#~ "según la estrategia de retirada"

#~ msgid ""
#~ "If user input more quantities than existing it, the exceeded quantities "
#~ "will be assigned to last lot"
#~ msgstr ""
#~ "Si el usuario introduce más cantidades de las existentes, las cantidades "
#~ "sobrantes se asignarán al último lote"

#~ msgid "Manual entry data"
#~ msgstr "Entrada manual de datos"

#~ msgid "New lot"
#~ msgstr "Nuevo lote"

#~ msgid "OCA Stock Barcodes reader"
#~ msgstr "Lector de códigos de barras (OCA)"

#~ msgid "Reserved:"
#~ msgstr "Reservado:"

#~ msgid "Set a default value for scanner."
#~ msgstr "Establece un valor por defecto para el lector."

#~ msgid "There are no stock moves to assign this operation"
#~ msgstr "No hay movimientos de stock para realizar esta operación"

#~ msgid "Waiting for input lot"
#~ msgstr "A la espera de leer lote"

#~ msgid "Procurement purchase grouping settings"
#~ msgstr "Agrupación de la compra abastecida"

#, fuzzy
#~| msgid "Picking"
#~ msgid "Stock Picking"
#~ msgstr "Albarán"

#~ msgid "The operation type determines the picking view"
#~ msgstr "El tipo de albarán determina la vista de albarán"

#~ msgid "barcode"
#~ msgstr "código de barras"

#~ msgid "This product has not prepare to receipt"
#~ msgstr "Este producto no está listo para ser recibido"

#~ msgid "# Scan log"
#~ msgstr "Lecturas"

#, fuzzy
#~ msgid "Barcode read successfully"
#~ msgstr "Leer más"
Loading
Loading