darshan-serpent
8 years ago
7 changed files with 61 additions and 123 deletions
-
27partner_phone_extension/__init__.py
-
39partner_phone_extension/__openerp__.py
-
6partner_phone_extension/models/__init__.py
-
12partner_phone_extension/models/res_partner.py
-
30partner_phone_extension/res_partner.py
-
38partner_phone_extension/res_partner_view.xml
-
32partner_phone_extension/views/res_partner_view.xml
@ -1,23 +1,6 @@ |
|||
# -*- 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>). |
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import res_partner |
|||
from . import models |
@ -1,45 +1,18 @@ |
|||
# -*- 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>). |
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|||
|
|||
{ |
|||
'name': 'Partner Phone Number Extension', |
|||
'version': '1.1', |
|||
'version': '8.0.1.0.0', |
|||
'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,Odoo Community Association (OCA)", |
|||
'website': 'www.savoirfairelinux.com', |
|||
'license': 'AGPL-3', |
|||
'data': [ |
|||
'res_partner_view.xml', |
|||
'views/res_partner_view.xml', |
|||
], |
|||
'installable': True, |
|||
} |
@ -0,0 +1,6 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2013-2014 Savoir-faire Linux |
|||
# (<http://www.savoirfairelinux.com>). |
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import res_partner |
@ -0,0 +1,12 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2013-2014 Savoir-faire Linux |
|||
# (<http://www.savoirfairelinux.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,32 @@ |
|||
<?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> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue