Browse Source

[MIG] Migrated partner_phone_extension to v11

Runbot fixes
pull/691/head
Jay Vora(SerpentCS) 7 years ago
committed by hveficent
parent
commit
2f563845ad
  1. 8
      partner_phone_extension/README.rst
  2. 1
      partner_phone_extension/__init__.py
  3. 6
      partner_phone_extension/__manifest__.py
  4. 1
      partner_phone_extension/models/__init__.py
  5. 5
      partner_phone_extension/models/res_partner.py
  6. 24
      partner_phone_extension/views/res_partner_view.xml

8
partner_phone_extension/README.rst

@ -2,9 +2,9 @@
:target: https://www.gnu.org/licenses/agpl.html
:alt: License: AGPL-3
===============================
==============================
Partner Phone Number Extension
===============================
==============================
This module adds a phone number extension field in partner form view.
@ -13,13 +13,13 @@ 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/10.0
:target: https://runbot.odoo-community.org/runbot/134/11.0
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/operating-unit/issues>`_. In case of trouble, please
<https://github.com/OCA/partner-contact/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.

1
partner_phone_extension/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import models

6
partner_phone_extension/__manifest__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2013-2014 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
@ -9,12 +8,12 @@
{
'name': 'Partner Phone Number Extension',
'version': '10.0.1.0.0',
'version': '11.0.1.0.0',
'category': 'Customer Relationship Management',
'summary': 'Partner Phone Number Extension',
'author': "Savoir-faire Linux, "
"Eficent, "
"SerpentCS, "
"Serpent Consulting Services Pvt. Ltd., "
"Odoo Community Association (OCA)",
'website': 'http://www.savoirfairelinux.com',
'license': 'AGPL-3',
@ -23,4 +22,5 @@
'views/res_partner_view.xml',
],
'installable': True,
'auto_install': False,
}

1
partner_phone_extension/models/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import res_partner

5
partner_phone_extension/models/res_partner.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2013-2014 Savoir-faire Linux
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
@ -7,8 +6,8 @@
from odoo import fields, models
class ResPartner(models.Model):
class Partner(models.Model):
_inherit = 'res.partner'
phone_extension = fields.Char('Phone Extension', oldname="extension",
phone_extension = fields.Char('Phone Extension',
help="Phone Number Extension.")

24
partner_phone_extension/views/res_partner_view.xml

@ -8,7 +8,18 @@
<field name="inherit_id" ref="base.view_partner_simple_form"/>
<field name="arch" type="xml">
<field name="phone" position="after">
<field name="phone_extension"/>
<field name="phone_extension" string="Extn."/>
</field>
</field>
</record>
<record id="view_partner_short_form_extension_form" model="ir.ui.view">
<field name="name">view.partner.short form.extension.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_short_form"/>
<field name="arch" type="xml">
<field name="phone" position="after">
<field name="phone_extension" string="Extn."/>
</field>
</field>
</record>
@ -19,12 +30,17 @@
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="phone" position="after">
<field name="phone_extension"/>
<field name="phone_extension" string="Extn."/>
</field>
<xpath expr="/form/sheet/notebook/page/field/form/sheet/group/group/field[@name='phone']" position="after">
<xpath expr="/form/sheet/notebook/page/field/kanban/field[@name='phone']" position="after">
<field name="phone_extension"/>
</xpath>
<xpath expr="//div[hasclass('oe_kanban_details')]/div[@t-if='record.phone.raw_value']" position="after">
<div t-if="record.phone_extension.raw_value">Ext: <field name="phone_extension"/></div>
</xpath>
<xpath expr="/form/sheet/notebook/page/field/form/sheet/group/group/field[@name='phone']" position="after">
<field name="phone_extension" string="Extn."/>
</xpath>
</field>
</record>
</odoo>
Loading…
Cancel
Save