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

In odoo for each form view (like emplooyees) there is an "action" menu showing a "Delete" button. When the user click that button it deletes the record and shows the form view of the next record (employee) on the list. Is it possible to redirect to the tree view of that entity (employee) when the user deletes the record, instead of showing the next emplooyee?

الصورة الرمزية
إهمال
أفضل إجابة

Try to override the Unlink ORM function of related model and redirect to tree view needed, by returning an action dictionary.

eg:

def unlink(self):

    res = super(ClassName).unlink()

    if res:

        return action_dict()
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
5
أغسطس 24
46638
2
أبريل 24
2551
3
يونيو 23
5779
2
يونيو 23
4722
3
مارس 23
10312