diff --git a/airport/__init__.py b/airport/__init__.py new file mode 100644 index 0000000..abba1cd --- /dev/null +++ b/airport/__init__.py @@ -0,0 +1,22 @@ +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Savoir-faire Linux +# (). +# +# 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 models diff --git a/airport/__manifest__.py b/airport/__manifest__.py new file mode 100644 index 0000000..d173bc1 --- /dev/null +++ b/airport/__manifest__.py @@ -0,0 +1,51 @@ +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Savoir-faire Linux +# (). +# +# 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 . +# +############################################################################## + +{ + 'name': 'Partner Airport', + 'version': '11.0.1.0.0', + 'category': 'Customer Relationship Management', + 'description': """ +Partner Airport +=============== +This module allows to add : +* airport : boolean +* iata_code : char, size=3 + +Contributors +------------ +* Sandy Carter (sandy.carter@savoirfairelinux.com) +* El Hadji Dem (elhadji.dem@savoirfairelinux.com) + """, + 'author': "Savoir-faire Linux,Odoo Community Association (OCA)", + 'website': 'http://www.savoirfairelinux.com', + 'license': 'AGPL-3', + 'depends': ['transportation', ], + 'external_dependencies': {}, + 'data': [ + 'views/res_partner_view.xml', + ], + 'demo': [], + 'test': [], + 'installable': True, + 'auto_install': False, + 'images': [], +} diff --git a/airport/i18n/fr.po b/airport/i18n/fr.po new file mode 100644 index 0000000..ab6aa8f --- /dev/null +++ b/airport/i18n/fr.po @@ -0,0 +1,39 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * airport +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-12-02 19:00+0000\n" +"PO-Revision-Date: 2013-12-02 14:16-0500\n" +"Last-Translator: Sandy Carter \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 1.5.7\n" +"Language: fr\n" +"X-Poedit-SourceCharset: UTF-8\n" + +#. module: airport +#: field:res.partner,iata_code:0 +msgid "IATA Airline code" +msgstr "Code IATA" + +#. module: airport +#: view:res.partner:0 field:res.partner,airport:0 +msgid "Airport" +msgstr "Aéroport" + +#. module: airport +#: view:res.partner:0 +msgid "Travel" +msgstr "Déplacement" + +#. module: airport +#: model:ir.model,name:airport.model_res_partner +msgid "Partner" +msgstr "Partenaire" diff --git a/airport/models/__init__.py b/airport/models/__init__.py new file mode 100644 index 0000000..f60952f --- /dev/null +++ b/airport/models/__init__.py @@ -0,0 +1,22 @@ +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Savoir-faire Linux +# (). +# +# 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 res_partner diff --git a/airport/models/res_partner.py b/airport/models/res_partner.py new file mode 100644 index 0000000..b041390 --- /dev/null +++ b/airport/models/res_partner.py @@ -0,0 +1,33 @@ +############################################################################### +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2013 Savoir-faire Linux +# (). +# +# 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 odoo import fields, models + + +class ResPartner(models.Model): + + """Inherits partner and adds airport and iata_code fields + in the partner form + """ + _inherit = 'res.partner' + + airport = fields.Boolean(string='Airport', default=0) + iata_code = fields.Char(string='IATA Airline code', size=3) diff --git a/airport/views/res_partner_view.xml b/airport/views/res_partner_view.xml new file mode 100644 index 0000000..59e035e --- /dev/null +++ b/airport/views/res_partner_view.xml @@ -0,0 +1,16 @@ + + + + res.partner.airport.form.inherit + res.partner + + + + + + + + + + +