web mailing list archives

web@odoo-community.org

Avatar

[9.0/10.0 QWeb] Is it Possible To Use 'attrs=' to Show/Hide Form View Elements Populated From a Boolean in a One2many?

by
odoocommunitywidgets
- 13/04/2017 04:22:11
Hi Community,

I'm working on a project that requires 'configurable' forms for different document types (eg. similar to /sale-workflow/sale_order_types, with many different fields shown/hidden based on a one2many show/hide boolean configuration table).

I have seen examples in Odoo core of configurable visibility of form fields, groups, etc. based on a selection field (eg. Delivery Methods > Price Computation > Selection Radio Buttons). In my case however it is useful to have a one2many relationship (eg. like sortable order lines) with a boolean field inside for visibility (ie. visible = yes/no).

Pushing the same concept a little further, if possible I would like to apply the same (visible = yes/no) options to <label>, <group>, <page>, <notebook>, <div>, and so on, to allow for configurable formatting of form layouts.

I'm a little stumped on how to achieve this, has anyone else encountered this scenario and found a solution?

Regards,

Luke Branch