|
@ -1,29 +1,8 @@ |
|
|
# -*- coding: utf-8 -*- |
|
|
# -*- coding: utf-8 -*- |
|
|
############################################################################## |
|
|
|
|
|
# |
|
|
|
|
|
# This file is part of partner_academic_title, |
|
|
|
|
|
# an Odoo module. |
|
|
|
|
|
# |
|
|
|
|
|
# Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) |
|
|
|
|
|
# |
|
|
|
|
|
# partner_academic_title is free software: |
|
|
|
|
|
# you can redistribute it and/or modify it under the terms of the GNU |
|
|
|
|
|
# Affero General Public License as published by the Free Software |
|
|
|
|
|
# Foundation,either version 3 of the License, or (at your option) any |
|
|
|
|
|
# later version. |
|
|
|
|
|
# |
|
|
|
|
|
# partner_academic_title is distributed |
|
|
|
|
|
# in the hope that it will be useful, but WITHOUT ANY WARRANTY; without |
|
|
|
|
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
|
|
|
|
# PURPOSE. See the GNU Affero General Public License for more details. |
|
|
|
|
|
# |
|
|
|
|
|
# You should have received a copy of the GNU Affero General Public License |
|
|
|
|
|
# along with partner_academic_title. |
|
|
|
|
|
# If not, see <http://www.gnu.org/licenses/>. |
|
|
|
|
|
# |
|
|
|
|
|
############################################################################## |
|
|
|
|
|
|
|
|
# Copyright 2015-2017 ACSONE SA/NV (<http://acsone.eu>) |
|
|
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
|
|
|
|
|
from openerp import models, fields, api |
|
|
|
|
|
|
|
|
from odoo import models, fields, api |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ResPartner(models.Model): |
|
|
class ResPartner(models.Model): |
|
@ -47,8 +26,14 @@ class ResPartner(models.Model): |
|
|
self.academic_title_display = display_title |
|
|
self.academic_title_display = display_title |
|
|
|
|
|
|
|
|
academic_title_ids = fields.Many2many( |
|
|
academic_title_ids = fields.Many2many( |
|
|
|
|
|
string='Academic Titles', |
|
|
comodel_name='partner.academic.title', |
|
|
comodel_name='partner.academic.title', |
|
|
relation='partner_academic_title_ref', column1='partner_id', |
|
|
|
|
|
column2='academic_title_id', string='Academic Titles') |
|
|
|
|
|
academic_title_display = fields.Char(compute='_get_academic_title_display', |
|
|
|
|
|
string='Academic Titles', store=True) |
|
|
|
|
|
|
|
|
relation='partner_academic_title_ref', |
|
|
|
|
|
column1='partner_id', |
|
|
|
|
|
column2='academic_title_id' |
|
|
|
|
|
) |
|
|
|
|
|
academic_title_display = fields.Char( |
|
|
|
|
|
string='Academic Titles', |
|
|
|
|
|
compute='_get_academic_title_display', |
|
|
|
|
|
store=True |
|
|
|
|
|
) |