跳至內容
選單
此問題已被標幟
3530 瀏覽次數

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>

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
4
5月 24
12335
1
4月 24
3021
0
11月 23
1851
1
9月 23
1924
2
8月 23
4240