|
277 | 277 | <t t-set="custom_field_prefix" t-value="prefixes.get('custom_field_prefix')"/> |
278 | 278 | <t t-foreach="cfg_step_attribute_line_ids" t-as="line"> |
279 | 279 | <t t-set="custom_value" t-value="custom_value_ids.filtered(lambda x, line=line: x.attribute_id == line.attribute_id)"/> |
280 | | - <t t-set="available_val" t-value="any(val.id in available_value_ids for val in line.value_ids)"/> |
281 | | - <div t-att-class="'attribute_container'"> |
| 280 | + <t t-set="available_val" t-value="any(val in available_value_ids for val in (line.value_ids.ids + (line.custom and [custom_val_id.id] or [])))"/> |
| 281 | + <div t-att-class="'attribute_container' + ((not available_val and line.hide) and ' d-none' or '')"> |
282 | 282 | <label class="control-label" t-esc="line.attribute_id.name" t-att-data-oe-id="line.attribute_id.id"></label> |
283 | 283 | <select t-att-id="'%s%s' % (field_prefix, line.attribute_id.id)" |
284 | 284 | t-att-data-oe-id="line.attribute_id.id" |
285 | 285 | t-att-data-attr-required="line.required" |
286 | 286 | t-att-multiple="'multiple' if line.multi else None" |
287 | 287 | t-att-name="'%s%s' % (field_prefix, line.attribute_id.id)" |
288 | 288 | t-att-class="'form-control config_attribute' + (' required_config_attrib' if (not available_val and line.required and line.custom) or (available_val and line.required) else '') + (' d-none' if not line.value_ids else '')" |
289 | | - t-att-data-old-val-id="(value_ids & line.value_ids) and (value_ids & line.value_ids).ids[0] or ''"> |
| 289 | + t-att-data-old-val-id="(value_ids & line.value_ids) and (value_ids & line.value_ids).ids[0] or ''" |
| 290 | + t-att-data-attr-hide="line.hide"> |
290 | 291 |
|
291 | 292 | <!-- t-att-disabled="'disabled' if not available_val_ids and not line.custom else None" --> |
292 | 293 | <option name=""/> |
|
337 | 338 | <t t-set="custom_field_prefix" t-value="prefixes.get('custom_field_prefix')"/> |
338 | 339 | <t t-foreach="cfg_step_attribute_line_ids" t-as="line"> |
339 | 340 | <t t-set="custom_value" t-value="custom_value_ids.filtered(lambda x, line=line: x.attribute_id == line.attribute_id)"/> |
340 | | - <t t-set="available_val" t-value="any(val.id in available_value_ids for val in line.value_ids)"/> |
341 | | - <div t-att-class="'attribute_container'"> |
| 341 | + <t t-set="available_val" t-value="any(val in available_value_ids for val in (line.value_ids.ids + (line.custom and [custom_val_id.id] or [])))"/> |
| 342 | + <div t-att-class="'attribute_container' + ((not available_val and line.hide) and ' d-none' or '')"> |
342 | 343 | <label class="control-label" t-esc="line.attribute_id.name" t-att-data-oe-id="line.attribute_id.id"></label> |
343 | 344 | <fieldset t-att-id="'%s%s' % (field_prefix, line.attribute_id.id)" |
344 | 345 | t-att-data-oe-id="line.attribute_id.id" |
345 | 346 | t-att-data-attr-required="line.required" |
346 | 347 | t-att-name="'%s%s' % (field_prefix, line.attribute_id.id)" |
347 | 348 | t-att-class="'form-control config_attribute' + (' required_config_attrib' if (not available_val and line.required and line.custom) or (available_val and line.required) else '') + (' d-none' if not line.value_ids else '')" |
348 | 349 | style="height: unset;" |
349 | | - t-att-data-old-val-id="(value_ids & line.value_ids) and (value_ids & line.value_ids).ids[0] or ''"> |
| 350 | + t-att-data-old-val-id="(value_ids & line.value_ids) and (value_ids & line.value_ids).ids[0] or ''" |
| 351 | + t-att-data-attr-hide="line.hide"> |
350 | 352 | <t t-foreach="line.value_ids" t-as="value"> |
351 | 353 | <div class="radio-card-container"> |
352 | 354 | <div class="info_config_attr_value_radio"> |
|
0 commit comments