Browse Source

[ADD] Partner_phone_number_extension module

Add a phone number extension field
pull/411/head
El Hadji Dem 10 years ago
committed by Darshan Patel
parent
commit
129b05fd16
  1. 23
      partner_phone_extension/__init__.py
  2. 45
      partner_phone_extension/__openerp__.py
  3. 33
      partner_phone_extension/i18n/fr.po
  4. 32
      partner_phone_extension/i18n/partner_phone_extension.pot
  5. 30
      partner_phone_extension/res_partner.py
  6. 38
      partner_phone_extension/res_partner_view.xml

23
partner_phone_extension/__init__.py

@ -0,0 +1,23 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013-2014 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

45
partner_phone_extension/__openerp__.py

@ -0,0 +1,45 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013-2014 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 Phone Number Extension',
'version': '1.1',
'category': 'Customer Relationship Management',
'summary': 'Partner Phone Number Extension',
'description': """
Partner Phone Number Extension
==============================
This module allows to add a phone number extension field in partner form view.
Contributors
------------
* El Hadji Dem (elhadji.dem@savoirfairelinux.com)
""",
'author': 'Savoir-faire Linux',
'website': 'www.savoirfairelinux.com',
'license': 'AGPL-3',
'data': [
'res_partner_view.xml',
],
'installable': True,
}

33
partner_phone_extension/i18n/fr.po

@ -0,0 +1,33 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * partner_phone_extension
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-11-03 18:56+0000\n"
"PO-Revision-Date: 2014-11-03 14:00-0500\n"
"Last-Translator: Sandy Carter <sandy.carter@savoirfairelinux.com>\n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: Poedit 1.6.10\n"
#. module: partner_phone_extension
#: model:ir.model,name:partner_phone_extension.model_res_partner
msgid "Partner"
msgstr "Partenaire"
#. module: partner_phone_extension
#: field:res.partner,extension:0
msgid "Extension"
msgstr "Poste"
#. module: partner_phone_extension
#: help:res.partner,extension:0
msgid "Phone Number Extension."
msgstr "Numéro de poste téléphonique."

32
partner_phone_extension/i18n/partner_phone_extension.pot

@ -0,0 +1,32 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * partner_phone_extension
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-11-03 18:56+0000\n"
"PO-Revision-Date: 2014-11-03 18:56+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: partner_phone_extension
#: model:ir.model,name:partner_phone_extension.model_res_partner
msgid "Partner"
msgstr ""
#. module: partner_phone_extension
#: field:res.partner,extension:0
msgid "Extension"
msgstr ""
#. module: partner_phone_extension
#: help:res.partner,extension:0
msgid "Phone Number Extension."
msgstr ""

30
partner_phone_extension/res_partner.py

@ -0,0 +1,30 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013-2014 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 openerp.osv import orm, fields
class res_partner(orm.Model):
_inherit = 'res.partner'
_columns = {
'extension': fields.char('Extension', help="Phone Number Extension."),
}

38
partner_phone_extension/res_partner_view.xml

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Add phone number extension fields for partner -->
<record id="view_partner_simple_number_extension_form" model="ir.ui.view">
<field name="name">view.partner.simple.number.extension.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_simple_form"/>
<field name="arch" type="xml">
<field name="phone" position="after">
<field name="extension"/>
</field>
</field>
</record>
<record id="view_partner_number_extension_form" model="ir.ui.view">
<field name="name">view.partner.number.extension.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="phone" position="after">
<field name="extension"/>
</field>
<xpath expr="//form[@string='Contact']//field[@name='phone']"
position="after">
<field name="extension"/>
</xpath>
</field>
</record>
</data>
</openerp>
Loading…
Cancel
Save