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

I need to tell Odoo to use a specific form view for a specific menuitem (new module) without overriding base view so it won't affecting other menus. mode=primary doesn't do anything. Should I make a new model inherited from the base model? (Use _name and _inherit) and use that new model in the view (model=new.model). Or maybe I can use Action or Context to tell Odoo to use the new form view?

アバター
破棄
著作者

Thanks, it works now! But I don't understand what is the {5, 0, 0} doing in the first records

It is for clearing the existing values

最善の回答

Hi,

Using mode primary you can create a new view without affecting the original view, and set a higher priority value for the newly created view.

100


Once the priority is set as higher, in the default menus, the original view will displayed as its priority is less(considering the action of menu doesn't contains view_ids)


Now in your newly created menu, along with the menu action specify the views using the view_ids key.

For more, see: https://www.youtube.com/watch?v=-2EAt9nN4o0

Thanks

アバター
破棄
関連投稿 返信 ビュー 活動
1
11月 22
2884
1
9月 22
2324
4
6月 21
6726
1
5月 16
3536
5
11月 15
12893