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

I have a custom button on tree view to open a record. It properly opens the record on clicking the button with form view and getting proper breadcrumb(Menu_name / record name) but when i am refreshing the form view it changes the breadcrumb to only record name not menu_name / record_name.

Here is the code for action on button click :-

        
    def button_action(self):

        return {
            'name': ('Test),
            'type': 'ir.actions.act_window',
            'view_type': 'form',
            'view_mode': 'form',
            'target': 'current',
            'res_model': 'module.name',
            'res_id': self.id,
            # 'action':70

        }
This is the action i am using when button is clicked. What can be the solution for this? Is there any way i can solve this? Please let me know if any solution is there for this.
الصورة الرمزية
إهمال
أفضل إجابة

Hi,

It is the default behavior in Odoo. The breadcrumb will convert to the record_name or the root_menu/ record_name after refreshing the page.
E.g. 

If you open the invoice for a sale order in sales, the breadcrumb will be like Quotations / S00007 / INV/2021/07/0005. After refreshing the page it will become Invoices / INV/2021/07/0005.

Regards

الصورة الرمزية
إهمال
الكاتب

This happens on button action not on normal actions. Like when you click on a record in tree view(action defined in xml) it won't change the breadcrumb even after refreshing but when you click on a button in tree view to open a record it will change the breadcrumb after refreshing.

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 20
13518
1
مايو 24
1788
0
ديسمبر 23
1714
0
أبريل 21
3424
1
مارس 21
4569