Odoo Help


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

on 7/4/15, 1:06 PM 860 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"



def onchange_commission_plan(self):

print '323a'

if self.product_id:




def onchange_commission_plan99(self):

print '121323a'

if self.product_id:


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

Hello. You solve this issue?



| 6 4 7
Lodz, Poland

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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.


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)


Asked: 7/4/15, 1:06 PM
Seen: 860 times
Last updated: 1/19/16, 1:16 AM