[IMP] res_partner view change

bzr revid: kjo@tinyerp.com-20120222130020-mt336dpul07b9cgt
This commit is contained in:
Kuldeep Joshi (OpenERP) 2012-02-22 18:30:20 +05:30
parent 72949e2900
commit ea0e222002
2 changed files with 28 additions and 26 deletions

View File

@ -160,6 +160,7 @@ class res_partner(osv.osv):
'company_id': fields.many2one('res.company', 'Company',select=1),
'is_company': fields.boolean('Company', help="Check the field to create company otherwise it is personal contacts"),
'color': fields.integer('Color Index'),
'is_company_address': fields.boolean('Company Address', help="Check the field to use the company address"),
}
def _default_category(self, cr, uid, context=None):
if context is None:

View File

@ -311,13 +311,11 @@
<field name="arch" type="xml">
<tree string="Contacts">
<field name="name"/>
<field name="ref" groups="base.group_extended"/>
<field name="function"/>
<field name="phone"/>
<field name="email"/>
<field name="city"/>
<!--field name="country"/-->
<field name="user_id"/>
<field name="parent_id" string="Company"/>
</tree>
</field>
</record>
@ -328,26 +326,29 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Partners" col='1'>
<group col="6" colspan="4">
<group colspan="5" col="6">
<group col="8" colspan="4">
<group colspan="5" col="4">
<field name="name" select="1"/>
<field name="ref" groups="base.group_extended"/>
<field name="function"/>
<field name="title" size="0" groups="base.group_extended"/>
<field name="lang"/>
<field name="parent_id" string="Parent Company" groups="base.group_extended" attrs="{'invisible': [('is_company','=', True)]}"/>
</group>
<group colspan="1" col="2">
<group col="2">
<field name="customer" select="1"/>
<field name="supplier"/>
</group>
<group col="2">
<field name="is_company" select="1"/>
<field name="is_company_address"/>
</group>
</group>
<notebook colspan="4">
<page string="General">
<group col="2">
<field name="function"/>
</group>
<newline/>
<group colspan="2" col="4">
<separator string="Postal Address" colspan="4" col="4" />
<field name="type" string="Type" colspan="2"/>
<group colspan="4" attrs="{'invisible': [('is_company_address', '=', True)]}">
<group colspan="2" col="4" >
<separator string="Address" colspan="4" col="4" />
<field name="type" string="Type" colspan="2" attrs="{'invisible': [('is_company', '=', True)]}"/>
<field name="street" colspan="4"/>
<field name="street2" colspan="4"/>
<field name="zip"/>
@ -355,28 +356,28 @@
<field name="country_id" completion="1"/>
<field name="state_id"/>
</group>
<group colspan="2" col="2">
<separator string="Communication" colspan="2" col="2" />
<field name="phone"/>
<field name="mobile"/>
<field name="fax"/>
<field name="email" widget="email"/>
<group colspan="2" col="4">
<separator string="Communication" colspan="4"/>
<field name="phone" colspan="4"/>
<field name="mobile" colspan="4"/>
<field name="fax" colspan="4"/>
<field name="email" widget="email" colspan="4"/>
<field name="website" widget="url" colspan="4"/>
<field name="ref" groups="base.group_extended" colspan="4"/>
<field name="lang" colspan="4"/>
</group>
<group colspan="8" attrs="{'invisible': [('is_company','=', False)]}">
</group>
<group colspan="4" attrs="{'invisible': [('is_company','=', False)]}">
<field name="child_ids" nolabel="1"/>
</group>
</page>
<page string="Sales &amp; Purchases">
<page string="Sales &amp; Purchases" attrs="{'invisible': [('customer', '=', False), ('supplier', '=', False)]}">
<separator string="General Information" colspan="4"/>
<field name="user_id"/>
<field name="active" groups="base.group_extended"/>
<field name="website" widget="url"/>
<field name="date"/>
<field name="parent_id" string="Parent Company" groups="base.group_extended" attrs="{'invisible': [('is_company','=', True)]}"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<newline/>
<field name="customer" select="1"/>
<field name="supplier"/>
</page>
<page string="History" groups="base.group_extended" invisible="True">
</page>