Odoo Help

6
5
ayman mohammed adam
On 10/27/16, 1:54 AM

dear Annadurai,


if you need to call create method within a same model just you can use :

self.create(vals)

vals is a dictionary have keys and values for required fields at least like this:
vals= {'field1':value, 'field2': value}

if you need to call create method from another model just you must declare object with this model and call create method like this:

model2_obj= self.env['model2.model2']
model2_obj.create(vals)


 I hope i helped you....

Thank you Ayam

Annadurai
on 10/27/16, 1:57 AM

welcome..

ayman mohammed adam
on 10/27/16, 2:02 AM

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

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: 10/27/16, 1:43 AM
Seen: 2232 times
Last updated: 5/3/18, 6:52 AM