Odoo Help


6 Answers

Jignesh Mehta อินเดีย

--Jignesh Mehta--
| 7 6 10
Surat, อินเดีย
--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 อินเดีย
29/6/16 08:30

Hello Uppili,

Try below code :-


def unlink(self):

    res = super(hr_attendance, self).unlink()

    return self.return_action_hr_attendance()

def return_action_hr_attendance(self):

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

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

     view_id = model_obj.browse(data_id).res_id

     return {

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

          'tag': 'reload',

          'name': _('Attendance'),

          'res_model': 'hr.attendance',

          'view_type': 'tree',

         'view_mode': 'tree',

         'view_id': view_id,

         'target': 'current',

         'nodestroy': True,


Hope it works for you.


3 ความคิดเห็น
Uppili Arivukkannu อินเดีย
29/6/16 08:54

Thanks for your reply.

Your code deletes the record but the page is not refreshing.

data_id = model_obj._get_id('hr_attendance', 'view_attendance_who')

Uppili Arivukkannu อินเดีย
29/6/16 09:30

When I give this method in return_action_hr_attendance in button. While I pressing that button the page is getting refreshed but while deleting the page is not refreshing.

Uppili Arivukkannu อินเดีย
29/6/16 09:36

The same is happening in both of our codes. While passing through unlink() the page refresh is not happening.


Axel Mendoza คิวบา

--Axel Mendoza--
| 8 8 10
Camaguey, คิวบา
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza คิวบา
29/6/16 19:07

You need an auto_refresh solution like:


because the unlink will not trigger any reload and even if it does, it will be for the current user, not for others users

Ask a Question
Keep Informed
1 ผู้ติดตาม
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.

Odoo Training Center

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

Test it now