-
- Downloads
[FIX] stock : prevent creating sequences with same code
Issue:
======
You can create the same sequence with the same code
Steps to reproduce the error:
=============================
- Install inventory and activate storage locations
- Go to inventory/configuration/Operations Types
- Create 2 operation typs with the following values:
name :any random name , type of Operations : internal transfer,
sequence prefix : test , locations as WH/Stock
- Go to sequences and search for test
- You will have 2 duplicate sequences with the same values
Origin of the problem :
=======================
- Creating an operation type always creates atuomatically a sequences if
the sequence_code is provided but the sequence_id isn't.
Solution:
=========
Display an error when the name already exist.
opw-3238331
closes odoo/odoo#129394
Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
Showing
- addons/stock/i18n/stock.pot 7 additions, 0 deletionsaddons/stock/i18n/stock.pot
- addons/stock/models/stock_picking.py 12 additions, 0 deletionsaddons/stock/models/stock_picking.py
- addons/stock/tests/__init__.py 1 addition, 0 deletionsaddons/stock/tests/__init__.py
- addons/stock/tests/test_picking.py 24 additions, 0 deletionsaddons/stock/tests/test_picking.py
Loading