i want to preform some function when when the selection happen to change value in other module
any idea how to do that :)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
i want to preform some function when when the selection happen to change value in other module
any idea how to do that :)
Hi Ahmad,
You can add a onchange function for the selection field in the first model, let it be model A, then inside the the onchange function you can access the other model, let it be model B and can change the record accordingly.
@api.onchange('test_field')
def test_function(self):
model_b_rec = self.env['model_b']
new_employee = model_b_rec.create({
'name': self.name,
})
Thanks
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
How to change the width of a label in form view
Diselesaikan
|
|
3
Jul 24
|
29547 | |
|
1
Des 21
|
5149 | ||
|
3
Apr 18
|
6012 | ||
|
2
Feb 18
|
3202 | ||
|
0
Jul 17
|
3526 |