Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
2366 มุมมอง

Hello everyone 


I would like to create a server action that could change all the parameters of my model based on another model. For example, I have my first model called Alpha, which has a name and a number, and a second model called Beta, which also has a name and a number but has a many-to-one relationship with Alpha. So, through the action server, I want Beta to take the same name and number as Alpha.


I am using odoo 16 studio

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hello, thx for your answer i will try with a related field but the problem it is that it asked to me to use a server controller.

And i don't understand how could i do.


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello,

You can create the fields on the Beta model (name, number) as related field of the Alpha model.Here I am giving an example of adding a related field (Customer Name) to the sale order model (using studio) which fetches the name of customer from the ‘customer’ field.Please try refer on it.




Regards

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ส.ค. 25
138
1
ส.ค. 25
284
3
ส.ค. 25
2346
1
ส.ค. 25
685
0
ส.ค. 25
420