This commit is contained in:
michel 2017-11-24 11:32:03 +01:00
parent 96d3cb418e
commit 3421890717
2 changed files with 5 additions and 25 deletions

View File

@ -8,21 +8,17 @@ from odoo.exceptions import ValidationError
class ResPartner(models.Model):
""" Coworker model """
_inherit = 'res.partner'
name = fields.Char(required=True)
company_ids = fields.One2many(
string="Company",
comodel_name="res.partner",
inverse_name="parent_id",
)
#Adress fields
street = fields.Char()
zip = fields.Char()
city = fields.Char()
phone = fields.Char()
mobile = fields.Char('GSM')
email = fields.Char()

View File

@ -4,34 +4,18 @@
<!-- Form -->
<record id="view_form_res_partner" model="ir.ui.view">
<field name="name">Res_partner Form</field>
<field name="model">coworking.res_partner</field>
<field name="inherit_id" ref ="coworking_res_partner.view_form_coworker" />
<field name="model">res.partner</field>
<field name="inherit_id" ref ="coworking_coworker.view_form_coworker" />
<field name="arch" type="xml">
<form string="Res_partner">
<sheet>
<group name="group_top">
<group name="group_left">
<field name="contact_image" widget="image" class="oe_avatar"/>
<field name="contact_date" />
<field name="full_name" />
<field name="name" />
<field name="firstname" />
<field name="coworker_type" />
<field name="company_name" />
<field name="job" />
</group>
<group name="group_right">
<field name="street" />
<field name="contact_zip" />
<field name="city" />
<field name="full_contact_adress" />
<field name="gsm" />
<field name="phone_number" />
<field name="email" />
<field name="url" />
<field name="is_done" />
<field name="is_active" readonly="1" />
</group>
</group>
<groupe>
<notebook>