Hello,
In model_a.py, I have 4 fields like this:
name = fields.Many2one('hr.employee', 'Employee name')
start_date = fields.Date('Working day')
val_1 = fields.Float('Value 1')
val_2 = fields.Float('Value 2')
And in the tree view UI of model_a.py, I have 3 records like this:
Employee name Working day Value 1 Value 2
Anita 11/4/2021 1.0 2.0
Anita 11/4/2021 3.0 4.0
Oliver 11/4/2021 5.0 6.0
In model_b.py , I have a field:
start_date_of_b = fields.Date('Select day')
In model_c.py, I also have 4 fields like model_a.py
I connected model_c.py with model_a.py via one2many and many2one field.
What I want is to create the record in model_c.py with the value of model_a.py via a button in model_b.py like this ex:
In model_c.py :
Employee name Working day Value 1 Value 2
Anita 11/4/2021 1.0 3.0
So how to put value 1.0 in field val_1 and 3.0 in field val_2 in model_c.py?
Please help!
Thank you!