Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged

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
Zrušit

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.

Autor

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.

Related Posts Odpovědi Zobrazení Aktivita
1
led 17
4272
1
srp 23
5971
1
bře 23
3456
1
úno 23
1941
1
zář 20
7390