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

good morning , please i want to know how to open a form view of an other model on a new tab of the the browser by clicking on a button and passing context

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

in model.py 

def function_name(self):

return{

​'name' :'Somename',

​'domain':[],

​'res_model':'your.model',

​'type': 'ir.actions.act_window',

​'view_mode': 'tree,form',

​'target':'new',

​'view_type':'tree',

​'context': {},

}

in the model.xml call this function within a button.

Adjust function,name,domain,context as its required.

อวตาร
ละทิ้ง