Odoo Help

1

Akhil P Sivan

--Akhil P Sivan--
4035
| 5 3 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

Hi,

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():

eg:

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

and for write():

eg:

class AccountJournal(models.Model):
    _inherit = "account.journal"
   
    @api.multi     
    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.

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

2 follower(s)

Stats

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