Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
8 ตอบกลับ
15704 มุมมอง

I have a wizard in a custom module.

When I click on the main button, it redirects me to my custom view and the breadcrumb is updated well, but the problem is that the previous links remain in the breadcrumb. I do not want to keep the previous links in the breadcrumb.

Is it possible to "clean" the breadcrumb after the wizard? (And put only the new link)


More info:

This is the code for the main button action of the wizard:

def custom_main_button_action(self):
  ...(my stuff)...
  return {
          'type': 'ir.actions.act_window',
          'name': _('My_Name)'),
          'res_model': 'my_model',
          'view_type': 'form',
          'view_mode': 'tree, form',
          'target': 'current',
          'views': [(tree_id.id, 'tree'), (form_id.id, 'form')],
    }
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

i resolved this with

'target': 'main',

อวตาร
ละทิ้ง
ผู้เขียน

target main is the same behaviour as target current. What did you solve exactly?

Try it and you will see that if it works with that nothing else

ผู้เขียน

I have tried... Same behaviour than current

คำตอบที่ดีที่สุด

            return { 
                'type': 'ir.actions.act_window',  
                'name': _ ('My Order'),  
                'res_model': 'purchase.request',  
                'res_id': data.get ('order_id'),  
                ' view_type ':' form ',  
                ' view_mode ':' form ',  
                ' target ':' current ',  

                 'context': {'no_breadcrumbs': True},                 

                'nodestroy': True,}
                


Hopes this helps .. !!



https://www.odoo.com/es_ES/forum/ayuda-1/question/hide-breadcrumbs-on-specific-model-123540#answer-170409

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Try this:

def custom_main_button_action(self): ...(my stuff)... return { 'type': 'ir.actions.act_window', 'name': _('My_Name)'), 'res_model': 'my_model', 'view_type': 'form', 'view_mode': 'tree, form', 'target': 'current',
          'clear_breadcrumb': True, 'views': [(tree_id.id, 'tree'), (form_id.id, 'form')], }

อวตาร
ละทิ้ง
ผู้เขียน

Same behaviour. Doesn't clear anything

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 17
6107
0
ต.ค. 23
975
2
ส.ค. 20
9548
0
ก.ย. 20
3727
3
พ.ค. 20
6127