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

Hi everybody, I'm using Odoo v15.

I'm trying to hide save and discard record button only on specific FORM view:



em.attendances.students.sheet.form
em.attendances.students.sheet







attrs="{'invisible': [('active', '=', True)]}"/>





























I already try the following:

--> Added create="false" and edit="false" on the form tag:


--> Modify access rights. I created a new group and give to the user only "read rights", but the problem here is that I have a tree view showed before the form view, and I NEED to show the "create" button in the tree view (I attached the code of this view next):


em.attendances.students.sheet.tree
em.attendances.students.sheet











--> I tried to add some js file linked to the view, but I can not run the script

Please, any help will be useful, thanks in advance!



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

Hello Nico Hussein, 


Find Code in Comment. 



Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

อวตาร
ละทิ้ง

You need to add this line in ir.actions.act_window
<field name="target">inline</field>

Or You can try create="false" edit="False" in form tag

คำตอบที่ดีที่สุด

Hi Nico:

Add  

'create': False

to the context of the window action that is used to open the form.

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

In your ir.actions.act_window xml record of the model, add the below line:


<field name="target">inline</field>



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ย. 18
300
1
พ.ย. 17
20470
1
ก.ย. 23
4783
1
พ.ค. 22
3326
0
มิ.ย. 15
3882