Our model has the following fields:
code = fields.Numeric('Code', digits=(6, 0)) name = fields.Char('Name') amount = fields.Numeric('Amount', digits=(12, 2)) account = fields.Many2One(..., 'Account', ...)
The form view is defined by the following xml-file:
<?xml version="1.0"?> <form col="4"> <label name="code"/> <field name="code"/> <newline/> <label name="name"/> <field name="name" colspan="3"/> <label name="amount"/> <field name="amount"/> <label name="account"/> <field name="account"/> </form>
In Tryton client this form looks like this:
If you set
xexpand="0" for the
account field, then the form is as follows:
accountfield is right aligned? We expected that this field will remain in the same place as on the first screenshot, but will no longer expand.
If you set
xexpand="0" for all fields except the
name field, then the form is as follows:
accountfield has moved to the left, but still out of “its place”.
And only if there are two fields in the first row, the
account field is placed in “its place”:
We just repeated the
codefield twice, but the first row can contain any other two fields.
Is it possible to align the fields so they are “in their places” if the first row is not complete (i.e. it contains one field instead of two)?