How to replace a value in a selection field by keeping all its properties (linkings and computations) intact in the existing model, i.e. the new added value should inherit all the properties of the replaced value.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
3017
查看
Hi,
If you just need to change the value displayed to the end user, you can easily achieve it as follows:
1. Inherit the model, in your custom module
2. Using selection_add and keeping the same selection_key, replace the value with new value.
See a sample of changing the type in stock picking type model:
code = fields.Selection(selection_add=[
('incoming', 'New Value')
])
Thanks
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
4
3月 24
|
3357 | ||
|
1
10月 23
|
5325 | ||
|
4
12月 23
|
22251 | ||
|
5
7月 24
|
15614 | ||
|
1
6月 22
|
6562 |