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
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!
Registrar-se| Related Posts | Respostes | Vistes | Activitat | |
|---|---|---|---|---|
|
2
d’ag. 19
|
14651 | |||
|
2
de febr. 22
|
7570 | |||
|
3
de febr. 24
|
13689 | |||
|
api.onchange v8 doesnt work
Solved
|
2
de set. 15
|
6831 | ||
|
0
de maig 15
|
5258 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.