Tryton - Issues



Title Sao doen't hide page widget (tab content) when the tab is active
Priority bug Status closed
Superseder Categories accounting tab showing it's separators
View: 6861
Nosy List ced, xar
Type behavior Components sao
Assigned To Keywords

Created on 2018-12-12.15:11:09 by xar, last changed by ced.

msg46720 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-02-03.22:49:01
Can not reproduce. But it seems to be a duplicate of issue6861.
msg45289 (view) Author: [hidden] (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
2019-02-03 22:49:01cedsetstatus: unread -> closed
superseder: + Categories accounting tab showing it's separators
messages: + msg46720
nosy: + ced
2018-12-12 15:11:09xarcreate