Skip to Content
Menu
This question has been flagged
1 Atsakyti
2344 Rodiniai

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
Portretas
Atmesti
Autorius

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

Best Answer

Hi,

 try this class="oe_read_only"

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
4
gruod. 23
38266
1
saus. 18
4803
3
spal. 24
2833
0
geg. 24
2344
1
geg. 24
1497