From de63f035d5724ed31cf4b7fd074b5c7435cecd25 Mon Sep 17 00:00:00 2001 From: RemiFr82 Date: Fri, 15 Mar 2024 12:44:58 +0100 Subject: [PATCH] [ADD] partner_contact_phones2 --- partner_contact_phones2/__init__.py | 5 +++ partner_contact_phones2/__manifest__.py | 39 +++++++++++++++++++ partner_contact_phones2/models/__init__.py | 1 + partner_contact_phones2/models/res_partner.py | 11 ++++++ partner_contact_phones2/views/res_partner.xml | 18 +++++++++ 5 files changed, 74 insertions(+) create mode 100644 partner_contact_phones2/__init__.py create mode 100644 partner_contact_phones2/__manifest__.py create mode 100644 partner_contact_phones2/models/__init__.py create mode 100644 partner_contact_phones2/models/res_partner.py create mode 100644 partner_contact_phones2/views/res_partner.xml diff --git a/partner_contact_phones2/__init__.py b/partner_contact_phones2/__init__.py new file mode 100644 index 0000000..1760fa4 --- /dev/null +++ b/partner_contact_phones2/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# from . import controllers +# from . import models +# from . import wizards +# from .hooks import pre_init_hook, post_init_hook, uninstall_hook diff --git a/partner_contact_phones2/__manifest__.py b/partner_contact_phones2/__manifest__.py new file mode 100644 index 0000000..0d13e75 --- /dev/null +++ b/partner_contact_phones2/__manifest__.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). +{ + "name": "Partner secondary phone numbers", + "version": "1.0.0", + "summary": "Partner secondary phone numbers", + "description": """ + Adds a secondary phone and mobile fields on res.partner model + """, + "author": "RemiFr82", + "contributors": "", + "maintainer": "RemiFr82", + "website": "https://remifr82.me", + "license": "LGPL-3", + "category": "", + # "price": 0, + # "currency": "EUR", + "application": False, + "installable": True, + "auto_install": False, + # "pre_init_hook": "", + # "post_init_hook": "", + # "uninstall_hook": "", + # "excludes": [], + # "external_dependencies": [], + "depends": [ + "base", + ], + "data": [ + # Views + "views/res_partner.xml", + ], + # "assets": [], + # "css": [], + # "images": [], + # "js": [], + # "test": [], + # "demo": [], +} diff --git a/partner_contact_phones2/models/__init__.py b/partner_contact_phones2/models/__init__.py new file mode 100644 index 0000000..46595e9 --- /dev/null +++ b/partner_contact_phones2/models/__init__.py @@ -0,0 +1 @@ +# from . import model \ No newline at end of file diff --git a/partner_contact_phones2/models/res_partner.py b/partner_contact_phones2/models/res_partner.py new file mode 100644 index 0000000..8f7e422 --- /dev/null +++ b/partner_contact_phones2/models/res_partner.py @@ -0,0 +1,11 @@ +import logging +from odoo import models, fields, api, tools + +_logger = logging.getLogger(__name__) + + +class ResPartner(models.Model): + _name = "res.partner" + + phone2 = fields.Char("Phone 2", unaccent=False) + mobile2 = fields.Char("Mobile 2", unaccent=False) diff --git a/partner_contact_phones2/views/res_partner.xml b/partner_contact_phones2/views/res_partner.xml new file mode 100644 index 0000000..97d2776 --- /dev/null +++ b/partner_contact_phones2/views/res_partner.xml @@ -0,0 +1,18 @@ + + + + + res.partner.view.form.inherit + res.partner + + + + + + + + + + + + \ No newline at end of file