This question is my first question in stack overflow and my English is not well.I hope you can understand me.
Goal: I want to alter my form view dynamically by the record's state.
Trouble:I can't get the record or record's active_id when I into the form view from a tree view.But I can get it if I update the form view directly.
I was troubled by this problem all day. And I find some answer, but they are not detailed enough:
- Add the selected record's id to the context when someone clicked a record in the tree view, and you can get the id in fields_view_get method by context.But the answer doesn't tell us how to add the id to the context when I click the record in the tree view.
use read method:
@api.multi def read(self, fields=None, load='_classic_read'):
I can't understand it.
Thanks