Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2338 Lượt xem

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
Ảnh đại diện
Huỷ bỏ
Tác giả

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

Câu trả lời hay nhất

Hi,

 try this class="oe_read_only"

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 12 23
38252
1
thg 1 18
4795
3
thg 10 24
2821
0
thg 5 24
2338
1
thg 5 24
1494