Odoo Help


This community 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.


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

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



| 5 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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


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