Odoo Help


Akhil P Sivan

--Akhil P Sivan--

| 5 4 7
Kochi, India
--Akhil P Sivan--

Interested in exploring Odoo both technically & functionality wise.

email-id : akhilpsivan01@gmail.com

Akhil P Sivan
On 5/1/16, 12:03 PM


vals is a dictionary containing the values to create a new record or write to a record in the model. 

I hope you are working in Odoo 8 new api.

In that case, if you want to override create():


class AccountJournal(models.Model):
    _inherit = "account.journal"
    def create(self, vals):         
        rec_id = super(AccountJournal, self).create(vals)
        ...     #do your stuff    
        return rec_id

and for write():


class AccountJournal(models.Model):
    _inherit = "account.journal"
    def write(self, vals):         
        res = super(AccountJournal, self).write(vals) 
        ...    #do your stuff
        return res

Hope this helps

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

2 follower(s)


Asked: 5/1/16, 10:27 AM
Seen: 1063 times
Last updated: 8/16/16, 2:58 AM