Browse Source

[ADD] partner_fax

14.0
Francesco Apruzzese 7 years ago
committed by Pedro M. Baeza
parent
commit
bb619b1784
  1. 4
      partner_fax/__init__.py
  2. 20
      partner_fax/__manifest__.py
  3. 4
      partner_fax/models/__init__.py
  4. 11
      partner_fax/models/res_partner.py
  5. BIN
      partner_fax/static/description/icon.png
  6. 43
      partner_fax/views/res_partner.xml

4
partner_fax/__init__.py

@ -0,0 +1,4 @@
# © 2018 Apruzzese Francesco <f.apruzzese@apuliasoftware.it>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models

20
partner_fax/__manifest__.py

@ -0,0 +1,20 @@
# © 2018 Apruzzese Francesco <f.apruzzese@apuliasoftware.it>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Partner fax',
'category': 'Extra Tools',
'summary': 'Add fax number on partner',
'version': '11.0.1.0.0',
'license': 'AGPL-3',
'author': 'Francesco Apruzzese, '
'Odoo Community Association (OCA)',
'website': 'https://odoo-community.org/',
'depends': [
'base_setup'
],
'data': [
'views/res_partner.xml',
],
'installable': True,
}

4
partner_fax/models/__init__.py

@ -0,0 +1,4 @@
# © 2018 Apruzzese Francesco <f.apruzzese@apuliasoftware.it>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import res_partner

11
partner_fax/models/res_partner.py

@ -0,0 +1,11 @@
# © 2018 Apruzzese Francesco <f.apruzzese@apuliasoftware.it>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
fax = fields.Char()

BIN
partner_fax/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

43
partner_fax/views/res_partner.xml

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_partner_simple_form_fax" model="ir.ui.view">
<field name="name">Add fax on partner</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_simple_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='function']" position="after">
<field name="fax"/>
</xpath>
</data>
</field>
</record>
<record id="view_partner_short_form_fax" model="ir.ui.view">
<field name="name">Add fax on partner</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_short_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='function']" position="after">
<field name="fax" widget="phone"/>
</xpath>
</data>
</field>
</record>
<record id="view_partner_form_fax" model="ir.ui.view">
<field name="name">Add fax on partner</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='function']" position="after">
<field name="fax" widget="phone"/>
</xpath>
</data>
</field>
</record>
</odoo>
Loading…
Cancel
Save