I have a transient model defined.
I want one of its fields defined using active_id from context.
I want to use new API.
Does anyone know how to do it? Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I have a transient model defined.
I want one of its fields defined using active_id from context.
I want to use new API.
Does anyone know how to do it? Thanks
Hello EM,
@api.model
def default_get(self, fields):
rec = super(TransientModelClass, self).default_get(fields)
class_obj = self.env['class.name'].browse(self._context.get('active_id'))
for variable in class_obj:
rec['wizard_field'] = variable.class_field
Hope this will helps you.
Thanks,
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Aug 19
|
11538 | ||
|
2
Feb 22
|
4287 | ||
|
3
Feb 24
|
10658 | ||
api.onchange v8 doesnt work
Solved
|
|
2
Sep 15
|
3286 | |
|
0
May 15
|
2244 |