Browse Source

Merge pull request #634 from humanilog/10.0_partner_socialmedia

[10.0][ADD] partner_socialmedia
pull/642/head
Pedro M. Baeza 6 years ago
committed by GitHub
parent
commit
de446e5bab
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 76
      partner_socialmedia/README.rst
  2. 3
      partner_socialmedia/__init__.py
  3. 19
      partner_socialmedia/__manifest__.py
  4. 3
      partner_socialmedia/models/__init__.py
  5. 16
      partner_socialmedia/models/res_partner.py
  6. 22
      partner_socialmedia/views/res_partner_view.xml

76
partner_socialmedia/README.rst

@ -0,0 +1,76 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
====================
Partner Social Media
====================
This module extends the contact management functionality. It allows recording
of a partner's social media profiles.
Installation
============
There are no special instructions regarding installation.
Configuration
=============
No configuration is needed.
Usage
=====
New item for 'Social Media' can be edited on the 'Personal Information' tab of
the partner contact form.
For further information, please visit:
* https://www.odoo.com/forum/help-1
* https://github.com/OCA/partner-contact/
.. 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
Known issues / Roadmap
======================
* No known issues.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <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 `here <https://github.com/OCA/
partner-contact/issues/new?body=module:%20
partner_contact_socialmedia%0Aversion:%20
10.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Contributors
------------
* Stefan Becker <s.becker@humanilog.org>
* David Pérez <david@closemarketing.es>
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 http://odoo-community.org.

3
partner_socialmedia/__init__.py

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

19
partner_socialmedia/__manifest__.py

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Humanitarian Logistics Organisation e.V. - Stefan Becker
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Partner Socialmedia',
'summary': 'Add social media fields to contacts',
'version': '10.0.1.0.0',
'author': "humanilog, Odoo Community Association (OCA)",
'website': "https://github.com/OCA/partner-contact",
'category': 'CRM',
'license': 'AGPL-3',
'installable': True,
'depends': [
'base',
],
'data': [
'views/res_partner_view.xml',
],
}

3
partner_socialmedia/models/__init__.py

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

16
partner_socialmedia/models/res_partner.py

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Humanitarian Logistics Organisation e.V. - Stefan Becker
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResPartner(models.Model):
"""Add social media fields"""
_inherit = "res.partner"
facebook = fields.Char()
twitter = fields.Char()
skype = fields.Char()
linkedin = fields.Char()
mastodon = fields.Char()

22
partner_socialmedia/views/res_partner_view.xml

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_partner_form_socialmedia" model="ir.ui.view">
<field name="name">res.partner.form</field>
<field name="model">res.partner</field>
<field eval="1" name="priority"/>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page name="socialmedia" string="Social Media">
<group>
<field name="facebook" widget="url"/>
<field name="twitter" widget="url"/>
<field name="skype" widget="url"/>
<field name="linkedin" widget="url"/>
<field name="mastodon" widget="url"/>
</group>
</page>
</xpath>
</field>
</record>
</odoo>
Loading…
Cancel
Save