[IMP] bi_sql_editor : allow to reset to the previous state, and not only into 'draft' state

This commit is contained in:
Sylvain LE GAL
2023-12-05 22:57:12 +01:00
committed by thien
parent 57202eb9f1
commit f79db202ec
2 changed files with 44 additions and 33 deletions

View File

@@ -34,14 +34,20 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<button
name="button_set_draft"
name="button_reset_to_sql_valid"
type="object"
states="model_valid,ui_valid"
string="Set to Draft"
states="model_valid"
string="Delete SQL Elements"
groups="sql_request_abstract.group_sql_request_manager"
confirm="It will delete the materialized view, and all the previous mapping realized with the columns"
/>
<button
name="button_reset_to_model_valid"
type="object"
states="ui_valid"
string="Delete UI"
groups="sql_request_abstract.group_sql_request_manager"
confirm="Are you sure you want to set to draft this SQL View. It will delete the materialized view, and all the previous mapping realized with the columns"
/>
<button
name="button_create_sql_view_and_model"
type="object"
@@ -66,13 +72,6 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
class="oe_highlight"
help="This will create Odoo View, Action and Menu"
/>
<button
name="button_refresh_materialized_view"
type="object"
string="Refresh"
help="Refresh Materialized View"
attrs="{'invisible': ['|', ('state', 'in', ('draft', 'sql_valid')), ('is_materialized', '=', False)]}"
/>
<button
name="button_open_view"
type="object"
@@ -80,6 +79,13 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
states="ui_valid"
class="oe_highlight"
/>
<button
name="button_refresh_materialized_view"
type="object"
string="Refresh"
help="Refresh Materialized View"
attrs="{'invisible': ['|', ('state', 'in', ('draft', 'sql_valid')), ('is_materialized', '=', False)]}"
/>
</xpath>
<group name="group_main_info" position="inside">
<group>