committed by
Jairo Llopis
9 changed files with 135 additions and 156 deletions
-
55partner_phone_extension/README.rst
-
31partner_phone_extension/__init__.py
-
49partner_phone_extension/__openerp__.py
-
32partner_phone_extension/i18n/partner_phone_extension.pot
-
10partner_phone_extension/models/__init__.py
-
16partner_phone_extension/models/res_partner.py
-
30partner_phone_extension/res_partner.py
-
38partner_phone_extension/res_partner_view.xml
-
30partner_phone_extension/views/res_partner_view.xml
@ -0,0 +1,55 @@ |
|||||
|
.. image:: https://img.shields.io/badge/license-AGPLv3-blue.svg |
||||
|
:target: https://www.gnu.org/licenses/agpl.html |
||||
|
:alt: License: AGPL-3 |
||||
|
|
||||
|
=============================== |
||||
|
Partner Phone Number Extension |
||||
|
=============================== |
||||
|
|
||||
|
This module allows to add a phone number extension field in partner form view. |
||||
|
|
||||
|
|
||||
|
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/9.0 |
||||
|
|
||||
|
Bug Tracker |
||||
|
=========== |
||||
|
|
||||
|
Bugs are tracked on `GitHub Issues |
||||
|
<https://github.com/OCA/operating-unit/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. |
||||
|
|
||||
|
Credits |
||||
|
======= |
||||
|
|
||||
|
Images |
||||
|
------ |
||||
|
|
||||
|
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. |
||||
|
|
||||
|
Contributors |
||||
|
------------ |
||||
|
|
||||
|
* El Hadji Dem (elhadji.dem@savoirfairelinux.com) |
||||
|
* Jordi Ballester Alomar <jordi.ballester@eficent.com> |
||||
|
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com> |
||||
|
|
||||
|
Maintainer |
||||
|
---------- |
||||
|
|
||||
|
.. image:: https://odoo-community.org/logo.png |
||||
|
:alt: Odoo Community Association |
||||
|
:target: https://odoo-community.org |
||||
|
|
||||
|
This module is maintained by the OCA. |
||||
|
|
||||
|
OCA, or the Odoo Community Association, is a nonprofit organization whose |
||||
|
mission is to support the collaborative development of Odoo features and |
||||
|
promote its widespread use. |
||||
|
|
||||
|
To contribute to this module, please visit https://odoo-community.org. |
@ -1,23 +1,10 @@ |
|||||
# -*- 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/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2013-2014 Savoir-faire Linux |
||||
|
# (<http://www.savoirfairelinux.com>). |
||||
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
||||
|
# (http://www.eficent.com) |
||||
|
# Copyright 2017 Serpent Consulting Services Pvt. Ltd. |
||||
|
# (<http://www.serpentcs.com>) |
||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
from . import res_partner |
|
||||
|
from . import models |
@ -1,45 +1,26 @@ |
|||||
# -*- 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/>. |
|
||||
# |
|
||||
############################################################################## |
|
||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2013-2014 Savoir-faire Linux |
||||
|
# (<http://www.savoirfairelinux.com>). |
||||
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
||||
|
# (http://www.eficent.com) |
||||
|
# Copyright 2017 Serpent Consulting Services Pvt. Ltd. |
||||
|
# (<http://www.serpentcs.com>) |
||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
{ |
{ |
||||
'name': 'Partner Phone Number Extension', |
'name': 'Partner Phone Number Extension', |
||||
'version': '1.1', |
|
||||
|
'version': '9.0.1.0.0', |
||||
'category': 'Customer Relationship Management', |
'category': 'Customer Relationship Management', |
||||
'summary': 'Partner Phone Number Extension', |
'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,Odoo Community Association (OCA)", |
|
||||
|
'author': "Savoir-faire Linux, " |
||||
|
"Eficent, " |
||||
|
"SerpentCS, " |
||||
|
"Odoo Community Association (OCA)", |
||||
'website': 'www.savoirfairelinux.com', |
'website': 'www.savoirfairelinux.com', |
||||
'license': 'AGPL-3', |
'license': 'AGPL-3', |
||||
|
"depends": ["base"], |
||||
'data': [ |
'data': [ |
||||
'res_partner_view.xml', |
|
||||
|
'views/res_partner_view.xml', |
||||
], |
], |
||||
'installable': True, |
'installable': True, |
||||
} |
} |
@ -1,32 +0,0 @@ |
|||||
# 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 "" |
|
||||
|
|
@ -0,0 +1,10 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2013-2014 Savoir-faire Linux |
||||
|
# (<http://www.savoirfairelinux.com>). |
||||
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
||||
|
# (http://www.eficent.com) |
||||
|
# Copyright 2017 Serpent Consulting Services Pvt. Ltd. |
||||
|
# (<http://www.serpentcs.com>) |
||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
|
from . import res_partner |
@ -0,0 +1,16 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Copyright 2013-2014 Savoir-faire Linux |
||||
|
# (<http://www.savoirfairelinux.com>). |
||||
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L. |
||||
|
# (http://www.eficent.com) |
||||
|
# Copyright 2017 Serpent Consulting Services Pvt. Ltd. |
||||
|
# (<http://www.serpentcs.com>) |
||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
|
from openerp import fields, models |
||||
|
|
||||
|
|
||||
|
class ResPartner(models.Model): |
||||
|
_inherit = 'res.partner' |
||||
|
|
||||
|
extension = fields.Char('Extension', help="Phone Number Extension.") |
@ -1,30 +0,0 @@ |
|||||
# -*- 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."), |
|
||||
} |
|
@ -1,38 +0,0 @@ |
|||||
<?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> |
|
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
|
||||
|
<!-- 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/sheet/notebook/page/field/form/sheet/group/group/field[@name='phone']" position="after"> |
||||
|
<field name="extension"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue