Mathias Markl 6 years ago
parent
commit
13cee7244d
  1. 5
      muk_web_share/README.md
  2. 2
      muk_web_share/__init__.py
  3. 13
      muk_web_share/__manifest__.py
  4. 5
      muk_web_share/doc/changelog.rst
  5. 49
      muk_web_share/doc/index.rst
  6. BIN
      muk_web_share/static/description/demo.gif
  7. 56
      muk_web_share/static/description/index.html
  8. BIN
      muk_web_share/static/description/screenshot.png
  9. BIN
      muk_web_share/static/description/screenshot_chatter.png
  10. BIN
      muk_web_share/static/description/screenshot_sidebar.png
  11. 6
      muk_web_share/static/src/js/share_button.js
  12. 11
      muk_web_share/static/src/js/share_dialog.js

5
muk_web_share/README.md

@ -1,5 +0,0 @@
# MuK Web Share
Adds a button to every form view. By clicking this button a dialog
opens and the current form can be shared with another user. On mobile
devices, the link of the form can be posted to Whatsapp.

2
muk_web_share/__init__.py

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Copyright (C) 2017 MuK IT GmbH

13
muk_web_share/__manifest__.py

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Copyright (C) 2017 MuK IT GmbH
@ -22,16 +20,11 @@
{
"name": "MuK Web Share",
"summary": """Share Button""",
"description": """
Adds a button to every form view. By clicking
this button a dialog opens and the current form
can be shared with another user. On mobile devices,
the link of the form can be posted to Whatsapp.
""",
"version": "11.0.1.0.4",
"version": "11.0.2.0.0",
"category": "Extra Tools",
"license": "AGPL-3",
"website": "http://www.mukit.at",
"live_test_url": "https://demo.mukit.at/web/login",
"author": "MuK IT",
"contributors": [
"Mathias Markl <mathias.markl@mukit.at>",
@ -43,8 +36,6 @@
"data": [
"template/assets.xml",
],
"demo": [
],
"qweb": [
"static/src/xml/*.xml",
],

5
muk_web_share/doc/changelog.rst

@ -1,3 +1,8 @@
`2.0.0`
-------
- Migrated to Python 3
`1.0.0`
-------

49
muk_web_share/doc/index.rst

@ -0,0 +1,49 @@
=============
MuK Web Share
=============
Adds a button to every form view. By clicking this button a dialog opens and the
current form can be shared with another user. On mobile devices, the link of the
form can be posted to Whatsapp.
Installation
============
To install this module, you need to:
Download the module and add it to your Odoo addons folder. Afterward, log on to
your Odoo server and go to the Apps menu. Trigger the debug modus and update the
list by clicking on the "Update Apps List" link. Now install the module by
clicking on the install button.
Configuration
=============
No additional configuration is needed to use this module.
Usage
=============
Go to any form view and in readonly mode there is a share button on the right
side of the form sheet. By clicking on this button the share dialog opens and
the currently active form can be shared with another user or into a channel.
Credits
=======
Contributors
------------
* Mathias Markl <mathias.markl@mukit.at>
Author & Maintainer
-------------------
This module is maintained by the `MuK IT GmbH <https://www.mukit.at/>`_.
MuK IT is an Austrian company specialized in customizing and extending Odoo.
We develop custom solutions for your individual needs to help you focus on
your strength and expertise to grow your business.
If you want to get in touch please contact us via mail
(sale@mukit.at) or visit our website (https://mukit.at).

BIN
muk_web_share/static/description/demo.gif

After

Width: 800  |  Height: 450  |  Size: 354 KiB

56
muk_web_share/static/description/index.html

@ -4,20 +4,23 @@
<h3 class="oe_slogan">Share Odoo Forms to your colleagues.</h3>
<h4 class="oe_slogan" style="font-size: 23px;">MuK IT GmbH -
www.mukit.at</h4>
<div class="oe_demo oe_screenshot">
<img src="screenshot.png">
<div class="oe_demo oe_screenshot"
style="max-width: 84%; margin: 16px 8%;">
<img src="demo.gif">
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_picture">
<div style="max-width: 84%; margin: 16px 8%;">
<h3 class="oe_slogan">Overview</h3>
<p class="oe_mt32">Adds a button to every form view. By clicking
this button a dialog opens and the current form can be shared with
another user. On mobile devices, the link of the form can be posted
to Whatsapp.</p>
<p class="oe_mt32">Adds a button to every form view. Go to any
form view and in readonly mode there is a share button on the right
side of the form sheet. By clicking on this button the share dialog
opens and the currently active form can be shared with another user
or into a channel.On mobile devices, the link of the form can be
posted to Whatsapp.</p>
</div>
</div>
</section>
@ -28,6 +31,7 @@
<div class="oe_span6">
<p class="oe_mt32 text-justify">The button is added to every Odoo
FormView and can be further customized using css or less.</p>
</div>
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="screenshot_sidebar.png">
@ -42,20 +46,54 @@
<img class="oe_picture oe_screenshot" src="screenshot_chatter.png">
</div>
<div class="oe_span6">
<p class="oe_mt32 text-justify">After sending the url of the
form, the chat automatically opens.</p>
<p class="oe_mt32 text-justify">If the form is sent in a channel
or directly to a user, the chat opens automatically. When sending it
to a new message, the dialog is closed and the URL is saved to the
clipboard.</p>
</div>
</div>
</section>
<section class="oe_container oe_dark"
style="margin-bottom: 20px; border-top: 5px solid #797979; border-bottom: 5px solid #797979;">
<h3 class="oe_slogan" style="margin-bottom: 10px;">Demo</h3>
<div class="row" style="margin: auto; max-width: 200px;">
<div class="col-xs-6">
<h5 class="oe_slogan" style="font-size: 20px; margin: 2px;">User:</h5>
</div>
<div class="col-xs-6">
<h5 class="oe_slogan" style="font-size: 20px; margin: 2px;">apps</h5>
</div>
<div class="col-xs-6">
<h5 class="oe_slogan" style="font-size: 20px; margin: 2px;">Password:</h5>
</div>
<div class="col-xs-6">
<h5 class="oe_slogan" style="font-size: 20px; margin: 2px;">demo</h5>
</div>
</div>
<div class="oe_slogan" style="margin-top: 5px;">
<a class="btn btn-primary btn-lg mt8"
href="https://demo.mukit.at/web/login"
style="position: relative; overflow: hidden;"><span
class="o_ripple"
style="height: 138px; width: 138px; top: -35.2969px; left: -8.17188px;"></span>
<i class="fa fa-video-camera"></i> Live Preview </a>
</div>
</section>
<section class="oe_container oe_dark">
<h3 class="oe_slogan">Help and Support</h3>
<h5 class="oe_slogan" style="font-size: 20px;">Feel free to
contact us, if you need any help with your Odoo integration or
addiontal features.</h5>
<div class="oe_slogan">
<a class="btn btn-primary btn-lg mt8" href="mailto:sale@mukit.at">
<i class="fa fa-envelope"></i> Email
</a> <a class="btn btn-primary btn-lg mt8"
href="https://mukit.at/page/contactus"> <i class="fa fa-phone"></i>
Contact
</a> <a class="btn btn-primary btn-lg mt8" href="mailto:support@mukit.at">
<i class="fa fa-life-ring"></i> Support
</a>
</div>
<img src="logo.png" style="width: 200px; margin-bottom: 20px;"

BIN
muk_web_share/static/description/screenshot.png

Before

Width: 663  |  Height: 305  |  Size: 16 KiB

BIN
muk_web_share/static/description/screenshot_chatter.png

Before

Width: 1920  |  Height: 948  |  Size: 109 KiB

After

Width: 1422  |  Height: 800  |  Size: 146 KiB

BIN
muk_web_share/static/description/screenshot_sidebar.png

Before

Width: 639  |  Height: 359  |  Size: 36 KiB

After

Width: 1422  |  Height: 800  |  Size: 124 KiB

6
muk_web_share/static/src/js/share_button.js

@ -42,13 +42,13 @@ FormRenderer.include({
},
_renderView: function() {
var self = this;
var _super = this._super.apply(this, arguments);
_super.then(function() {
var res = this._super.apply(this, arguments);
res.then(function() {
if(self.mode === 'readonly') {
self._renderShareButton();
}
});
return _super;
return res;
},
});

11
muk_web_share/static/src/js/share_dialog.js

@ -49,7 +49,7 @@ var ShareDialog = Dialog.extend({
}],
technical: true,
});
this._super(parent, options);
this._super.apply(this, arguments);
},
willStart: function () {
var self = this;
@ -57,9 +57,9 @@ var ShareDialog = Dialog.extend({
self.$modal.find('.modal-dialog').addClass("muk_share_dialog");
self.$modal.find('.modal-title').prepend($('<i class="fa fa-share-alt"/>'));
self.$content.find('.muk_share_buttons_whatsapp').attr("href",
'whatsapp://send?text=' + self.url);
'whatsapp://send?text=' + encodeURIComponent(self.url));
self.$content.find('.muk_share_buttons_email').attr("href",
'mailto:?subject=&body=' + self.url);
'mailto:?subject=' + _t("Share") + '&body=' + encodeURIComponent(self.url));
self.$content.find('.muk_share_buttons_chat').click(function(e) {
e.preventDefault();
e.stopPropagation();
@ -94,8 +94,8 @@ var ShareDialog = Dialog.extend({
model: 'res.users',
method: 'search_read',
context: session.user_context,
}).then(function(users) {
var users = _.filter(users, function (user) {
}).then(function(result) {
var users = _.filter(result, function (user) {
return !user.share && user.id !== session.uid;
});
self.$content.find('#user').append($(QWeb.render('muk_web_share.ShareUsers', {
@ -163,6 +163,7 @@ var ShareDialog = Dialog.extend({
newMessage: function(message) {
this.copyClipboard(message);
this.openChat();
this.close();
},
openChat: function() {
chat_manager.bus.trigger('open_chat');

Loading…
Cancel
Save