Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #784 from Mirgalimova/11.0-res_partner_skype_port-…
…docs **Improvement:** <documentation>
- Loading branch information
Showing
14 changed files
with
249 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,49 @@ | ||
Skype field in partner form | ||
=========================== | ||
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.png | ||
:target: https://www.gnu.org/licenses/lgpl | ||
:alt: License: LGPL-3 | ||
|
||
Description: https://www.odoo.com/apps/modules/10.0/res_partner_skype/ | ||
========================== | ||
Skype field for partners | ||
========================== | ||
|
||
Adds skype field to partner form. When you click on skype address, chat window is opened. | ||
This module adds a Skype field along with a widget to integrate Skype chat window of the contact account while clicking on it. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
* `Ivan Yelizariev <yelizariev@it-projects.info>`__ | ||
|
||
Sponsors | ||
-------- | ||
* `IT-Projects LLC <https://it-projects.info>`__ | ||
|
||
Maintainers | ||
----------- | ||
* `IT-Projects LLC <https://it-projects.info>`__ | ||
|
||
To get a guaranteed support | ||
you are kindly requested to purchase the module | ||
at `odoo apps store <https://apps.odoo.com/apps/modules/11.0/autostaging_base/>`__. | ||
|
||
Thank you for understanding! | ||
|
||
`IT-Projects Team <https://www.it-projects.info/team>`__ | ||
|
||
Further information | ||
=================== | ||
|
||
Further information and discussion: http://yelizariev.github.io/odoo/module/2015/03/31/skype.html | ||
|
||
Demo: http://runbot.it-projects.info/demo/misc-addons/11.0 | ||
|
||
HTML Description: https://apps.odoo.com/apps/modules/11.0/res_partner_skype/ | ||
|
||
Usage instructions: `<doc/index.rst>`_ | ||
|
||
Changelog: `<doc/changelog.rst>`_ | ||
|
||
Notifications on updates: `via Atom <https://github.com/it-projects-llc/misc-addons/commits/11.0/res_partner_skype.atom>`_, `by Email <https://blogtrottr.com/?subscribe=https://github.com/it-projects-llc/misc-addons/commits/11.0/res_partner_skype.atom>`_ | ||
|
||
Tested on Odoo 11.0 85c764779548703aed920b6b270613659545c609 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,51 @@ | ||
# Copyright 2016 robyf70 <https://github.com/robyf70 > | ||
# Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/> | ||
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). | ||
{ | ||
"name": "Skype field in partner form", | ||
"version": "1.0.1", | ||
"name": """Skype field for partners""", | ||
"summary": """This module adds a Skype field along with a widget to integrate Skype chat window of the contact account while clicking on it.""", | ||
"category": "Discuss", | ||
# "live_test_url": "http://apps.it-projects.info/shop/product/DEMO-URL?version=12.0", | ||
"images": ['images/partner.png'], | ||
"version": "11.0.1.0.1", | ||
"application": False, | ||
|
||
"author": "IT-Projects LLC, Ivan Yelizariev", | ||
'license': 'LGPL-3', | ||
"category": "Tools", | ||
"support": "apps@it-projects.info", | ||
"website": "https://twitter.com/yelizariev", | ||
'price': 9.00, | ||
'currency': 'EUR', | ||
"depends": ['web'], | ||
"images": ['images/partner.png'], | ||
"license": "LGPL-3", | ||
"price": 9.00, | ||
"currency": "EUR", | ||
|
||
"depends": [ | ||
"web" | ||
], | ||
"external_dependencies": {"python": [], "bin": []}, | ||
"data": [ | ||
'views.xml', | ||
'data.xml', | ||
], | ||
"demo": [ | ||
], | ||
"qweb": [ | ||
'static/src/xml/base.xml', | ||
], | ||
'installable': False | ||
|
||
"post_load": None, | ||
"pre_init_hook": None, | ||
"post_init_hook": None, | ||
"uninstall_hook": None, | ||
|
||
"auto_install": False, | ||
"installable": True, | ||
|
||
# "demo_title": "{MODULE_NAME}", | ||
# "demo_addons": [ | ||
# ], | ||
# "demo_addons_hidden": [ | ||
# ], | ||
# "demo_url": "DEMO-URL", | ||
# "demo_summary": "{SHORT_DESCRIPTION_OF_THE_MODULE}", | ||
# "demo_images": [ | ||
# "images/MAIN_IMAGE", | ||
# ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!--Copyright 2014 Ivan Yelizariev <https://it-projects.info/team/yelizariev> | ||
Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k> | ||
Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/> | ||
License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html).--> | ||
<openerp> | ||
<data> | ||
<template id="assets_backend" name="skype assets" inherit_id="web.assets_backend"> | ||
<xpath expr="." position="inside"> | ||
<script type="text/javascript" src="/res_partner_skype/static/src/js/skype.js"></script> | ||
</xpath> | ||
<xpath expr="." position="inside"> | ||
<script type="text/javascript" src="/res_partner_skype/static/src/js/test_res_partner_skype.js"></script> | ||
</xpath> | ||
</template> | ||
</data> | ||
</openerp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<section class="oe_container"> | ||
<div class="oe_row oe_spaced"> | ||
<div class="oe_span12"> | ||
<h2 class="oe_slogan">Skype field for partners</h2> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<section class="oe_container"> | ||
<div class="oe_row oe_spaced"> | ||
<div class="oe_span12"> | ||
<p> | ||
This module adds a Skype field along with a widget to integrate Skype chat window of the contact account while clicking on it. | ||
</p> | ||
</div> | ||
<div class="oe_row_img oe_centered"> | ||
<img class="oe_demo oe_picture oe_screenshot" src="res_partner_skype.png"/> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
<section class="oe_container"> | ||
<div class="oe_row oe_spaced"> | ||
<div class="oe_span8"> | ||
<h2>Need our service?</h2> | ||
<p class="oe_mt32">Contact us by <a href="mailto:apps@it-projects.info">email</a> or fill out <a href="https://www.it-projects.info/page/website.contactus " target="_blank">request form</a></p> | ||
<ul> | ||
<li><a href="mailto:apps@it-projects.info">apps@it-projects.info <i class="fa fa-envelope-o"></i></a></li> | ||
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li> | ||
</ul> | ||
</div> | ||
<div class="oe_span4"> | ||
<div class="stamp" style="width:200px;"> | ||
<div style="margin-top: 15px; | ||
position: relative; | ||
font-family:'Vollkorn', serif; | ||
font-size: 16px; | ||
line-height: 25px; | ||
text-transform: uppercase; | ||
font-weight: bold; | ||
color: #75526b; | ||
border: 3px dashed #75526b; | ||
float: left; | ||
padding: 4px 12px; | ||
-webkit-transform: rotate(6deg); | ||
-o-transform: rotate(6deg); | ||
-moz-transform: rotate(6deg); | ||
-ms-transform: rotate(6deg);"> | ||
Tested on Odoo<br/>11.0 community | ||
</div> | ||
<div style="margin-top: 15px; | ||
position: relative; | ||
font-family:'Vollkorn', serif; | ||
font-size: 16px; | ||
line-height: 25px; | ||
text-transform: uppercase; | ||
font-weight: bold; | ||
color: #75526b; | ||
border: 3px dashed #75526b; | ||
float: left; | ||
padding: 4px 12px; | ||
-webkit-transform: rotate(-7deg); | ||
-o-transform: rotate(-7deg); | ||
-moz-transform: rotate(-7deg); | ||
-ms-transform: rotate(-7deg);"> | ||
Tested on Odoo<br/>11.0 enterprise | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</section> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
/* Copyright 2014 Ivan Yelizariev <https://it-projects.info/team/yelizariev> | ||
Copyright 2016 x620 <https://github.com/x620> | ||
Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k> | ||
Copyright 2017 ArtyomLosev <https://github.com/ArtyomLosev> | ||
Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/> | ||
License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). */ | ||
odoo.define('res_partner_skype.widget', function (require) { | ||
'use strict'; | ||
|
||
var core = require('web.core'); | ||
var FieldChar = core.form_widget_registry.get('char'); | ||
|
||
var FieldSkype = FieldChar.extend({ | ||
template: 'FieldSkype', | ||
var fieldRegistry = require('web.field_registry'); | ||
var basicFields = require('web.basic_fields'); | ||
var FieldEmail = basicFields.FieldEmail; | ||
|
||
|
||
var FieldSkype = FieldEmail.extend({ | ||
description: "skype", | ||
prefix: 'skype', | ||
init: function() { | ||
this._super.apply(this, arguments); | ||
this.clickable = true; | ||
}, | ||
|
||
render_value: function() { | ||
this._super(); | ||
if (this.get("effective_readonly") && this.clickable) { | ||
this.$el.attr('href', this.prefix + ':' + this.get('value') + '?'+(this.options.type || 'call')); | ||
} | ||
} | ||
_renderReadonly: function() { | ||
this.$el.text(this.value) | ||
.addClass('o_form_uri o_text_overflow') | ||
.attr('href', this.prefix + ':' + this.value + '?call'); | ||
}, | ||
}); | ||
|
||
core.form_widget_registry.add('skype', FieldSkype); | ||
fieldRegistry.add('skype', FieldSkype); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
odoo.define('res_partner_skype.tour', function (require) { | ||
"use strict"; | ||
|
||
var tour = require("web_tour.tour"); | ||
var core = require('web.core'); | ||
var _t = core._t; | ||
|
||
|
||
var steps = [{ | ||
trigger: '.o_thread_message strong.o_mail_redirect:contains("Agrolait")', | ||
content: _t("Open Partners Form"), | ||
position: 'bottom', | ||
}, { | ||
trigger: '.o_field_email.o_field_widget.o_form_uri.o_text_overflow[href="skype:skype_test?call"]', | ||
content: _t("Check the link"), | ||
position: 'bottom', | ||
}]; | ||
|
||
tour.register('tour_res_partner_skype', { test: true, url: '/web' }, steps); | ||
|
||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | ||
|
||
from . import test_res_partner_skype |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import odoo.tests | ||
from odoo.api import Environment | ||
|
||
|
||
@odoo.tests.common.at_install(True) | ||
@odoo.tests.common.post_install(True) | ||
class TestUi(odoo.tests.HttpCase): | ||
|
||
def test_res_partner_skype(self): | ||
# without a delay there might be problems on the steps whilst opening a POS | ||
# caused by a not yet loaded button's action | ||
cr = self.registry.cursor() | ||
env = Environment(cr, self.uid, {}) | ||
env['ir.module.module'].search([('name', '=', 'res_partner_skype')], limit=1).state = 'installed' | ||
cr.release() | ||
env['res.partner'].search(([('id', '=', 9)]), limit=1).write({ | ||
'skype': 'skype_test', | ||
}) | ||
|
||
# without a delay there might be problems on the steps whilst opening a POS | ||
# caused by a not yet loaded button's action | ||
self.phantom_js("/web", | ||
"odoo.__DEBUG__.services['web_tour.tour'].run('tour_res_partner_skype', 1000)", | ||
"odoo.__DEBUG__.services['web_tour.tour'].tours.tour_res_partner_skype.ready", | ||
login="admin", timeout=140) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!--Copyright 2014 Ivan Yelizariev <https://it-projects.info/team/yelizariev> | ||
Copyright 2016 x620 <https://github.com/x620> | ||
Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k> | ||
Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/> | ||
License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html).--> | ||
<openerp> | ||
<data> | ||
<record id="view_partner_form_skype" model="ir.ui.view"> | ||
<field name="name">res.partner.form.skype</field> | ||
<field name="name">res.partner.form.skype</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='email']" position="after"> | ||
<field name="skype" widget="skype"/> | ||
<field name="skype" widget="skype"/> | ||
</xpath> | ||
</data> | ||
</field> | ||
|
||
</record> | ||
</record> | ||
</data> | ||
</openerp> |