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

Example:

 

Module1.module1

Name = fields.Char()

 

________________

|records  : Cow        |

|                : Goat       |

|                : Bull         |

|                : Chicken  |

|                : Fish         |

----------------------------

 

Module2.module2

 

Animal _type = fields.Many2one(‘module1.module1’)

Animal_id = fields.Char()

Animal_fat=fields.Char()

Animal_meat=fields.Char()

 

 

---------------------------------------------Records module2.module2---------------------------------------

Animal_type      |              Animal_ID           |              Animal Fat           |              Animal meat      |

Goat                      |              Goat001               |              40%                        |              60%                        |

Goat                      |              Goat002               |              20%                        |              80%                        |

Goat                      |              Goat003               |              10%                        |              90%                        |

Cow                       |              Cow045                |              30%                        |              70%                        |

 

 

 

Module2-webportal.xml

 

<template>

 

<!--- I want to add here the record list from module1.module1 the code will be inside of Module2-webportal.xml and it shows as dropdown--->

 

<t t-foreach=”docsModule2” t-as=”module2”>

<div>

                                                <span t-field=”module2.animal_type.display_name”/>

                                                <span t-field=”module2.animal_id”/>

                                                <span t-field=”module2.animal_fat”/>

<span t-field=”module2.animal_meat”/>

</div>

 

</t>

</template>

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
พ.ค. 24
12596
1
เม.ย. 24
3238
0
พ.ย. 23
1970
Blank White Page After log in to Odoo13 แก้ไขแล้ว
1
ก.ย. 23
2066
2
ส.ค. 23
4446