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.

0

Prototype Inheritance new object on existing form view

By
Mai Ecarde
on 1/10/16, 11:36 PM 347 views

I would like to extend a class (obj1) using prototype inheritance (_name=new, _inherit=obj1). 

My question is can I determine if obj1 has a corresponding new object from the existing obj1 form view?

Ideally I would like to extend the existing obj1 form view to include an "additional configuration" button to open to the associated new object's form view. If no new object exists than this button should be hidden/disabled.

EDIT: Additional information, this is for Odoo 9.0

Sounds like you need to explain a little more your needs

Axel Mendoza
on 1/21/16, 9:49 PM

did you find solution for your question? I have the same issue. I inherited "X" module "Prototype Inheritance" then I need also to inherit the existing view of the inherited "X" module. I don't want to go through building all the Form, Tree, Calendar, ... views from scratch, I don't want to copy it also.

Ameen Rabea
on 3/16/16, 5:31 AM

Ended up adding a computed boolean the obj1 class that does a search on the new object class for itself returning if it is found or not. Not sure how efficient this solution is but I don't store the boolean so assume that it only adds load when the form is shown.

Mai Ecarde
on 6/17/16, 12:10 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: 1/10/16, 11:36 PM
Seen: 347 times
Last updated: 1/11/16, 2:34 AM