diff --git a/partner_academic_title/README.rst b/partner_academic_title/README.rst index 0c200aabc..5cdf52680 100644 --- a/partner_academic_title/README.rst +++ b/partner_academic_title/README.rst @@ -10,21 +10,6 @@ This module was written to adds possibility to define some academic titles and to add multiple titles on partners. there is a sequence on titles to display them in an order on the partner. -Usage -===== - -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/134/8.0 - -Bug Tracker -=========== - -Bugs are tracked on `GitHub Issues `_. -In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed feedback -`here `_. - Credits ======= @@ -33,6 +18,7 @@ Contributors * Stéphane Bidoul * Adrien Peiffer +* Meyomesse Gilles Maintainer ---------- diff --git a/partner_academic_title/__init__.py b/partner_academic_title/__init__.py index a0fdc10fe..0650744f6 100644 --- a/partner_academic_title/__init__.py +++ b/partner_academic_title/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- from . import models diff --git a/partner_academic_title/__manifest__.py b/partner_academic_title/__manifest__.py new file mode 100644 index 000000000..fc742a08f --- /dev/null +++ b/partner_academic_title/__manifest__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Copyright 2015-2017 ACSONE SA/NV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +{ + 'name': "Partner Academic Title", + 'summary': """ + Add possibility to define some academic title""", + 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', + 'website': "http://acsone.eu", + 'category': 'Other', + 'version': '10.0.1.0.0', + 'license': 'AGPL-3', + 'depends': [ + 'hr', + 'partner_contact_configuration', + ], + 'data': [ + 'security/ir.model.access.csv', + 'data/partner_academic_title_data.xml', + 'views/partner_academic_title_view.xml', + 'views/res_partner_view.xml', + ], +} diff --git a/partner_academic_title/__openerp__.py b/partner_academic_title/__openerp__.py deleted file mode 100644 index cfd8ba240..000000000 --- a/partner_academic_title/__openerp__.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# This file is part of partner_academic_title, -# an Odoo module. -# -# Copyright (c) 2015 ACSONE SA/NV () -# -# 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 . -# -############################################################################## -{ - 'name': "Partner Academic Title", - 'summary': """ - Add possibility to define some academic title""", - 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', - 'website': "http://acsone.eu", - 'category': 'Other', - 'version': '8.0.1.0.0', - 'license': 'AGPL-3', - 'depends': [ - 'hr', - ], - 'data': [ - 'security/ir.model.access.csv', - 'data/partner_academic_title_data.xml', - 'views/partner_academic_title_view.xml', - 'views/res_partner_view.xml', - ], -} diff --git a/partner_academic_title/data/partner_academic_title_data.xml b/partner_academic_title/data/partner_academic_title_data.xml index a28ba760a..c84583192 100644 --- a/partner_academic_title/data/partner_academic_title_data.xml +++ b/partner_academic_title/data/partner_academic_title_data.xml @@ -1,5 +1,7 @@ - + + B.S. @@ -46,4 +48,4 @@ 11 - \ No newline at end of file + diff --git a/partner_academic_title/models/__init__.py b/partner_academic_title/models/__init__.py index 955b20d34..7e0af305c 100644 --- a/partner_academic_title/models/__init__.py +++ b/partner_academic_title/models/__init__.py @@ -1,3 +1,2 @@ -# -*- coding: utf-8 -*- from . import partner_academic_title from . import res_partner diff --git a/partner_academic_title/models/partner_academic_title.py b/partner_academic_title/models/partner_academic_title.py index 3e9723ffa..3e4ba6a2a 100644 --- a/partner_academic_title/models/partner_academic_title.py +++ b/partner_academic_title/models/partner_academic_title.py @@ -1,35 +1,17 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# This file is part of partner_academic_title, -# an Odoo module. -# -# Copyright (c) 2015 ACSONE SA/NV () -# -# 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 . -# -############################################################################## +# Copyright 2015-2017 ACSONE SA/NV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, fields +from odoo import models, fields class PartnerAcademicTitle(models.Model): _name = 'partner.academic.title' - name = fields.Char(required=True, translate=True) + name = fields.Char(required=True, + translate=True + ) sequence = fields.Integer(required=True, - help="""defines the order to display titles""") + help="""defines the order to display titles""" + ) active = fields.Boolean(default=True) diff --git a/partner_academic_title/models/res_partner.py b/partner_academic_title/models/res_partner.py index 49beaa430..4e5646dc5 100644 --- a/partner_academic_title/models/res_partner.py +++ b/partner_academic_title/models/res_partner.py @@ -1,29 +1,8 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# This file is part of partner_academic_title, -# an Odoo module. -# -# Copyright (c) 2015 ACSONE SA/NV () -# -# 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 . -# -############################################################################## +# Copyright 2015-2017 ACSONE SA/NV () +# 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): @@ -47,8 +26,14 @@ class ResPartner(models.Model): self.academic_title_display = display_title academic_title_ids = fields.Many2many( + string='Academic Titles', 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 + ) diff --git a/partner_academic_title/security/ir.model.access.csv b/partner_academic_title/security/ir.model.access.csv index 6e08fa767..0bb784a10 100644 --- a/partner_academic_title/security/ir.model.access.csv +++ b/partner_academic_title/security/ir.model.access.csv @@ -1,3 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_partner_academic_title_system,access_academic_title_system,model_partner_academic_title,base.group_system,1,1,1,1 -access_partner_academic_title_user,access_academic_title_user,model_partner_academic_title,base.group_user,1,0,0,0 \ No newline at end of file +access_partner_academic_title_user,access_academic_title_user,model_partner_academic_title,base.group_user,1,0,0,0 diff --git a/partner_academic_title/views/partner_academic_title_view.xml b/partner_academic_title/views/partner_academic_title_view.xml index 3a001a9b5..355f5350e 100644 --- a/partner_academic_title/views/partner_academic_title_view.xml +++ b/partner_academic_title/views/partner_academic_title_view.xml @@ -1,5 +1,7 @@ - + + partner.academic.title.form @@ -33,6 +35,9 @@ form tree,form - + + - \ No newline at end of file + diff --git a/partner_academic_title/views/res_partner_view.xml b/partner_academic_title/views/res_partner_view.xml index 91f6ee1a0..b90c42fd0 100644 --- a/partner_academic_title/views/res_partner_view.xml +++ b/partner_academic_title/views/res_partner_view.xml @@ -1,5 +1,7 @@ - + + res.partner.form (partner_academic_title) @@ -13,4 +15,4 @@ - \ No newline at end of file + diff --git a/setup/partner_academic_title/odoo/__init__.py b/setup/partner_academic_title/odoo/__init__.py new file mode 100644 index 000000000..de40ea7ca --- /dev/null +++ b/setup/partner_academic_title/odoo/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/setup/partner_academic_title/odoo/addons/__init__.py b/setup/partner_academic_title/odoo/addons/__init__.py new file mode 100644 index 000000000..de40ea7ca --- /dev/null +++ b/setup/partner_academic_title/odoo/addons/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/setup/partner_academic_title/odoo/addons/partner_academic_title b/setup/partner_academic_title/odoo/addons/partner_academic_title new file mode 120000 index 000000000..23a318adc --- /dev/null +++ b/setup/partner_academic_title/odoo/addons/partner_academic_title @@ -0,0 +1 @@ +../../../../partner_academic_title \ No newline at end of file diff --git a/setup/partner_academic_title/setup.py b/setup/partner_academic_title/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/partner_academic_title/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)