[FIX] Review the layout of the partners

bzr revid: stw@openerp.com-20120802134648-djca908iguoukemd
This commit is contained in:
Stephane Wirtel 2012-08-02 15:46:48 +02:00
parent 9c31ba65d9
commit e57c694095
2 changed files with 12 additions and 12 deletions

View File

@ -138,7 +138,7 @@ class res_partner(osv.osv):
'name': fields.char('Name', size=128, required=True, select=True),
'date': fields.date('Date', select=1),
'title': fields.many2one('res.partner.title','Title'),
'parent_id': fields.many2one('res.partner','Company'),
'parent_id': fields.many2one('res.partner', 'Owned by'),
'child_ids': fields.one2many('res.partner', 'parent_id', 'Contacts'),
'ref': fields.char('Reference', size=64, select=1),
'lang': fields.selection(_lang_get, 'Language', help="If the selected language is loaded in the system, all documents related to this partner will be printed in this language. If not, it will be english."),
@ -164,7 +164,7 @@ class res_partner(osv.osv):
'street2': fields.char('Street2', size=128),
'zip': fields.char('Zip', change_default=True, size=24),
'city': fields.char('City', size=128),
'state_id': fields.many2one("res.country.state", 'State', domain="[('country_id','=',country_id)]"),
'state_id': fields.many2one("res.country.state", 'State'),
'country_id': fields.many2one('res.country', 'Country'),
'country': fields.related('country_id', type='many2one', relation='res.country', string='Country'), # for backward compatibility
'email': fields.char('Email', size=240),

View File

@ -101,23 +101,23 @@
<sheet>
<field name="photo" widget='image' class="oe_avatar oe_left"/>
<div class="oe_title">
<div class="oe_edit_only">
<label for="name" string="Customer Name"/>
(<field name="is_company" on_change="onchange_type(is_company)" class="oe_inline"/> <label for="is_company" string="Is a Company?"/>)
</div>
<h1>
<field name="name" default_focus="1"/>
<field name="name" default_focus="1" placeholder="Name" />
</h1>
<field name="category_id" widget="many2many_tags" placeholder="Select Tags"/>
<field name="parent_id"
string="Work for Company"
domain="[('is_company', '=', True)]" context="{'default_is_company': True}"
attrs="{'invisible': [('is_company','=', True)]}"
on_change="onchange_address(use_parent_address, parent_id)"/>
<div class="oe_edit_only">
<field name="is_company" on_change="onchange_type(is_company)" class="oe_inline"/> <label for="is_company" string="Company?"/>
<field name="category_id" widget="many2many_tags" placeholder="Select Tags"/>
</div>
</div>
<div class="oe_right oe_button_box" name="buttons"> </div>
<group>
<group>
<field name="parent_id"
domain="[('is_company', '=', True)]" context="{'default_is_company': True}"
attrs="{'invisible': [('is_company','=', True)]}"
on_change="onchange_address(use_parent_address, parent_id)"/>,
<label for="type" attrs="{'invisible': [('parent_id','=', False)]}"/>
<div attrs="{'invisible': [('parent_id','=', False)]}">
<field class="oe_inline"