跳至内容
菜单
此问题已终结
1 回复
2310 查看

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
形象
丢弃
编写者

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

最佳答案

Hi,

 try this class="oe_read_only"

形象
丢弃
相关帖文 回复 查看 活动
4
12月 23
38223
1
1月 18
4779
3
10月 24
2796
0
5月 24
2314
1
5月 24
1466