Odoo Help

1

when inherit sale order, onchange('product_id') can't work

By
cialuo
on 7/4/15, 1:06 PM 1,118 views

when inherit sale order line, onchange('product_id') can't work, but onchange other fields can work normally. 

also find that when inherit sale order , onchange('partner_id') can't work  also. 

class SaleOrderLine(models.Model):

_inherit = "sale.order.line"


@api.one

@api.onchange('delay')

def onchange_commission_plan(self):

print '323a'

if self.product_id:

pass

@api.one

@api.onchange('product_id')

def onchange_commission_plan99(self):

print '121323a'

if self.product_id:

pass

0
Angel A. Guadarrama B.
On 12/15/15, 7:50 PM

Hello. You solve this issue?

0
Zbik
On 7/5/15, 2:59 PM

You probably have a conflict between the new and the old api. Check other installed modules and find which uses on_change for product_id field of view xml (old style onchange). When used both at the same time, it works only in old style.

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/4/15, 1:06 PM
Seen: 1118 times
Last updated: 1/19/16, 1:16 AM