Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions airport/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################

from . import models
51 changes: 51 additions & 0 deletions airport/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################

{
'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': [],
}
39 changes: 39 additions & 0 deletions airport/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -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 <sandy.carter@savoirfairelinux.com>\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"
22 changes: 22 additions & 0 deletions airport/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################

from . import res_partner
33 changes: 33 additions & 0 deletions airport/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
###############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
#
# 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 <http://www.gnu.org/licenses/>.
#
###############################################################################

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)
16 changes: 16 additions & 0 deletions airport/views/res_partner_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version = "1.0" encoding="utf-8"?>
<odoo>
<record id="view_partner_airport_form" model="ir.ui.view">
<field name="name">res.partner.airport.form.inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="transportation.view_travel_form"/>
<field name="arch" type="xml">
<page string="Travel" position="inside">
<group string="Airport">
<field name="airport" />
<field name="iata_code" attrs="{'invisible': [('airport','=',False)]}"/>
</group>
</page>
</field>
</record>
</odoo>