Tryton - Issues



Author xar
Date 2018-12-12.15:11:09
When a page in a notebook is displayed, if server-side code changes invisibility state to 'true', the page tab is hidden, but its content is not.

EG :
For this piece of view : 
    <notebook colspan="6">
        <page string="Page1" id="id_page1">
            <label name="field1"/><field name="field1"/>
        <page string="Page2" id="id_page2">
            <label name="field2"/><field name="field2"/>

And this piece of code asking for invisibility :
    def view_attributes(cls):
        return super(MyModel, cls).view_attributes() + [
            ('//page[@id="page2"]', 'states', {'invisible': Eval('field0') != 'P',}),

If 'page2' is displayed, and the conditions asks for hidding, the content div is still displayed

It seems that the content is still marked as active.
Below is the div state that is unchanged before and after the server side code asked for invisibility :
    <div role="tabpanel" class="tab-pane active" id="ui-id-30">
Date User Action Args
2018-12-12 15:11:09xarsetmessageid: <>
2018-12-12 15:11:09xarlinkissue7923 messages
2018-12-12 15:11:09xarcreate

Showing 10 items. Show all history (warning: this could be VERY long)