<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2025 Akretion France (https://www.akretion.com/)
  @author: Alexis de Lattre <alexis.delattre@akretion.com>
  License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->

          <odoo>

                  <record id="account_dashboard_banner_cell_form" model="ir.ui.view">
                          <field name="model">account.dashboard.banner.cell</field>
                          <field name="inherit_id" ref="account_dashboard_banner.account_dashboard_banner_cell_form"/>
                          <field name="arch" type="xml">
                                  <field name="cell_type" position="after">
                                          <field name="mis_report_instance_id" required="cell_type == 'mis_builder'" invisible="cell_type != 'mis_builder'"/>
                                          <field name="mis_report_id" invisible="1"/>
                                          <field name="mis_report_kpi_id" required="cell_type == 'mis_builder'" invisible="cell_type != 'mis_builder'"/>
                                          <field name="mis_report_kpi_type" invisible="1"/>
                                          <field name="mis_report_kpi_num_display_currency" required="cell_type == 'mis_builder' and mis_report_kpi_type == 'num'" invisible="cell_type != 'mis_builder' or mis_report_kpi_type != 'num'"/>
                                          <field name="mis_report_instance_period_id" required="cell_type == 'mis_builder'" invisible="cell_type != 'mis_builder'"/>
                          </field>
                          </field>
                  </record>

        <record id="account_dashboard_banner_cell_list" model="ir.ui.view">
                <field name="model">account.dashboard.banner.cell</field>
                <field name="inherit_id" ref="account_dashboard_banner.account_dashboard_banner_cell_list"/>
                  <field name="arch" type="xml">
                      <field name="cell_type" position="after">
                            <field name="mis_report_instance_id" invisible="cell_type != 'mis_builder'" optional="show"/>
                            <field name="mis_report_kpi_id" invisible="cell_type != 'mis_builder'" optional="show"/>
                            <field name="mis_report_instance_period_id" invisible="cell_type != 'mis_builder'" optional="hide"/>
                  </field>
                  </field>
              </record>

    </odoo>
