Odoo Help

0

Constraints in V8

By
Stéphane Codazzi
on 8/12/14, 11:00 AM 2,014 views

Hi,

I make a project addons, and I want to access at "project.parent_id" in _constraints, but, parent_id's modifications aren't saved.

In openerp/models.py : 

         if old_vals:
            self._write(old_vals)

        # put the values of pure new-style fields into cache, and inverse them
        if new_vals:
            self._cache.update(self._convert_to_cache(new_vals))
            for key in new_vals:
                self._fields[key].determine_inverse(self)

Old value are write before news. 

Thanks

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

Question tools

1 follower(s)

Stats

Asked: 8/12/14, 11:00 AM
Seen: 2014 times
Last updated: 3/16/15, 8:10 AM