Odoo Help

Welcome!

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.

2

{SOLVED} Inherit onchange old api vs new

By
Denis Roussel
on 2/4/15, 7:42 AM 2,831 views

Hi,

 

I try to inherit from an osv.osv model with the new one (models.Model) and in particular the 'onchange' method with api decorator.

I've understood that everything is done at the model level, no need to call the method from the view.

But in my case, if I replace the on_change attribute to '1' to be able to trigger the event, the on_change implemented in the parent model (osv.osv) is not triggered.

I don't know if I have to call the super in my new model and how or if the mecanism is inside the framework and I have nothing to do (but I've tested that case and it doesn't seem to work).

 

Many thanks for your help

By the way, it's similar to this post : https://www.odoo.com/forum/help-1/question/how-to-override-the-onchange-product-tmpl-id-with-new-api-73893

Denis Roussel
on 2/5/15, 3:01 AM
3
Denis Roussel
On 2/5/15, 8:53 AM

Ok, solved.

We have to rewrite the whole onchange as new api and old api are not compatible for the onchange!

Read carefully the Raphaël Collet Slideshare http://fr.slideshare.net/openobject/odoo-from-v7-to-v8-the-new-api

Page #29

0

Temur

--Temur--
2894
| 6 5 7
Tbilisi, Georgia
--Temur--
Programmer
Temur
On 11/27/15, 9:24 AM

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)

Stats

Asked: 2/4/15, 7:42 AM
Seen: 2831 times
Last updated: 11/27/15, 9:38 AM