Commit d4c0c9d6 authored by Actarus's avatar Actarus
Browse files

Added address related fields to Contact, Partner and Site

parent 6c98b47e
......@@ -6,6 +6,7 @@
'application': True,
'depends': [
'base',
'l10n_fr_department',
],
'license': 'GPL-3',
'data': [
......
......@@ -12,3 +12,12 @@ class Contact(models.Model):
name = fields.Char(string="Nom", required=True)
partner_id = fields.Many2one("customer.partner", string="Société")
# Address
street = fields.Char(string="Rue")
street2 = fields.Char(string="Rue 2")
city = fields.Char(string="Ville")
zip = fields.Char(string="Code postal")
country_id = fields.Many2one("res.country", string="Pays")
state_id = fields.Many2one("res.country.state", string="Région")
department_id = fields.Many2one("res.country.department", string="Département")
......@@ -12,6 +12,15 @@ class Partner(models.Model):
name = fields.Char(string="Nom", required=True)
# Address
street = fields.Char(string="Rue")
street2 = fields.Char(string="Rue 2")
city = fields.Char(string="Ville")
zip = fields.Char(string="Code postal")
country_id = fields.Many2one("res.country", string="Pays")
state_id = fields.Many2one("res.country.state", string="Région")
department_id = fields.Many2one("res.country.department", string="Département")
# Contacts
contact_ids = fields.One2many("customer.contact", "partner_id", string="Contacts")
site_ids = fields.One2many("customer.site", "partner_id", string="Sites")
......@@ -13,6 +13,15 @@ class CustomerSite(models.Model):
name = fields.Char(string="Nom", required=True)
partner_id = fields.Many2one("customer.partner", string="Propriétaire")
# Address
street = fields.Char(string="Rue")
street2 = fields.Char(string="Rue 2")
city = fields.Char(string="Ville")
zip = fields.Char(string="Code postal")
country_id = fields.Many2one("res.country", string="Pays")
state_id = fields.Many2one("res.country.state", string="Région")
department_id = fields.Many2one("res.country.department", string="Département")
# Contacts
contact_id = fields.Many2one("customer.contact", string="Contact")
maintenance_contact_id = fields.Many2one("customer.contact", string="Contact de maintenance")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment