diff --git a/stock_valuation_fifo_lot/i18n/ja.po b/stock_valuation_fifo_lot/i18n/ja.po index bd577bfe..ab7d707c 100644 --- a/stock_valuation_fifo_lot/i18n/ja.po +++ b/stock_valuation_fifo_lot/i18n/ja.po @@ -141,6 +141,15 @@ msgstr "" msgid "No Reason Given" msgstr "理由が指定されていません" +#. module: stock_valuation_fifo_lot +#. odoo-python +#: code:addons/stock_valuation_fifo_lot/wizard/stock_valuation_layer_revaluation.py:0 +#, python-format +msgid "" +"No quant found for the given lot and can't do revaluation. Please ensure the" +" lot is in an internal location." +msgstr "指定ロットの在庫数量が見つからず、再評価できません。ロットが内部ロケーションにあることを確認してください。" + #. module: stock_valuation_fifo_lot #: model:ir.model,name:stock_valuation_fifo_lot.model_stock_move_line msgid "Product Moves (Stock Move Line)" diff --git a/stock_valuation_fifo_lot/wizard/stock_valuation_layer_revaluation.py b/stock_valuation_fifo_lot/wizard/stock_valuation_layer_revaluation.py index 782afe8d..3cd6d218 100644 --- a/stock_valuation_fifo_lot/wizard/stock_valuation_layer_revaluation.py +++ b/stock_valuation_fifo_lot/wizard/stock_valuation_layer_revaluation.py @@ -105,6 +105,13 @@ def action_validate_revaluation(self): ("location_id.usage", "=", "internal"), ] ) + if not quants: + raise UserError( + _( + "No quant found for the given lot and can't do revaluation. " + "Please ensure the lot is in an internal location." + ) + ) quants = quants.with_context( inventory_name=description, lot_revaluation_account=self.account_id,