axelor / axelor-open-platform

Open source Java framework for business application development

Home Page:http://axelor.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

context in view action

abdelazizelesh opened this issue · comments

I have 2 view actions with different context value to show and hide some fields based on context value in if conditions.
The problem is that the grid columns are not changed until i do browser refresh ctrl+f5.

<action-view name="partner.active" title="All"
                 model="com.axelor.mymodule.base.db.Partner">
        <view type="grid" name="partner-grid"/>
        <view type="form" name="partner-form"/>
        <context name="_Active" expr="true"/>
    </action-view>

<action-view name="partner.inactive" title="All"
                 model="com.axelor.mymodule.base.db.Partner">
        <view type="grid" name="partner-grid"/>
        <view type="form" name="partner-form"/>
        <context name="_Active" expr="false"/>
    </action-view>


<grid edit-icon="false" name="partner-grid" title="Partner"
          canNew="false" canEdit="false" canArchive="false" canDelete="false" canMove="false" canSave="true"
          model="com.axelor.mymodule.base.db.Partner">
        <field name="name"/>
        <field name="status" selection="select.partner.status"/>
        <field name="subscription" if="_Active"/>
    </grid>

Please advice

any solution for this issue