diff --git a/crm_phone/crm_phone.py b/crm_phone/crm_phone.py index eaaa888..5723280 100644 --- a/crm_phone/crm_phone.py +++ b/crm_phone/crm_phone.py @@ -1,24 +1,6 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# CRM phone module for Odoo/OpenERP -# Copyright (c) 2012-2014 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program 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. -# -# This program 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 this program. If not, see . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2012-2016 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import models, fields, api, _ diff --git a/event_phone/__init__.py b/event_phone/__init__.py index 3ab9f89..3df41b6 100644 --- a/event_phone/__init__.py +++ b/event_phone/__init__.py @@ -1,22 +1,3 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Event Phone module for Odoo/OpenERP -# Copyright (C) 2014 Alexis de Lattre -# -# This program 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. -# -# This program 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 this program. If not, see . -# -############################################################################## from . import event_phone diff --git a/event_phone/__openerp__.py b/event_phone/__openerp__.py index 3484b22..d118377 100644 --- a/event_phone/__openerp__.py +++ b/event_phone/__openerp__.py @@ -1,28 +1,11 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Event Phone module for Odoo/OpenERP -# Copyright (C) 2014 Alexis de Lattre -# -# This program 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. -# -# This program 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 this program. If not, see . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2014-2016 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Event Phone', - 'version': '8.0.0.1.0', + 'version': '9.0.1.0.0', 'category': 'Phone', 'license': 'AGPL-3', 'summary': 'Validate phone numbers in Events', @@ -46,8 +29,6 @@ for any help or question about this module. 'security/ir.model.access.csv', 'event_view.xml', ], - 'images': [], - 'installable': False, + 'installable': True, 'auto_install': True, - 'active': False, } diff --git a/event_phone/event_phone.py b/event_phone/event_phone.py index 7f7e3bb..624e4dd 100644 --- a/event_phone/event_phone.py +++ b/event_phone/event_phone.py @@ -1,29 +1,11 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Event phone module for Odoo/OpenERP -# Copyright (c) 2012-2014 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program 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. -# -# This program 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 this program. If not, see . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2012-2016 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp.osv import orm +from openerp import models, api -class event_registration(orm.Model): +class EventRegistration(models.Model): _name = 'event.registration' _inherit = ['event.registration', 'phone.common'] _phone_fields = ['phone'] @@ -31,14 +13,12 @@ class event_registration(orm.Model): _country_field = None _partner_field = 'partner_id' - def create(self, cr, uid, vals, context=None): - vals_reformated = self._generic_reformat_phonenumbers( - cr, uid, None, vals, context=context) - return super(event_registration, self).create( - cr, uid, vals_reformated, context=context) + @api.model + def create(self, vals): + vals_reformated = self._reformat_phonenumbers_create(vals) + return super(EventRegistration, self).create(vals_reformated) - def write(self, cr, uid, ids, vals, context=None): - vals_reformated = self._generic_reformat_phonenumbers( - cr, uid, ids, vals, context=context) - return super(event_registration, self).write( - cr, uid, ids, vals_reformated, context=context) + @api.multi + def write(self, vals): + vals_reformated = self._reformat_phonenumbers_write(vals) + return super(EventRegistration, self).write(vals_reformated) diff --git a/event_phone/event_view.xml b/event_phone/event_view.xml index 00fa86c..b9ec378 100644 --- a/event_phone/event_view.xml +++ b/event_phone/event_view.xml @@ -1,12 +1,13 @@ - + + event_phone.event_registration.form event.registration @@ -18,20 +19,6 @@ - - event_phone.event.form - event.event - - - - phone - - - phone - - - - - + diff --git a/hr_phone/hr_view.xml b/hr_phone/hr_view.xml index cfbf45d..50509cb 100644 --- a/hr_phone/hr_view.xml +++ b/hr_phone/hr_view.xml @@ -4,7 +4,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> - + @@ -46,4 +46,4 @@ - + diff --git a/hr_recruitment_phone/__init__.py b/hr_recruitment_phone/__init__.py index 8ac9f86..842cb21 100644 --- a/hr_recruitment_phone/__init__.py +++ b/hr_recruitment_phone/__init__.py @@ -1,22 +1,3 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# HR Recruitment Phone module for Odoo/OpenERP -# Copyright (C) 2014 Alexis de Lattre -# -# This program 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. -# -# This program 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 this program. If not, see . -# -############################################################################## from . import hr_recruitment_phone diff --git a/hr_recruitment_phone/__openerp__.py b/hr_recruitment_phone/__openerp__.py index 2a7e5a4..b941b6c 100644 --- a/hr_recruitment_phone/__openerp__.py +++ b/hr_recruitment_phone/__openerp__.py @@ -1,28 +1,10 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# HR Recruitment Phone module for OpenERP -# Copyright (C) 2014 Alexis de Lattre -# -# This program 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. -# -# This program 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 this program. If not, see . -# -############################################################################## - +# -*- coding: utf-8 -*- +# © 2014-2016 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'HR Recruitment Phone', - 'version': '8.0.0.1.0', + 'version': '9.0.1.0.0', 'category': 'Phone', 'license': 'AGPL-3', 'summary': 'Validate phone numbers in HR Recruitment', @@ -46,8 +28,6 @@ for any help or question about this module. 'security/ir.model.access.csv', 'hr_recruitment_view.xml', ], - 'images': [], - 'installable': False, + 'installable': True, 'auto_install': True, - 'active': False, } diff --git a/hr_recruitment_phone/hr_recruitment_phone.py b/hr_recruitment_phone/hr_recruitment_phone.py index cdbdfa9..131516e 100644 --- a/hr_recruitment_phone/hr_recruitment_phone.py +++ b/hr_recruitment_phone/hr_recruitment_phone.py @@ -1,29 +1,11 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# HR Recruitment phone module for Odoo/OpenERP -# Copyright (c) 2012-2014 Akretion (http://www.akretion.com) -# @author: Alexis de Lattre -# -# This program 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. -# -# This program 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 this program. If not, see . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2012-2016 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp.osv import orm +from openerp import models, api -class hr_applicant(orm.Model): +class HrApplicant(models.Model): _name = 'hr.applicant' _inherit = ['hr.applicant', 'phone.common'] _phone_fields = ['partner_phone', 'partner_mobile'] @@ -31,14 +13,12 @@ class hr_applicant(orm.Model): _country_field = None _partner_field = 'partner_id' - def create(self, cr, uid, vals, context=None): - vals_reformated = self._generic_reformat_phonenumbers( - cr, uid, None, vals, context=context) - return super(hr_applicant, self).create( - cr, uid, vals_reformated, context=context) + @api.model + def create(self, vals): + vals_reformated = self._reformat_phonenumbers_create(vals) + return super(HrApplicant, self).create(vals_reformated) - def write(self, cr, uid, ids, vals, context=None): - vals_reformated = self._generic_reformat_phonenumbers( - cr, uid, ids, vals, context=context) - return super(hr_applicant, self).write( - cr, uid, ids, vals_reformated, context=context) + @api.multi + def write(self, vals): + vals_reformated = self._reformat_phonenumbers_write(vals) + return super(HrApplicant, self).write(vals_reformated) diff --git a/hr_recruitment_phone/hr_recruitment_view.xml b/hr_recruitment_phone/hr_recruitment_view.xml index 16e3817..9d43906 100644 --- a/hr_recruitment_phone/hr_recruitment_view.xml +++ b/hr_recruitment_phone/hr_recruitment_view.xml @@ -1,12 +1,13 @@ - + + hr_recruitment_phone.hr_applicant.form hr.applicant @@ -32,5 +33,6 @@ + - +