Odoo Help

0

How to create one2many values from onchange ?

By
shameem@iWesabe
on 7/13/17, 5:52 AM 272 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 ?

2
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.

shameem@iWesabe
on 7/13/17, 7:16 AM

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: 272 times
Last updated: 7/13/17, 7:16 AM