Odoo Help
Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM
|
e-Commerce
|
Accounting
|
Inventory
|
PoS
|
Project management
|
MRP
|
etc.
Restrict list with active_id
A have two models with a Many2one relation. In a form view for model 1, I want an action button that opens a list with the records in model 2, that are related to the current record in model 1. (Just like when you view a customer and has a button to show the customer's orders).
I have found a lot of examples, they all say just about the same: Put a context attribute on the button definition like this:
<button ... context="{'search_default_model1_id': active_id, 'default_model1_id': active_id}">
But it doesn't work. I still get ALL the records from model 2 in the list...
I guess this should be quite basic standard behaviour, so what have I missed?
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 6/3/15, 8:28 AM |
Seen: 987 times |
Last updated: 6/4/15, 4:38 PM |