The new key should not be added at the end. it should be added in the middle.For example, Assume that we have draft,quotation,order in state(selection) field. I need to add new key as 'verification' before 'order' key in selection field.
Any Solution?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
2
回覆
2602
瀏覽次數
Create new class that inherits your base class, overwrite your state fields as below:
state = fields.Selection(selection_add=[('verifcation', 'Verification'), ('order',)])
You can search with 'selection_add' in Odoo base(fields.py), to see more details in Odoo 13.
The Selection field accepts a method so provide that method to the selection value create a method and return the values in the order that you want.
相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
---|---|---|---|---|
|
2
8月 25
|
2555 | ||
|
1
7月 25
|
968 | ||
|
1
8月 25
|
1151 | ||
|
0
5月 25
|
1406 | ||
|
2
4月 25
|
3597 |
I think it you need to add in the middle, then you might have to rewrite the field with new selections instead of using selection_add