Hi there,
I have two fields on the same form. "Field_1" and "Field_2".
When field_1 is changed, I need to copy it's content to field_2 on the same form.
How can I achieve that?
Regards
Paulo
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi there,
I have two fields on the same form. "Field_1" and "Field_2".
When field_1 is changed, I need to copy it's content to field_2 on the same form.
How can I achieve that?
Regards
Paulo
Hi,
You can write an onchange function for the filed_1 and update the second field or make the field_2 as the related field of field_1.
@api.onchange('field_1')
def set_field2(self):
self.field_2 = self.field_1
Or
Make the field_2 as related field.
field_2 = fields.Char(string='Test', related='field_1')
Thanks
Thank you @Niyas
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Registrarse| Publicaciones relacionadas | Respuestas | Vistas | Actividad | |
|---|---|---|---|---|
|
1
abr 25
|
4683 | |||
|
0
mar 24
|
1995 | |||
|
1
oct 23
|
2893 | |||
|
2
oct 23
|
3131 | |||
|
2
ago 23
|
5356 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.