Skip to Content
Menu
This question has been flagged
1 Reply
4745 Views

HI,

I want to able to edit only but not create or delete.

option on_create doesn't work in odoo 12

The  above  wont  worked!

Please help am using odoo 12 


Avatar
Discard
Author
HI Derick,

It's would work either. below are my code in odoo 12
<?xml version="1.0" encoding="utf-8"?>
<odoo>


<record id="payslip_sign_wiz_view" model="ir.ui.view">
<field name="name">Payslip Signature </field>
<field name="model">payslip.sign.wiz</field>

<field name="arch" type="xml">
<form string="Report Options" >
<group>

<field name="image" widget="image" style="max-height:420px; max-width:425px;"/>
<field name="employee_id" options="{'no_create': True}" />

</group>


<tree string="Payslip" >

<field name="payslip_ids" options="{'no_create_edit': True, 'no_quick_create': True}"/>
</tree>


</form>
</field>
</record>


Please see screenshot attached.
Thank you for your time.
All resource in internet has been exasperatedly search.
Working in 2days still cant figure it out. 
Will really appreciate of any help you can.
Thank you,
Gain
On Sunday, 8 August 2021, 03:55:22 pm GMT+8, Derick David <mailtoderick@gmail.com> wrote:


A new answer on Hide Add a line in manytomany fields in Odoo 12 has been posted. Click here to access the post :

See post

Sent by Odoo S.A. using Odoo.

Best Answer

options="{'no_create_edit': True, 'no_quick_create': True}"

This disables both create,edit and quick create.

Avatar
Discard
Author

it wouldn't

Author

Here are my code in odoo 12:
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<record id="payslip_sign_wiz_view" model="ir.ui.view">
<field name="name">Payslip Signature </field>
<field name="model">payslip.sign.wiz</field>
<field name="arch" type="xml">
<form string="Report Options" >
<group>
<field name="image" widget="image" />
<field name="employee_id" options="{'no_create': True}" />
</group>
<tree string="Payslip" create="0">
<field name="payslip_ids" options="{'no_create_edit': True, 'no_quick_create':
True}"/>
</tree>
</form>
</field>
</record>

Related Posts Replies Views Activity
1
Jul 24
709
1
Jul 23
3410
0
Mar 24
2242
1
Sep 22
5187
1
Mar 22
4410