I've added a Many2one field (relation: sales order) to the project task form view. However, upon clicking the field I'd like to load the order from the Rental view rather than the regular sales view. How can I accomplish this?
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ờ
If a model has two associated form views, We can use the Context of a field to tell Odoo which view to load.
To find the XML ID of the view we want to load, we should first pull up view we'd like to load in a new tab. From here, click the "Edit view: Form" button from the debug menu.
From this view, use the debug menu again and select "View metadata". Copy the XML ID.
Navigate back to the view with the many2one field. Open Odoo Studio. Click on the field, then set the context following the below syntax:
{'form_view_ref': 'view_XML_id'}
So our example will be:
{'form_view_ref': 'sale_renting.rental_order_primary_form_view'}
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 | |
---|---|---|---|---|
|
1
thg 4 25
|
267 | ||
|
2
thg 10 24
|
2544 | ||
Manufacturing using the barcode app
Đã xử lý
|
|
1
thg 9 24
|
2014 | |
Multi-step subcontracting process
Đã xử lý
|
|
1
thg 9 24
|
1268 | |
|
1
thg 8 24
|
508 |