Skip to content

Commit

Permalink
[FIX] stock_inventory_discrepancy: Ensure active_ids value
Browse files Browse the repository at this point in the history
Steps to reproduce:

- Enter a product.
- Navigate to stock on hand.
- Adjust quantity and rebase discrepancy limit.
- Accept the discrepancy popup.

You get an error as the ID to be tried to adjust is the product one,
not the quant one.

We need to overwrite active_ids context with the quant IDs to be
handled on the wizard popup.

TT43947

stock_inventory_discrepancy 15.0.1.0.1

Translated using Weblate (Spanish)

Currently translated at 100.0% (31 of 31 strings)

Translation: stock-logistics-warehouse-15.0/stock-logistics-warehouse-15.0-stock_inventory_discrepancy
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_inventory_discrepancy/es/

[UPD] README.rst
  • Loading branch information
pedrobaeza authored and carolinafernandez-tecnativa committed Sep 18, 2023
1 parent 60cbc06 commit 590763d
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 53 deletions.
15 changes: 9 additions & 6 deletions stock_inventory_discrepancy/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
Stock Inventory Discrepancy
===========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0efdc09fe825f32b12c7add6f17e5a2d37dc61eb02dbbfe7fb521868339981ae
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
Expand All @@ -19,11 +22,11 @@ Stock Inventory Discrepancy
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_inventory_discrepancy
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/153/15.0
:alt: Try me on Runbot
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=15.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
|badge1| |badge2| |badge3| |badge4| |badge5|

Adds the capability to show the discrepancy of every line in an inventory and
to block the inventory validation (setting it as 'Pending to Approve') when the
Expand Down Expand Up @@ -65,7 +68,7 @@ Bug Tracker

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-warehouse/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_inventory_discrepancy%0Aversion:%2015.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.
Expand Down
2 changes: 1 addition & 1 deletion stock_inventory_discrepancy/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"summary": "Adds the capability to show the discrepancy of every line in "
"an inventory and to block the inventory validation when the "
"discrepancy is over a user defined threshold.",
"version": "15.0.1.0.0",
"version": "15.0.1.0.1",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-warehouse",
"category": "Warehouse",
Expand Down
72 changes: 46 additions & 26 deletions stock_inventory_discrepancy/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,108 +9,112 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-11-30 03:53+0000\n"
"PO-Revision-Date: 2017-11-30 03:53+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2017\n"
"PO-Revision-Date: 2023-07-26 22:10+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: stock_inventory_discrepancy
#: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.confirm_discrepancy_wizard
msgid "Apply"
msgstr ""
msgstr "Aplicar"

#. module: stock_inventory_discrepancy
#: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.confirm_discrepancy_wizard
msgid "Cancel"
msgstr ""
msgstr "Cancelar"

#. module: stock_inventory_discrepancy
#: model:ir.model,name:stock_inventory_discrepancy.model_confirm_discrepancy_wiz
msgid "Confim discrepancy wizard"
msgstr ""
msgstr "Asistente de discrepancias de Confim"

#. module: stock_inventory_discrepancy
#: model:ir.actions.act_window,name:stock_inventory_discrepancy.confirm_discrepancy_action
msgid "Confirm discrepancy"
msgstr ""
msgstr "Confirmar discrepancia"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_confirm_discrepancy_wiz__create_uid
msgid "Created by"
msgstr ""
msgstr "Creado por"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_confirm_discrepancy_wiz__create_date
msgid "Created on"
msgstr ""
msgstr "Creado el"

#. module: stock_inventory_discrepancy
#: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.confirm_discrepancy_wizard
msgid "Dates does not match"
msgstr ""
msgstr "Las fechas no coinciden"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_confirm_discrepancy_wiz__discrepancy_quant_ids
msgid "Discrepancy Quant"
msgstr ""
msgstr "Cuantía de la discrepancia"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_quant__discrepancy_percent
msgid "Discrepancy percent (%)"
msgstr ""
msgstr "Porcentaje de discrepancia (%)"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_confirm_discrepancy_wiz__display_name
msgid "Display Name"
msgstr ""
msgstr "Nombre a Mostrar"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_quant__has_over_discrepancy
msgid "Has Over Discrepancy"
msgstr ""
msgstr "Tiene más discrepancia"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_confirm_discrepancy_wiz__id
msgid "ID"
msgstr ""
msgstr "ID (identificación)"

#. module: stock_inventory_discrepancy
#: model:ir.model,name:stock_inventory_discrepancy.model_stock_location
msgid "Inventory Locations"
msgstr ""
msgstr "Localizaciones de Inventario"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_confirm_discrepancy_wiz____last_update
msgid "Last Modified on"
msgstr ""
msgstr "Última Modificación el"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_confirm_discrepancy_wiz__write_uid
msgid "Last Updated by"
msgstr ""
msgstr "Actualizado por última vez por"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_confirm_discrepancy_wiz__write_date
msgid "Last Updated on"
msgstr ""
msgstr "Última Actualización el"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__discrepancy_threshold
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_warehouse__discrepancy_threshold
#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_quant__discrepancy_threshold
msgid "Maximum Discrepancy Rate Threshold"
msgstr ""
msgstr "Umbral máximo de tasa de discrepancia"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_warehouse__discrepancy_threshold
msgid ""
"Maximum Discrepancy Rate allowed for any product when doing an Inventory "
"Adjustment. Threshold defined in involved Location has preference."
msgstr ""
"Tasa de Discrepancia Máxima permitida para cualquier producto al hacer un "
"Ajuste de Inventario. El umbral definido en la Ubicación implicada tiene "
"preferencia."

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__discrepancy_threshold
Expand All @@ -119,54 +123,62 @@ msgid ""
"Adjustment. Thresholds defined in Locations have preference over Warehouse's "
"ones."
msgstr ""
"Tasa de Discrepancia Máxima permitida para cualquier producto al hacer un "
"Ajuste de Inventario. Los umbrales definidos en Ubicaciones tienen "
"preferencia sobre los del Almacén."

#. module: stock_inventory_discrepancy
#: code:addons/stock_inventory_discrepancy/hooks.py:0
#, python-format
msgid "Only a stock manager can validate an inventory adjustment."
msgstr ""
msgstr "Sólo un gestor de existencias puede validar un ajuste de inventario."

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold
msgid "Propagate Maximum Discrepancy Rate Threshold to child locations"
msgstr ""
"Propagar el umbral de tasa de discrepancia máxima a las ubicaciones "
"secundarias"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold
msgid "Propagate discrepancy threshold"
msgstr ""
msgstr "Propagar el umbral de discrepancia"

#. module: stock_inventory_discrepancy
#: model:ir.model,name:stock_inventory_discrepancy.model_stock_quant
msgid "Quants"
msgstr ""
msgstr "Cantidades"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_quant__discrepancy_percent
msgid "The discrepancy expressed in percent with theoretical quantity as basis"
msgstr ""
"La discrepancia expresada en porcentaje con la cantidad teórica como base"

#. module: stock_inventory_discrepancy
#: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.confirm_discrepancy_wizard
msgid ""
"The following products have exceeded the discrepancy threshold.\n"
" Are you sure you want to proceed?"
msgstr ""
"Los siguientes productos han superado el umbral de discrepancia.\n"
" Está seguro de que desea continuar?"

#. module: stock_inventory_discrepancy
#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_quant__discrepancy_threshold
msgid "Threshold (%)"
msgstr ""
msgstr "Umbral (%)"

#. module: stock_inventory_discrepancy
#: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation
msgid "Validate Inventory Adjustments"
msgstr ""
msgstr "Validar los ajustes de inventario"

#. module: stock_inventory_discrepancy
#: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always
msgid "Validate Inventory Adjustments excceded threshold"
msgstr ""
msgstr "Validar Ajustes de Inventario umbral superado"

#. module: stock_inventory_discrepancy
#: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse
Expand All @@ -180,6 +192,9 @@ msgid ""
"You cannot apply inventory adjustments if there are products that exceed the "
"discrepancy threshold. Only users with rights to apply them can proceed."
msgstr ""
"No se pueden aplicar ajustes de inventario si hay productos que superan el "
"umbral de discrepancia. Sólo los usuarios con derechos para aplicarlos "
"pueden proceder."

#. module: stock_inventory_discrepancy
#: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.confirm_discrepancy_wizard
Expand All @@ -189,6 +204,11 @@ msgid ""
"threshold.\n"
" Only users with permissions to apply them can proceed."
msgstr ""
"No se puede confirmar el ajuste de inventario,\n"
" los siguientes productos han superado el umbral de "
"discrepancia.\n"
" Sólo los usuarios con permisos para aplicarlos pueden "
"proceder."

#~ msgid "Inventory"
#~ msgstr "Inventario"
Expand Down
1 change: 1 addition & 0 deletions stock_inventory_discrepancy/models/stock_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def action_apply_inventory(self):
action["context"] = dict(
self._context.copy(),
discrepancy_quant_ids=over_discrepancy.ids,
active_ids=self.ids,
)
return action
return super().action_apply_inventory()
Loading

0 comments on commit 590763d

Please sign in to comment.