Odoo Help

0

How to create one2many values from onchange ?

By
Shameem Babu @ iWesabe
on 7/13/17, 5:52 AM 386 views

Hi

I am trying to create one2many lines from onchange method.  The Parent ID should be specified to create that.

But parent is NewID.

crm.lead(<odoo.models.NewId object at 0x7faf0f2c3750>,)

What can I do ?

3
Mohammed Amal
On 7/13/17, 6:43 AM

Hi

have you tried using self.update?

self.update({
'attendance_line': [(0, 0, {values})],
})

 This method does not require id of current record

Thanks Muhammed !!!

Your answer is perfect.

GLOBAL CREATIVE CONCEPTS TECH CO LTD, Shameem Babu @ iWesabe
on 7/13/17, 7:16 AM
0
Matija
On 10/26/17, 4:18 AM

Tnx Mohammed !!

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: 7/13/17, 5:52 AM
Seen: 386 times
Last updated: 10/26/17, 4:18 AM