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

Hi My friend,

      i have a module  and the name of this module is shown in left menu. when user click the menu, how can to show the exists data to the user by form view instead of tree view?


Thanks a lot!

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

Hi, You can check the functionality of Add to Dashboard concept in Odoo v8, which creates a custom dashboard in Odoo 8. Here Odoo displaying records on form view.

Thanks

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

Try changing the 'view_mode' of the action of your menu item . i.e,

<field name="view_type">form</field>

<field name="view_mode">form,tree</field>

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

Hi,

in your action (ir.actions.act_window) set the follwoing values,

<field name="view_type">form</field>

<field name="view_mode">form</field>

<field name="res_id">1</field> /*set the record ID you want to display*/


if you know the xml record ID then you can declare as,

<field name="res_id" ref="module_name.xml_record_id"/>

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

@Avinash:  i only need to show detail of one record. Thank you.

@Linto: it only allow me to create a new record, but i need to show a exist record.  Thank you.

@Hilar: i want to do in odoo 10, can you show me the detail?  Thank you.

อวตาร
ละทิ้ง