تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2295 أدوات العرض

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
ديسمبر 23
38202
1
يناير 18
4777
3
أكتوبر 24
2785
0
مايو 24
2298
1
مايو 24
1453