Hi,
I need to know how to duplicate one of the field value for another field without any action.is it possible or not.
if anyone knows please help me!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
I need to know how to duplicate one of the field value for another field without any action.is it possible or not.
if anyone knows please help me!
Hi,
You can define the second field in which the value of the first field has to store as a Related field.
first_field = fields.Many2one('res.partner', string="Field 1")
second_field = fields.Char(string="Field 2", related=first_field.name)
Check whether the above method is working or not. If not write value to second field using the onchange.
@api.onchange('first_field')
def set_second_field(self):
if self.first_field:
self.second_field = self.first_field.name
Thanks
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Feb 24
|
13200 | ||
|
1
Dec 22
|
3863 | ||
|
2
Dec 22
|
12725 | ||
|
2
Jun 22
|
4688 | ||
|
2
Jun 22
|
3505 |