michel_coworking/coworking_coworker/models/res_partner.py
2017-11-24 10:05:18 +01:00

31 lines
635 B
Python

# -*- coding: utf-8 -*-
""" Coworker module """
from odoo import models, fields, api, _
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()
url = fields.Char('URL')
comment = fields.Text()