[IMP] website: add helper next to visibility field when set to group
Commit [1] introduced a way to "hide" an ir.ui.view through a new visibility field. That field has multiple possible values to restrict the access. One of those is "Restricted Groups", but when selected it's really hard to figure what to do next because nothing happens on screen: there is no "groups" field where to add the groups. Those groups should actually be added a bit below, in the groups_id field which is "hidden" inside the "Access Rights" second tab. This is because the groups_id field already existed (in base module) before introducing the website visibility feature which just relied on that field when set to "Restricted Groups". Note that another possible value for visibility is "Password", and in this case a password field appear below the visibility field as one would expect. [1]: https://github.com/odoo/odoo/commit/e239934abe456257c9dc285d1ad9829c0353900c closes odoo/odoo#151602 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -1662,6 +1662,11 @@ msgstr ""
|
||||
msgid "Add a new field at the end"
|
||||
msgstr ""
|
||||
|
||||
#. module: website
|
||||
#: model_terms:ir.ui.view,arch_db:website.view_view_form_extend
|
||||
msgid "Add groups in the \"Access Rights\" tab below."
|
||||
msgstr ""
|
||||
|
||||
#. module: website
|
||||
#. odoo-python
|
||||
#: code:addons/website/models/res_lang.py:0
|
||||
|
||||
@@ -191,6 +191,10 @@
|
||||
<field name="page_ids" invisible="1" />
|
||||
<field name="first_page_id" invisible="not page_ids" />
|
||||
<field name="visibility" invisible="type != 'qweb'" />
|
||||
<span class="o_wrap_label" invisible="visibility != 'restricted_group'"/>
|
||||
<div class="oe_edit_only alert alert-info" role="alert" invisible="visibility != 'restricted_group'">
|
||||
Add groups in the "Access Rights" tab below.
|
||||
</div>
|
||||
<field name="visibility_password_display" invisible="visibility != 'password'" password="True" string="Visibility Password" />
|
||||
</field>
|
||||
<sheet position="before">
|
||||
|
||||
Reference in New Issue
Block a user