2017-10-19 527 views
1

我想繼承base.user_groups_viewbase.view_users_form隱藏某些信息這是不是在我的情況非常有用。Odoo - 隱藏在繼承視圖組或頁面沒有名字

base.view_users_form

我想隱藏Preferences標籤完全,但這個頁面有一個字符串,並沒有一個name屬性,這就是爲什麼當我試圖找出這個網頁它說cannot locate in parent view如果我嘗試使用string搜索屬性,它說View inheritance may not use attribute 'string' as a selector.

base.view_users_form

上空時,我試圖隱藏應用

同一個spearator它說:View inheritance may not use attribute 'string' as a selector.

如何隱藏這些,當我們在繼承視圖

編輯

我使用Odoo 10企業

回答

2

在odoo 9就不可能使用「串」在xpath表達式中。在你的情況下,你應該使用索引。例如:

<xpath expr="//page[3]"> 
    <!-- your code --> 
</xpath> 

這將搜索您視圖中頁面的第三個元素。

你可以訪問:xpath_string以獲取更多信息。

我希望這對你有所幫助!

+0

對不起,我沒有提到,但我使用odoo 10e – Ancient

+2

也許在odoo 10e也被棄用。我個人不喜歡它,但我認爲如果你沒有其他獨特的屬性,你應該使用索引。 – Dayana

+1

是的,它也適用於Odoo 10.謝謝 – Ancient