Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata

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

Avatar
Abbandona

Sounds like you need to explain a little more your needs

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.

Autore

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.

Post correlati Risposte Visualizzazioni Attività
1
gen 17
4283
1
ago 23
6003
1
mar 23
3482
1
feb 23
1985
1
set 20
7416