Add field contact_image with widget image and class oe_avatar
This commit is contained in:
parent
1c2175b51b
commit
60530a4c3c
@ -22,16 +22,23 @@ class Coworker(models.Model):
|
|||||||
company_name = fields.Char('Company')
|
company_name = fields.Char('Company')
|
||||||
job = fields.Char()
|
job = fields.Char()
|
||||||
contact_date = fields.Date(default=fields.Date.context_today)
|
contact_date = fields.Date(default=fields.Date.context_today)
|
||||||
|
|
||||||
|
#Adress fields
|
||||||
street = fields.Char()
|
street = fields.Char()
|
||||||
contact_zip = fields.Char()
|
contact_zip = fields.Char()
|
||||||
city = fields.Char()
|
city = fields.Char()
|
||||||
full_contact_adress = fields.Char(compute='_compute_full_contact_adress')
|
full_contact_adress = fields.Char(compute='_compute_full_contact_adress')
|
||||||
|
|
||||||
phone_number = fields.Char()
|
phone_number = fields.Char()
|
||||||
gsm = fields.Char('GSM')
|
gsm = fields.Char('GSM')
|
||||||
email = fields.Char()
|
email = fields.Char()
|
||||||
url = fields.Char('URL')
|
url = fields.Char('URL')
|
||||||
note = fields.Text()
|
note = fields.Text()
|
||||||
|
|
||||||
|
#Images fields
|
||||||
|
contact_image = fields.Binary()
|
||||||
|
|
||||||
|
|
||||||
is_done = fields.Boolean('Done?')
|
is_done = fields.Boolean('Done?')
|
||||||
is_active = fields.Boolean('Active?', default=True)
|
is_active = fields.Boolean('Active?', default=True)
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
<sheet>
|
<sheet>
|
||||||
<group name="group_top">
|
<group name="group_top">
|
||||||
<group name="group_left">
|
<group name="group_left">
|
||||||
|
<field name="contact_image" widget="image" class="oe_avatar"/>
|
||||||
<field name="contact_date" />
|
<field name="contact_date" />
|
||||||
<field name="full_name" />
|
<field name="full_name" />
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
|
Loading…
Reference in New Issue
Block a user