上QQ阅读APP看书,第一时间看更新
Using groups to organize forms
The <group> tag allows you to organize form content. Placing <group> elements inside a <group> element creates a two-column layout inside the outer group. It is advisable for group elements to have a name attribute so that it's easier for other modules to extend them.
We will use this to better organize our content. Let's change the <sheet> content of our form to match this:
<sheet> <group name="group_top"> <group name="group_left"> <field name="name" />
<field name="author_ids" widget="many2many_tags" />
<field name="publisher_id" /> <field name="date_published" />
</group> <group name="group_right"> <field name="isbn" />
<field name="active" /> <field name="image" widget="image" />
</group> </group> </sheet>