2014-03-08 8:19 GMT+01:00 Emma <[email protected]>:
>>>
>>> I think this is the kind of things Cédric was trying to note which are
>>> going to give bug reports. You cannot safely link labels to fields
>>> automatically because Tryton allows much more complex configurations
>>> than "label - field" structure. You'll maybe end up with something
>>> that renders correctly in many cases but not in all cases, and Cédric
>>> is trying to find a solution that works always correctly. I think this
>>> is the main point here.
>>
>>
>> I don't really see what's complicated or can bring bugs in there. Two
>> fields cannot have the same name, so if two elements have the same name
>> attribute, it's a label and a widget. All widgets don't have labels in
>> front of them, there are strings, notebooks and more, but 2 form items, one
>> next to each other, with the same name attribute are bound to be widget and
>> label, that's how I determine what can be gathered in a same HTML element.
>> If I'm wrong, please explain to me because I don't see any other possible
>> case.
>>>
>>>
>
> Well... actually there one case it can be different: two consecutive
> representation on the same field with 2 different widgets (like a treeview
> and calendar widget of an agenda) Those will usually be in different
> "sub-items" but i'll add a check to make sure this is not the case.
The things I had in mind were something like the tax form view in the
account module (see view/tax_form.xml):
<group col="1" id="label_amount_rate">
<label name="amount" yfill="1" xexpand="1" yexpand="1"/>
<label name="rate" yfill="1" xexpand="1" yexpand="1"/>
</group>
<group col="1" id="amount_rate">
<field name="amount"/>
<group col="2" id="rate">
<field name="rate" factor="100" xexpand="0"/>
<label name="rate" string="%" xalign="0.0" xexpand="1"/>
</group>
</group>
--
Albert Cervera i Areny
Tel. 93 553 18 03
@albertnan
www.NaN-tic.com