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

Hello guys, I would like put a number in menus about this ones need an action, I inherit ir.needaction_mixin in my model and in the xml I added <field name="message_needaction" invisible="1"/> in my tree view and in the menus actions I added this (all the menus that should have the notification number):

            <field name="context">{

                'needaction_menu_ref':

                [

                    'hr_holidays_horasextras.menu_hr_holidays_horasextras',

                    'hr_holidays_horasextras.menu_hr_holidays_horasextrascreadas',

                    'hr_holidays_horasextras.menu_hr_holidays_horasextrasaprobar',

                    'hr_holidays_horasextras.menu_hr_holidays_horasextrasaprobar_director',

                ]

            }</field>


But It didn't work, could you help me? Thanks!

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Okay I did it ! just with  def _needaction_domain_get(self, cr, uid, context=None)  

I resolved my problem

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 10 17
3199
0
thg 4 17
8543
3
thg 1 24
8701
0
thg 1 24
7
3
thg 2 20
2953