Odoo Help

6
1 Answer
6
Avatar

ayman mohammed adam

--ayman mohammed adam--
--ayman mohammed adam--


ayman mohammed adam
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....

3 Comments
Annadurai
10/27/16, 1:57 AM

Thank you Ayam

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

welcome..

GLOBAL CREATIVE CONCEPTS TECH CO LTD (iWesabe)
3/15/18, 3:44 AM

Awesome !!

Ask a Question
Writer
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