コンテンツへスキップ
メニュー
この質問にフラグが付けられました

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

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.

著作者

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.

関連投稿 返信 ビュー 活動
1
1月 17
4281
1
8月 23
6001
1
3月 23
3477
1
2月 23
1983
1
9月 20
7411