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:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
1
Trả lời
2997
Lượt xem
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
4
thg 3 24
|
3348 | ||
|
1
thg 10 23
|
5322 | ||
|
4
thg 12 23
|
22246 | ||
|
5
thg 7 24
|
15608 | ||
|
1
thg 6 22
|
6554 |