Odoo Help

0

0
1 Answer
0
Avatar

Jignesh Mehta India

--Jignesh Mehta--
12232
| 7 6 10
Surat, India
--Jignesh Mehta--
General Summary :-
- Odoo (Formerly OpenERP) Technical & Functional Expert.
- Worked as Project lead on Jewellery Manufacturing ERP.
- Having 3+ years of strong experience in odoo module development.
- Work for 3+ odoo customization to international & national clients.

Module Developments :-
- Develop Jewellery Manufacturing ERP from Scratch.
- Work in Several Modules like CRM, Sales, Purchase, Account, Inventory HR, Payroll, Website, etc.
- Work in Odoo themes which is Business and E-commerce.

Report Development :-
- Develop several Qweb and Excel Reports.

Code Migration :-
- Migrate code from Odoo9.0 to Odoo12.0 of Jewellery Manufacturing ERP.
Jignesh Mehta India
11/29/16, 10:56 PM

Hello Munesh Nandwani,


Try below code.


@api.multi

def refresh_plat(self, plating):

     model_obj = self.env['ir.model.data']

     data_id = model_obj._get_id('module_name', 'view_id_which_you_want_refresh')

     view_id = model_obj.browse(data_id).res_id

     return {

         'type': 'ir.actions.client',

         'tag': 'reload',               

         'name': _('View Name'),               

         'res_model': 'model_name',               

         'view_type': 'view type which is kanban, form',               

         'view_mode': 'view mode which is kanban, form',               

         'view_id': view_id,               

         'target': 'current',               

         'nodestroy': True,

     }


Hope it will works for you.

Thanks,


1 Comment
Munesh Nandwani Indonesia
11/30/16, 12:18 AM

Hi Jignesh Metha,

Thank you for you reply. But it's not the solution that I am looking for. I wish I can upload a picture to have a clearer view of the situation.

What happen is, In From Employee Activity I have one2many of Plating. In that one2many tree I have a button name "start". If u click the one2many it will pop up a wizard that will have the same button (start).

If use the button inside the wizard and I call both refresh function. It work properly. But if I use the button inside the one2many (without having a pop out wizard) it will not refresh properly (it only refresh that one2many not other one2many that are created because of that start button).

So If i can find out currently the user is using the start button from wizard view or not wizard view I can call the function accordingly. I hope this clarifies my question. Thank you.

Ask a Question
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now