Odoo Help


Why I get Uncaught Record not correctly loaded error?

Juan Formoso
on 6/15/15, 8:08 AM 1,231 views

In the res.partner form view of a company, there is a tab named Contacts, in which we can see all the employees who work for that company. If you click on Edit, you will be able to see a X button, and if you click on it, the record of the employee is removed from res.partner. I'd like to add to that button a confirm message. As the attribute confirm does not work in this case (I guess because it only works on status bars), I had to create a wizard to emulate the confirm message.

Everything seems to be OK, but in the wizard, when I click in Confirm, I get a JS error:

Uncaught Record not correctly loaded

And in spite of this error, the record is removed from the database correctly. How can I avoid that? I tried adding the options reload_on_button and always_reload (both True) to the child_ids field (as you may know, this one is the one2many pointing to the employees), but nothing happened.

This is the Confirm wizard button code:

def unlink_partner_from_company(self):
     partners = self.env['res.partner'].search([('id', 'in', self.env.context.get('active_ids', []))]
     return partners.unlink()

I've also tried returning this instead of returning the result of the unlink:

     return {
          'type': 'ir.actions.client',
          'tag': 'reload',

But the same error arises. Can anyone help me please?!

I've just checked that it's not a issue of time, because I've added a delay of 20 seconds after the deletion, and then I called again the form with an action window. The error is still there!

Juan Formoso
on 6/16/15, 4:35 AM

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

Question tools

1 follower(s)


Asked: 6/15/15, 8:08 AM
Seen: 1231 times
Last updated: 6/16/15, 4:35 AM