Add field contact_image with widget image and class oe_avatar

This commit is contained in:
michel 2017-11-07 17:55:42 +01:00
parent 1c2175b51b
commit 60530a4c3c
2 changed files with 8 additions and 0 deletions

View File

@ -22,16 +22,23 @@ class Coworker(models.Model):
company_name = fields.Char('Company')
job = fields.Char()
contact_date = fields.Date(default=fields.Date.context_today)
#Adress fields
street = fields.Char()
contact_zip = fields.Char()
city = fields.Char()
full_contact_adress = fields.Char(compute='_compute_full_contact_adress')
phone_number = fields.Char()
gsm = fields.Char('GSM')
email = fields.Char()
url = fields.Char('URL')
note = fields.Text()
#Images fields
contact_image = fields.Binary()
is_done = fields.Boolean('Done?')
is_active = fields.Boolean('Active?', default=True)

View File

@ -10,6 +10,7 @@
<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" />