Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2335 Näkymät

Hello everyone,

I created a Save Button in the Quotation Form. After the quotation form is created or edited the save button must be hidden or invisible. 

Most Odoo modules use the "state" field for this problem in order to make the button invisible but I want the save button hidden after a form is saved or edited. Thank you. Below is my code:

Python Code (Server Action)

def save(self, cr, uid, ids, context):
    return True
Avatar
Hylkää
Tekijä

XML Code:
<xpath expr="//button[@name='action_cancel']" position="before">
<button string="Save" type="action" name="1003" class="oe_highlights"/>
</xpath>

Paras vastaus

Hi,

 try this class="oe_read_only"

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
4
jouluk. 23
38244
1
tammik. 18
4794
3
lokak. 24
2812
0
toukok. 24
2332
1
toukok. 24
1489