How to align field at user module in openerp. fields are not properly aligning in my form. follows my code:
xml:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- ===================== This is tree layout =============================-->
<record id="lis_tree" model="ir.ui.view">
<field name="name">Lab</field>
<field name="model">lis.lab</field>
<field name="arch1" type="xml">
<tree string="name">
<field name = "name"/>
<field name = "customer_name" />
<field name = "excutive_name" />
<field name = "date_birth"/>
<field name = "date_delivery" />
<field name = "hospital_name"/>
<field name = "hospital_city"/>
<field name = "hospital_state"/>
<field name = "hospital_country"/>
<field name = "hospital_phone"/>
</tree>
</field>
</record>
<!-- ========================This is Form layout===============================-->
<record id="lis_form" model="ir.ui.view">
<field name="name">Lab</field>
<field name="model">lis.lab</field>
<field name="arch1" type="xml">
<form string="lab" version="7.0">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<group>
<field name = "customer_name" /> <!--on_change="on_change_customer(customer_name)"/>-->
<field name = "excutive_name" />
<field name = "date_birth"/>
<field name = "date_delivery" />
<field name = "hospital_name"/>
<field name = "hospital_city"/>
<field name = "hospital_state"/>
<field name = "hospital_country"/>
<field name = "hospital_phone"/>
</group>
</form>
</field>
</record>
<!-- ========================= Action Layout ============================= -->
<record id="action_lab" model="ir.actions.act_window">
<field name="name">Lab</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">lis.lab</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="lis_form"/>
</record>
<!-- ===========================Menu Settings=========================== -->
<menuitem name = "LIS" id = "menu_lis_lab" action = "action_lab"/>
</data>
</openerp>
python:
from osv import osv from osv import fields
class cus(osv.osv):
_name = "lis.lab"
_description = "This table is for keeping lab data of cord blood"
_columns = {
'name': fields.char('Lab Id',size=64,required=True),
'date_birth': fields.char('Customer', size=64),
'excutive_name': fields.char('Excutive Name', size=64),
'date_birth': fields.date('Date of Birth'),
'date_delivery': fields.date('Delivery Date'),
'hospital_name': fields.char('Hospital', size=64),
'hospital_city': fields.char('City', size=64),
'hospital_state': fields.char('State', size=64),
'hospital_phone': fields.char('Phone', size=64)
}
above codes are working fine. but these fields are randomly viewed like follow
city
customer name
lab id
executive
How can i have the same order as in xml?