Only immediate transfers should have the ability to reset the state to
draft. Also rewording it as "Plan" as the goal of this button is to left
the stock move to be done later and impact the forecast
Task: 3256447
Part-of: odoo/odoo#124409
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
closesodoo/odoo#132982
X-original-commit: e1f9480c7aa2a982d828ffd0fbc032e4066089d4
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>