Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show option field dropdown in listview #31944

Open
wants to merge 25 commits into
base: master
from

Conversation

Projects
None yet
3 participants

@robodoo robodoo added the seen 🙂 label Mar 19, 2019

@C3POdoo C3POdoo added the RD label Mar 19, 2019

@msh-odoo msh-odoo force-pushed the odoo-dev:master-web-listview-hide-fields-msh branch from d4b501e to 69f5e35 Mar 20, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 20, 2019

@msh-odoo msh-odoo force-pushed the odoo-dev:master-web-listview-hide-fields-msh branch from ba6e830 to c10ed45 Mar 25, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 25, 2019

@msh-odoo msh-odoo force-pushed the odoo-dev:master-web-listview-hide-fields-msh branch from 72fdebb to 8d0dfbf Mar 25, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 25, 2019

@msh-odoo msh-odoo force-pushed the odoo-dev:master-web-listview-hide-fields-msh branch from ff1f4d9 to 7cd554a Mar 29, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 29, 2019

@msh-odoo msh-odoo force-pushed the odoo-dev:master-web-listview-hide-fields-msh branch from d9913b5 to c92d346 Apr 1, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Apr 1, 2019

msh-odoo added some commits Mar 15, 2019

[IMP]web: Add optional field feature, user can now define optional='1…
…' on field in arch

that field will be displayed under optional field dropdown in listview header, when enabling field checkbox from dropdown field will be added to listview and disabling will remove field from listview
Same thing works in o2m listview also, WIP
[IMP]web: maintain optional columns at state for x2m, we need to main…
…tain it else when record is created in x2m or mode of the main record changed o2m will be reinitialized so we can not keep state of optiona columns enabled on widget itself, we need to store it like sorted column
[REM]sale_stock: Remove group_route_so_lines group i.e. 'Order-specif…
…ic Routes' from sale_stock this groups was added in res.config.setting of sale and was used to enable route_id field in sale order line, now we will use group stock.group_adv_location i.e. 'Multi-steps Routes', we make route_id field optional so it will be displayed on sale order line in optional fields dropdown and user can temporary enable it

Related to task: #1902765
[REM]account: remove group_products_in_bills group i.e. 'Use products…
… in vendor bills' as it is useless, if one wants to hide product field later he will use optional attribute from studio to hide it as we support optional attribute to make field optional
[IMP]event_sale,sale_stock: add Event, Event Ticket and Package field…
… on sale order line tree view with optional='1'
[IMP]web: advanced attribute now supports two value 'hide' or 'show',…
… if hide is given then that field will go in advanced dropdown and not displayed in columns of listview, if show is given then that column will be displayed in listview but it will be available in advanced dropdown with default checked
[IMP]web: show whole dropdown, don't hide it behind responsive table,…
… temporary make table-responsive overflow-x: inherit when bootstrap dropdown shown and when it is hidden then set it back to auto
[IMP]web: store advanced columns activated in storage so that when us…
…er comes next time to listview then listview fetches activated columns from localstorage and render only those which are visible and hide those which are hidden

stored key is action ID, view type, [field_name], this way we will have unique key for the view
[IMP]web: save advanced enabled columns i.e. show advanced column in …
…localstorage, where key will be 'model_name,field1:type,field2:type,...'

there less chances to have same key twice, to have same key twice there should two same views with same fields in same order on same model, even if there is such case where we have two same view for same model then it's ok to hide/show same fields for both views

get localstorage data in start of list renderer, reason is, init will not have list controller as a parent because renderer is instantiated from mvc and hence parent will be action manager, so get localstorage data using trigger_up in start method

two events are added get_advanced_columns and set_advanced_columns where get_advanced_columns fetches advanced columns which are enabled from localstorage and set_advanced_columns will store advanced columns enabled and this event is triggerred whenever user changes advance column from list view dropdown of advance column
also these two events are handled in relational x2m field to generate key for x2m and fetch and store data for advance columns enabled

@msh-odoo msh-odoo force-pushed the odoo-dev:master-web-listview-hide-fields-msh branch from 5301612 to 6a04b44 Apr 17, 2019

@robodoo robodoo added the CI 🤖 label Apr 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.