[FIX] stock_inventory_discrepancy: Ensure active_ids value

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
This commit is contained in:
Pedro M. Baeza
2023-06-16 16:57:35 +02:00
committed by JasminSForgeFlow
parent a36c481942
commit 1fd63ee4d3
5 changed files with 79 additions and 53 deletions

View File

@@ -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
@@ -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
@@ -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.

View File

@@ -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",

View File

@@ -9,101 +9,102 @@ 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 <transbot@odoo-community.org>, 2017\n"
"PO-Revision-Date: 2023-07-26 22:10+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\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
@@ -111,6 +112,9 @@ 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
@@ -119,32 +123,38 @@ 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
@@ -152,21 +162,23 @@ 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
@@ -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
@@ -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"

View File

@@ -63,6 +63,7 @@ class StockQuant(models.Model):
action["context"] = dict(
self._context.copy(),
discrepancy_quant_ids=over_discrepancy.ids,
active_ids=self.ids,
)
return action
return super().action_apply_inventory()

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Stock Inventory Discrepancy</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
@@ -366,8 +366,10 @@ ul.auto-toc {
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0efdc09fe825f32b12c7add6f17e5a2d37dc61eb02dbbfe7fb521868339981ae
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/15.0/stock_inventory_discrepancy"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_inventory_discrepancy"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/153/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-warehouse/tree/15.0/stock_inventory_discrepancy"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_inventory_discrepancy"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>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
discrepancy is greater than an user defined threshold.</p>
@@ -378,19 +380,19 @@ threshold now.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#id1">Configuration</a></h1>
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<ol class="arabic simple">
<li>Go to “Inventory &gt; Warehouse Management” &gt; Warehouses” or to “Inventory &gt;
Warehouse Management” &gt; Locations”.</li>
@@ -399,7 +401,7 @@ in a location. If set to 0.0 in both the threshold is disabled.</li>
</ol>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<p>If you configured a “Maximum Discrepancy Rate Threshold”.</p>
<ol class="arabic simple">
<li>When validating an Inventory Adjustment if some line exceed the Discrepancy
@@ -412,23 +414,23 @@ validation of an inventory pending to approve.</li>
</ol>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues">GitHub Issues</a>.
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
<a class="reference external" href="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**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id4">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
<ul class="simple">
<li>ForgeFlow</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<ul class="simple">
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
<li>Andreas Dian Sukarno Putro &lt;<a class="reference external" href="mailto:andreasdian777&#64;gmail.com">andreasdian777&#64;gmail.com</a>&gt;</li>
@@ -441,7 +443,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose