-
165muk_web_utils/LICENSE
-
113muk_web_utils/README.rst
-
24muk_web_utils/__init__.py
-
58muk_web_utils/__manifest__.py
-
24muk_web_utils/controllers/__init__.py
-
56muk_web_utils/controllers/attachment.py
-
37muk_web_utils/controllers/backend.py
-
36muk_web_utils/data/autovacuum.xml
-
54muk_web_utils/doc/changelog.rst
-
113muk_web_utils/doc/index.rst
-
340muk_web_utils/i18n/de.po
-
326muk_web_utils/i18n/es.po
-
326muk_web_utils/i18n/fr.po
-
326muk_web_utils/i18n/muk_web_utils.pot
-
326muk_web_utils/i18n/nl.po
-
25muk_web_utils/models/__init__.py
-
46muk_web_utils/models/ir_attachment.py
-
79muk_web_utils/models/res_config_settings.py
-
BINmuk_web_utils/static/description/banner.png
-
BINmuk_web_utils/static/description/icon.png
-
1muk_web_utils/static/description/icon.svg
-
124muk_web_utils/static/description/index.html
-
BINmuk_web_utils/static/description/logo.png
-
BINmuk_web_utils/static/description/preview.png
-
BINmuk_web_utils/static/description/service_customization.png
-
BINmuk_web_utils/static/description/service_development.png
-
BINmuk_web_utils/static/description/service_implementation.png
-
BINmuk_web_utils/static/description/service_integration.png
-
BINmuk_web_utils/static/description/service_support.png
-
160muk_web_utils/static/libs/simplebar/simplebar.css
-
4389muk_web_utils/static/libs/simplebar/simplebar.js
-
BINmuk_web_utils/static/src/img/module.png
-
85muk_web_utils/static/src/js/core/async.js
-
68muk_web_utils/static/src/js/core/dialog.js
-
132muk_web_utils/static/src/js/core/dropzone.js
-
176muk_web_utils/static/src/js/core/files.js
-
110muk_web_utils/static/src/js/core/mimetype.js
-
85muk_web_utils/static/src/js/core/utils.js
-
46muk_web_utils/static/src/js/fields/abstract.js
-
86muk_web_utils/static/src/js/fields/binary.js
-
130muk_web_utils/static/src/js/fields/color.js
-
135muk_web_utils/static/src/js/fields/copy.js
-
54muk_web_utils/static/src/js/fields/domain.js
-
58muk_web_utils/static/src/js/fields/image.js
-
96muk_web_utils/static/src/js/fields/module.js
-
119muk_web_utils/static/src/js/fields/path.js
-
226muk_web_utils/static/src/js/fields/share.js
-
54muk_web_utils/static/src/js/fields/utils.js
-
104muk_web_utils/static/src/js/libs/jquery.js
-
27muk_web_utils/static/src/js/libs/scrollbar.js
-
47muk_web_utils/static/src/js/libs/underscore.js
-
37muk_web_utils/static/src/js/services/notification_service.js
-
47muk_web_utils/static/src/js/views/form/renderer.js
-
46muk_web_utils/static/src/js/widgets/notification.js
-
28muk_web_utils/static/src/scss/binary.scss
-
66muk_web_utils/static/src/scss/color.scss
-
34muk_web_utils/static/src/scss/copy.scss
-
64muk_web_utils/static/src/scss/dropzone.scss
-
84muk_web_utils/static/src/scss/image.scss
-
40muk_web_utils/static/src/scss/mixins.scss
-
33muk_web_utils/static/src/scss/module.scss
-
30muk_web_utils/static/src/scss/notification.scss
-
54muk_web_utils/static/src/scss/share.scss
-
158muk_web_utils/static/src/scss/switch.scss
-
39muk_web_utils/static/src/scss/variables.scss
-
65muk_web_utils/static/src/xml/color.xml
-
35muk_web_utils/static/src/xml/copy.xml
-
34muk_web_utils/static/src/xml/image.xml
-
39muk_web_utils/static/src/xml/module.xml
-
39muk_web_utils/static/src/xml/notification.xml
-
106muk_web_utils/static/src/xml/share.xml
-
54muk_web_utils/static/src/xml/switch.xml
-
205muk_web_utils/static/tests/fields.js
-
79muk_web_utils/template/assets.xml
-
23muk_web_utils/tests/__init__.py
-
41muk_web_utils/tests/test_js.py
-
49muk_web_utils/views/res_config_settings_view.xml
@ -0,0 +1,165 @@ |
|||
GNU LESSER GENERAL PUBLIC LICENSE |
|||
Version 3, 29 June 2007 |
|||
|
|||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> |
|||
Everyone is permitted to copy and distribute verbatim copies |
|||
of this license document, but changing it is not allowed. |
|||
|
|||
|
|||
This version of the GNU Lesser General Public License incorporates |
|||
the terms and conditions of version 3 of the GNU General Public |
|||
License, supplemented by the additional permissions listed below. |
|||
|
|||
0. Additional Definitions. |
|||
|
|||
As used herein, "this License" refers to version 3 of the GNU Lesser |
|||
General Public License, and the "GNU GPL" refers to version 3 of the GNU |
|||
General Public License. |
|||
|
|||
"The Library" refers to a covered work governed by this License, |
|||
other than an Application or a Combined Work as defined below. |
|||
|
|||
An "Application" is any work that makes use of an interface provided |
|||
by the Library, but which is not otherwise based on the Library. |
|||
Defining a subclass of a class defined by the Library is deemed a mode |
|||
of using an interface provided by the Library. |
|||
|
|||
A "Combined Work" is a work produced by combining or linking an |
|||
Application with the Library. The particular version of the Library |
|||
with which the Combined Work was made is also called the "Linked |
|||
Version". |
|||
|
|||
The "Minimal Corresponding Source" for a Combined Work means the |
|||
Corresponding Source for the Combined Work, excluding any source code |
|||
for portions of the Combined Work that, considered in isolation, are |
|||
based on the Application, and not on the Linked Version. |
|||
|
|||
The "Corresponding Application Code" for a Combined Work means the |
|||
object code and/or source code for the Application, including any data |
|||
and utility programs needed for reproducing the Combined Work from the |
|||
Application, but excluding the System Libraries of the Combined Work. |
|||
|
|||
1. Exception to Section 3 of the GNU GPL. |
|||
|
|||
You may convey a covered work under sections 3 and 4 of this License |
|||
without being bound by section 3 of the GNU GPL. |
|||
|
|||
2. Conveying Modified Versions. |
|||
|
|||
If you modify a copy of the Library, and, in your modifications, a |
|||
facility refers to a function or data to be supplied by an Application |
|||
that uses the facility (other than as an argument passed when the |
|||
facility is invoked), then you may convey a copy of the modified |
|||
version: |
|||
|
|||
a) under this License, provided that you make a good faith effort to |
|||
ensure that, in the event an Application does not supply the |
|||
function or data, the facility still operates, and performs |
|||
whatever part of its purpose remains meaningful, or |
|||
|
|||
b) under the GNU GPL, with none of the additional permissions of |
|||
this License applicable to that copy. |
|||
|
|||
3. Object Code Incorporating Material from Library Header Files. |
|||
|
|||
The object code form of an Application may incorporate material from |
|||
a header file that is part of the Library. You may convey such object |
|||
code under terms of your choice, provided that, if the incorporated |
|||
material is not limited to numerical parameters, data structure |
|||
layouts and accessors, or small macros, inline functions and templates |
|||
(ten or fewer lines in length), you do both of the following: |
|||
|
|||
a) Give prominent notice with each copy of the object code that the |
|||
Library is used in it and that the Library and its use are |
|||
covered by this License. |
|||
|
|||
b) Accompany the object code with a copy of the GNU GPL and this license |
|||
document. |
|||
|
|||
4. Combined Works. |
|||
|
|||
You may convey a Combined Work under terms of your choice that, |
|||
taken together, effectively do not restrict modification of the |
|||
portions of the Library contained in the Combined Work and reverse |
|||
engineering for debugging such modifications, if you also do each of |
|||
the following: |
|||
|
|||
a) Give prominent notice with each copy of the Combined Work that |
|||
the Library is used in it and that the Library and its use are |
|||
covered by this License. |
|||
|
|||
b) Accompany the Combined Work with a copy of the GNU GPL and this license |
|||
document. |
|||
|
|||
c) For a Combined Work that displays copyright notices during |
|||
execution, include the copyright notice for the Library among |
|||
these notices, as well as a reference directing the user to the |
|||
copies of the GNU GPL and this license document. |
|||
|
|||
d) Do one of the following: |
|||
|
|||
0) Convey the Minimal Corresponding Source under the terms of this |
|||
License, and the Corresponding Application Code in a form |
|||
suitable for, and under terms that permit, the user to |
|||
recombine or relink the Application with a modified version of |
|||
the Linked Version to produce a modified Combined Work, in the |
|||
manner specified by section 6 of the GNU GPL for conveying |
|||
Corresponding Source. |
|||
|
|||
1) Use a suitable shared library mechanism for linking with the |
|||
Library. A suitable mechanism is one that (a) uses at run time |
|||
a copy of the Library already present on the user's computer |
|||
system, and (b) will operate properly with a modified version |
|||
of the Library that is interface-compatible with the Linked |
|||
Version. |
|||
|
|||
e) Provide Installation Information, but only if you would otherwise |
|||
be required to provide such information under section 6 of the |
|||
GNU GPL, and only to the extent that such information is |
|||
necessary to install and execute a modified version of the |
|||
Combined Work produced by recombining or relinking the |
|||
Application with a modified version of the Linked Version. (If |
|||
you use option 4d0, the Installation Information must accompany |
|||
the Minimal Corresponding Source and Corresponding Application |
|||
Code. If you use option 4d1, you must provide the Installation |
|||
Information in the manner specified by section 6 of the GNU GPL |
|||
for conveying Corresponding Source.) |
|||
|
|||
5. Combined Libraries. |
|||
|
|||
You may place library facilities that are a work based on the |
|||
Library side by side in a single library together with other library |
|||
facilities that are not Applications and are not covered by this |
|||
License, and convey such a combined library under terms of your |
|||
choice, if you do both of the following: |
|||
|
|||
a) Accompany the combined library with a copy of the same work based |
|||
on the Library, uncombined with any other library facilities, |
|||
conveyed under the terms of this License. |
|||
|
|||
b) Give prominent notice with the combined library that part of it |
|||
is a work based on the Library, and explaining where to find the |
|||
accompanying uncombined form of the same work. |
|||
|
|||
6. Revised Versions of the GNU Lesser General Public License. |
|||
|
|||
The Free Software Foundation may publish revised and/or new versions |
|||
of the GNU Lesser General Public License from time to time. Such new |
|||
versions will be similar in spirit to the present version, but may |
|||
differ in detail to address new problems or concerns. |
|||
|
|||
Each version is given a distinguishing version number. If the |
|||
Library as you received it specifies that a certain numbered version |
|||
of the GNU Lesser General Public License "or any later version" |
|||
applies to it, you have the option of following the terms and |
|||
conditions either of that published version or of any later version |
|||
published by the Free Software Foundation. If the Library as you |
|||
received it does not specify a version number of the GNU Lesser |
|||
General Public License, you may choose any version of the GNU Lesser |
|||
General Public License ever published by the Free Software Foundation. |
|||
|
|||
If the Library as you received it specifies that a proxy can decide |
|||
whether future versions of the GNU Lesser General Public License shall |
|||
apply, that proxy's public statement of acceptance of any version is |
|||
permanent authorization for you to choose that version for the |
|||
Library. |
@ -0,0 +1,113 @@ |
|||
============= |
|||
MuK Web Utils |
|||
============= |
|||
|
|||
Technical module to provide some utility features and libraries that can be used |
|||
in other applications. This module has no direct effect on the running system. |
|||
|
|||
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 mode and update the |
|||
list by clicking on the "Update Apps List" link. Now install the module by |
|||
clicking on the install button. |
|||
|
|||
Another way to install this module is via the package management for Python |
|||
(`PyPI <https://pypi.org/project/pip/>`_). |
|||
|
|||
To install our modules using the package manager make sure |
|||
`odoo-autodiscover <https://pypi.org/project/odoo-autodiscover/>`_ is installed |
|||
correctly. Then open a console and install the module by entering the following |
|||
command: |
|||
|
|||
``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple <module>`` |
|||
|
|||
The module name consists of the Odoo version and the module name, where |
|||
underscores are replaced by a dash. |
|||
|
|||
**Module:** |
|||
|
|||
``odoo<version>-addon-<module_name>`` |
|||
|
|||
**Example:** |
|||
|
|||
``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` |
|||
|
|||
Once the installation has been successfully completed, the app is already in the |
|||
correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the |
|||
debug mode and update the list by clicking on the "Update Apps List" link. Now |
|||
install the module by clicking on the install button. |
|||
|
|||
The biggest advantage of this variant is that you can now also update the app |
|||
using the "pip" command. To do this, enter the following command in your console: |
|||
|
|||
``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple <module>`` |
|||
|
|||
When the process is finished, restart your server and update the application in |
|||
Odoo. The steps are the same as for the installation only the button has changed |
|||
from "Install" to "Upgrade". |
|||
|
|||
You can also view available Apps directly in our `repository <https://nexus.mukit.at/#browse/browse:odoo>`_ |
|||
and find a more detailed installation guide on our `website <https://mukit.at/page/open-source>`_. |
|||
|
|||
For modules licensed under OPL-1, you will receive access data when you purchase |
|||
the module. If the modules were not purchased directly from |
|||
`MuK IT <https://www.mukit.at/>`_ please contact our support (support@mukit.at) |
|||
with a confirmation of purchase to receive the corresponding access data. |
|||
|
|||
Upgrade |
|||
============ |
|||
|
|||
To upgrade this module, you need to: |
|||
|
|||
Download the module and add it to your Odoo addons folder. Restart the server |
|||
and log on to your Odoo server. Select the Apps menu and upgrade the module by |
|||
clicking on the upgrade button. |
|||
|
|||
If you installed the module using the "pip" command, you can also update the |
|||
module in the same way. Just type the following command into the console: |
|||
|
|||
``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple <module>`` |
|||
|
|||
When the process is finished, restart your server and update the application in |
|||
Odoo, just like you would normally. |
|||
|
|||
Configuration |
|||
============= |
|||
|
|||
No additional configuration is needed to use this module. |
|||
|
|||
Usage |
|||
============= |
|||
|
|||
This module has no direct visible effect on the system. It provide utility features. |
|||
|
|||
Credits |
|||
======= |
|||
|
|||
Contributors |
|||
------------ |
|||
|
|||
* Mathias Markl <mathias.markl@mukit.at> |
|||
|
|||
Images |
|||
------------ |
|||
|
|||
Some pictures are based on or inspired by the icon set of Font Awesome: |
|||
|
|||
* `Font Awesome <https://fontawesome.com>`_ |
|||
|
|||
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). |
@ -0,0 +1,24 @@ |
|||
################################################################################### |
|||
# |
|||
# Copyright (c) 2017-2019 MuK IT GmbH. |
|||
# |
|||
# This file is part of MuK Web Utils |
|||
# (see https://mukit.at). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Lesser General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
from . import models |
|||
from . import controllers |
@ -0,0 +1,58 @@ |
|||
################################################################################### |
|||
# |
|||
# Copyright (c) 2017-2019 MuK IT GmbH. |
|||
# |
|||
# This file is part of MuK Web Utils |
|||
# (see https://mukit.at). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Lesser General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
{ |
|||
"name": "MuK Web Utils", |
|||
"summary": """Utility Features""", |
|||
"version": "13.0.1.0.0", |
|||
"category": "Extra Tools", |
|||
"license": "LGPL-3", |
|||
"author": "MuK IT", |
|||
"website": "http://www.mukit.at", |
|||
'live_test_url': 'https://mukit.at/r/SgN', |
|||
"contributors": [ |
|||
"Mathias Markl <mathias.markl@mukit.at>", |
|||
"Benedikt Jilek <benedikt.jilek@mukit.at>", |
|||
], |
|||
"depends": [ |
|||
"web_editor", |
|||
"muk_autovacuum", |
|||
], |
|||
"data": [ |
|||
"template/assets.xml", |
|||
"views/res_config_settings_view.xml", |
|||
"data/autovacuum.xml", |
|||
], |
|||
"qweb": [ |
|||
"static/src/xml/*.xml", |
|||
], |
|||
"images": [ |
|||
'static/description/banner.png' |
|||
], |
|||
"external_dependencies": { |
|||
"python": [], |
|||
"bin": [], |
|||
}, |
|||
"application": False, |
|||
"installable": True, |
|||
'auto_install': False, |
|||
} |
@ -0,0 +1,24 @@ |
|||
################################################################################### |
|||
# |
|||
# Copyright (c) 2017-2019 MuK IT GmbH. |
|||
# |
|||
# This file is part of MuK Web Utils |
|||
# (see https://mukit.at). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Lesser General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
from . import backend |
|||
from . import attachment |
@ -0,0 +1,56 @@ |
|||
################################################################################### |
|||
# |
|||
# Copyright (c) 2017-2019 MuK IT GmbH. |
|||
# |
|||
# This file is part of MuK Web Utils |
|||
# (see https://mukit.at). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Lesser General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
import json |
|||
import base64 |
|||
import logging |
|||
|
|||
from odoo import http, SUPERUSER_ID |
|||
from odoo.http import request |
|||
from odoo.tools.misc import str2bool |
|||
|
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
class AttachmentController(http.Controller): |
|||
|
|||
@http.route('/utils/attachment/add', type='http', auth="user", methods=['POST']) |
|||
def add_attachment(self, ufile, temporary=False, **kw): |
|||
tmp = temporary and str2bool(temporary) or False |
|||
name = "Access Attachment: %s" % ufile.filename |
|||
attachment = request.env['ir.attachment'].create({ |
|||
'name': tmp and "%s (Temporary)" % name or name, |
|||
'datas': base64.b64encode(ufile.read()), |
|||
'datas_fname': ufile.filename, |
|||
'type': 'binary', |
|||
'public': False, |
|||
'temporary': tmp, |
|||
}) |
|||
attachment.generate_access_token() |
|||
if ufile.mimetype and ufile.mimetype != 'application/octet-stream': |
|||
attachment.with_user(request.env['res.users'].browse(SUPERUSER_ID)).write({ |
|||
'mimetype': ufile.mimetype, |
|||
}) |
|||
base_url = request.env['ir.config_parameter'].with_user(request.env['res.users'].browse(SUPERUSER_ID)).get_param('web.base.url') |
|||
result = attachment.read(['name', 'datas_fname', 'mimetype', 'checksum', 'access_token'])[0] |
|||
result['url'] = '%s/web/content/%s?access_token=%s' % (base_url, attachment.id, attachment.access_token) |
|||
return json.dumps(result) |
|||
|
@ -0,0 +1,37 @@ |
|||
################################################################################### |
|||
# |
|||
# Copyright (c) 2017-2019 MuK IT GmbH. |
|||
# |
|||
# This file is part of MuK Web Utils |
|||
# (see https://mukit.at). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Lesser General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
import logging |
|||
|
|||
from odoo import http, SUPERUSER_ID |
|||
from odoo.http import request |
|||
|
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
class BackendController(http.Controller): |
|||
|
|||
@http.route('/config/muk_web_utils.binary_max_size', type='json', auth="user") |
|||
def max_upload_size(self, **kw): |
|||
params = request.env['ir.config_parameter'].with_user(request.env['res.users'].browse(SUPERUSER_ID)) |
|||
return { |
|||
'max_upload_size': int(params.get_param('muk_web_utils.binary_max_size', default=25)) |
|||
} |
@ -0,0 +1,36 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-2019 MuK IT GmbH. |
|||
|
|||
This file is part of MuK Web Utils |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<odoo noupdate="1"> |
|||
|
|||
<record id="autovacuum_temporary_attachments" model="muk_autovacuum.rules"> |
|||
<field name="name">Delete temporary Attachments</field> |
|||
<field name="model" ref="base.model_ir_attachment"/> |
|||
<field name="active" eval="True" /> |
|||
<field name="state">domain</field> |
|||
<field name="domain">[('temporary','=',True), ('create_date', '<=', (datetime.datetime.utcnow() - datetime.timedelta(hours=24)).strftime('%Y-%m-%d %H:%M:%S'))]</field> |
|||
<field name="protect_starred" eval="False" /> |
|||
</record> |
|||
|
|||
</odoo> |
@ -0,0 +1,54 @@ |
|||
`2.9.0` |
|||
------- |
|||
|
|||
- Temporary attachments |
|||
|
|||
`2.8.0` |
|||
------- |
|||
|
|||
- Added path field widgets |
|||
|
|||
`2.7.0` |
|||
------- |
|||
|
|||
- Added color index field widget |
|||
|
|||
`2.6.0` |
|||
------- |
|||
|
|||
- Moved editor features to separate module |
|||
|
|||
`2.5.0` |
|||
------- |
|||
|
|||
- Added color field widget |
|||
|
|||
`2.4.0` |
|||
------- |
|||
|
|||
- Added widget to share binary fields |
|||
|
|||
`2.3.0` |
|||
------- |
|||
|
|||
- Added custom colors to snippet options |
|||
|
|||
`2.2.0` |
|||
------- |
|||
|
|||
- Added widget to share text fields |
|||
|
|||
`2.1.0` |
|||
------- |
|||
|
|||
- Automatic labels on settings |
|||
|
|||
`2.0.0` |
|||
------- |
|||
|
|||
- Migrated to Python 3 |
|||
|
|||
`1.0.0` |
|||
------- |
|||
|
|||
- Init version |
@ -0,0 +1,113 @@ |
|||
============= |
|||
MuK Web Utils |
|||
============= |
|||
|
|||
Technical module to provide some utility features and libraries that can be used |
|||
in other applications. This module has no direct effect on the running system. |
|||
|
|||
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 mode and update the |
|||
list by clicking on the "Update Apps List" link. Now install the module by |
|||
clicking on the install button. |
|||
|
|||
Another way to install this module is via the package management for Python |
|||
(`PyPI <https://pypi.org/project/pip/>`_). |
|||
|
|||
To install our modules using the package manager make sure |
|||
`odoo-autodiscover <https://pypi.org/project/odoo-autodiscover/>`_ is installed |
|||
correctly. Then open a console and install the module by entering the following |
|||
command: |
|||
|
|||
``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple <module>`` |
|||
|
|||
The module name consists of the Odoo version and the module name, where |
|||
underscores are replaced by a dash. |
|||
|
|||
**Module:** |
|||
|
|||
``odoo<version>-addon-<module_name>`` |
|||
|
|||
**Example:** |
|||
|
|||
``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` |
|||
|
|||
Once the installation has been successfully completed, the app is already in the |
|||
correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the |
|||
debug mode and update the list by clicking on the "Update Apps List" link. Now |
|||
install the module by clicking on the install button. |
|||
|
|||
The biggest advantage of this variant is that you can now also update the app |
|||
using the "pip" command. To do this, enter the following command in your console: |
|||
|
|||
``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple <module>`` |
|||
|
|||
When the process is finished, restart your server and update the application in |
|||
Odoo. The steps are the same as for the installation only the button has changed |
|||
from "Install" to "Upgrade". |
|||
|
|||
You can also view available Apps directly in our `repository <https://nexus.mukit.at/#browse/browse:odoo>`_ |
|||
and find a more detailed installation guide on our `website <https://mukit.at/page/open-source>`_. |
|||
|
|||
For modules licensed under OPL-1, you will receive access data when you purchase |
|||
the module. If the modules were not purchased directly from |
|||
`MuK IT <https://www.mukit.at/>`_ please contact our support (support@mukit.at) |
|||
with a confirmation of purchase to receive the corresponding access data. |
|||
|
|||
Upgrade |
|||
============ |
|||
|
|||
To upgrade this module, you need to: |
|||
|
|||
Download the module and add it to your Odoo addons folder. Restart the server |
|||
and log on to your Odoo server. Select the Apps menu and upgrade the module by |
|||
clicking on the upgrade button. |
|||
|
|||
If you installed the module using the "pip" command, you can also update the |
|||
module in the same way. Just type the following command into the console: |
|||
|
|||
``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple <module>`` |
|||
|
|||
When the process is finished, restart your server and update the application in |
|||
Odoo, just like you would normally. |
|||
|
|||
Configuration |
|||
============= |
|||
|
|||
No additional configuration is needed to use this module. |
|||
|
|||
Usage |
|||
============= |
|||
|
|||
This module has no direct visible effect on the system. It provide utility features. |
|||
|
|||
Credits |
|||
======= |
|||
|
|||
Contributors |
|||
------------ |
|||
|
|||
* Mathias Markl <mathias.markl@mukit.at> |
|||
|
|||
Images |
|||
------------ |
|||
|
|||
Some pictures are based on or inspired by the icon set of Font Awesome: |
|||
|
|||
* `Font Awesome <https://fontawesome.com>`_ |
|||
|
|||
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). |
@ -0,0 +1,340 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * muk_web_utils |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 12.0-20190128\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2019-02-27 09:28+0000\n" |
|||
"PO-Revision-Date: 2019-06-27 08:23+0000\n" |
|||
"Last-Translator: MuK IT <admin@mukit.at>\n" |
|||
"Language-Team: German <http://weblate.mukit.at/projects/web-12/muk_web_utils/" |
|||
"de/>\n" |
|||
"Language: de\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: nplurals=2; plural=n != 1;\n" |
|||
"X-Generator: Weblate 3.7\n" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/color.js:113 |
|||
#, python-format |
|||
msgid "'%s' is not a correct color index (0-12)" |
|||
msgstr "%s' ist kein korrekter Farbindex (0-12)." |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/color.js:68 |
|||
#, python-format |
|||
msgid "'%s' is not a correct color value" |
|||
msgstr "%s' ist kein korrekter Farbwert." |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:175 |
|||
#, python-format |
|||
msgid "<%= name %> shared a file!" |
|||
msgstr "<%= name %> teilte eine Datei!" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:115 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:144 |
|||
#, python-format |
|||
msgid "<%= name %> shared a message!" |
|||
msgstr "<%= name %> teilte eine Nachricht!" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:116 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:145 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:176 |
|||
#, python-format |
|||
msgid "<%= value %>" |
|||
msgstr "<%= Wert %>" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dialog.js:51 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:50 |
|||
#, python-format |
|||
msgid "Cancel" |
|||
msgstr "Abbrechen" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:30 |
|||
#, python-format |
|||
msgid "Click on the download button to be redirected to the store and download the corresponding module." |
|||
msgstr "" |
|||
"Klicken Sie auf den Download-Button, um in den Shop weitergeleitet zu werden " |
|||
"und das entsprechende Modul herunterzuladen." |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:46 |
|||
#, python-format |
|||
msgid "Color 0" |
|||
msgstr "Farbe 0" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:47 |
|||
#, python-format |
|||
msgid "Color 1" |
|||
msgstr "Farbe 1" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:56 |
|||
#, python-format |
|||
msgid "Color 10" |
|||
msgstr "Farbe 10" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:57 |
|||
#, python-format |
|||
msgid "Color 11" |
|||
msgstr "Farbe 11" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:48 |
|||
#, python-format |
|||
msgid "Color 2" |
|||
msgstr "Farbe 2" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:49 |
|||
#, python-format |
|||
msgid "Color 3" |
|||
msgstr "Farbe 3" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:50 |
|||
#, python-format |
|||
msgid "Color 4" |
|||
msgstr "Farbe 4" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:51 |
|||
#, python-format |
|||
msgid "Color 5" |
|||
msgstr "Farbe 5" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:52 |
|||
#, python-format |
|||
msgid "Color 6" |
|||
msgstr "Farbe 6" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:53 |
|||
#, python-format |
|||
msgid "Color 7" |
|||
msgstr "Farbe 7" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:54 |
|||
#, python-format |
|||
msgid "Color 8" |
|||
msgstr "Farbe 8" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:55 |
|||
#, python-format |
|||
msgid "Color 9" |
|||
msgstr "Farbe 9" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model,name:muk_web_utils.model_res_config_settings |
|||
msgid "Config Settings" |
|||
msgstr "Konfiguration " |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:45 |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:97 |
|||
#, python-format |
|||
msgid "Download" |
|||
msgstr "Herunterladen" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dropzone.js:108 |
|||
#, python-format |
|||
msgid "Drop files here to upload!" |
|||
msgstr "Lassen Sie Dateien hier zum Hochladen fallen!" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:45 |
|||
#, python-format |
|||
msgid "External" |
|||
msgstr "Extern" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model.fields,field_description:muk_web_utils.field_res_config_settings__binary_max_size |
|||
msgid "File Size Limit" |
|||
msgstr "Dateigrößenbegrenzung" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:35 |
|||
#, python-format |
|||
msgid "Internal" |
|||
msgstr "Intern" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/copy.js:107 |
|||
#, python-format |
|||
msgid "Link Copied!" |
|||
msgstr "Link kopiert!" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:48 |
|||
#, python-format |
|||
msgid "Mail" |
|||
msgstr "Mail" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model_terms:ir.ui.view,arch_db:muk_web_utils.res_config_settings_view_form |
|||
msgid "Maximum allowed file size in MB" |
|||
msgstr "Maximal zulässige Dateigröße in MB" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model.fields,help:muk_web_utils.field_res_config_settings__binary_max_size |
|||
msgid "Maximum allowed file size in megabytes. Note that this setting only adjusts\n" |
|||
" the binary widgets accordingly. The maximum file size on your server can probably\n" |
|||
" be restricted in several places. Note that a large file size limit and therefore\n" |
|||
" large files in your system can significantly limit performance." |
|||
msgstr "" |
|||
"Maximal zulässige Dateigröße in Megabyte. Beachten Sie, dass diese " |
|||
"Einstellung nur angepasst wird._x000D_\n" |
|||
" die binären Widgets entsprechend. Die maximale Dateigröße auf " |
|||
"Ihrem Server kann wahrscheinlich_x000D_\n" |
|||
" an mehreren Stellen eingeschränkt sein. Beachten Sie, dass eine " |
|||
"große Dateigröße und damit eine große Dateigröße begrenzt ist._x000D_\n" |
|||
" können große Dateien in Ihrem System die Leistung erheblich " |
|||
"einschränken." |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:38 |
|||
#, python-format |
|||
msgid "Message" |
|||
msgstr "Nachricht" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:59 |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:26 |
|||
#, python-format |
|||
msgid "Missing Module" |
|||
msgstr "Fehlende Module" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:42 |
|||
#, python-format |
|||
msgid "Note" |
|||
msgstr "Hinweis" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:83 |
|||
#, python-format |
|||
msgid "Open" |
|||
msgstr "Offen" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dialog.js:45 |
|||
#, python-format |
|||
msgid "Save" |
|||
msgstr "Speichern" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:52 |
|||
#, python-format |
|||
msgid "Send" |
|||
msgstr "Senden" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:27 |
|||
#, python-format |
|||
msgid "Share" |
|||
msgstr "Teilen" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:74 |
|||
#, python-format |
|||
msgid "Store" |
|||
msgstr "Laden" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/copy.js:35 |
|||
#, python-format |
|||
msgid "The field '%s' must be a binary field with an set attachment flag for the share widget to work." |
|||
msgstr "" |
|||
"Das Feld'%s' muss ein Binärfeld mit einem gesetzten Attachment-Flag sein, " |
|||
"damit das Share-Widget funktioniert." |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:29 |
|||
#, python-format |
|||
msgid "The module could not be found on the server." |
|||
msgstr "Das Modul konnte auf dem Server nicht gefunden werden." |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/async.js:46 |
|||
#, python-format |
|||
msgid "Upload" |
|||
msgstr "Hochladen" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/async.js:47 |
|||
#, python-format |
|||
msgid "Uploading..." |
|||
msgstr "Hochladen....." |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:95 |
|||
#, python-format |
|||
msgid "shared a file with you!" |
|||
msgstr "hat eine Datei mit dir geteilt!" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:81 |
|||
#, python-format |
|||
msgid "shared a link with you!" |
|||
msgstr "einen Link mit dir geteilt!" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:87 |
|||
#, python-format |
|||
msgid "shared a message with you!" |
|||
msgstr "hat eine Nachricht mit dir geteilt!" |
@ -0,0 +1,326 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * muk_web_utils |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 12.0-20190128\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2019-02-27 09:28+0000\n" |
|||
"PO-Revision-Date: 2019-02-27 09:28+0000\n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/color.js:113 |
|||
#, python-format |
|||
msgid "'%s' is not a correct color index (0-12)" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/color.js:68 |
|||
#, python-format |
|||
msgid "'%s' is not a correct color value" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:175 |
|||
#, python-format |
|||
msgid "<%= name %> shared a file!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:115 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:144 |
|||
#, python-format |
|||
msgid "<%= name %> shared a message!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:116 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:145 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:176 |
|||
#, python-format |
|||
msgid "<%= value %>" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dialog.js:51 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:50 |
|||
#, python-format |
|||
msgid "Cancel" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:30 |
|||
#, python-format |
|||
msgid "Click on the download button to be redirected to the store and download the corresponding module." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:46 |
|||
#, python-format |
|||
msgid "Color 0" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:47 |
|||
#, python-format |
|||
msgid "Color 1" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:56 |
|||
#, python-format |
|||
msgid "Color 10" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:57 |
|||
#, python-format |
|||
msgid "Color 11" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:48 |
|||
#, python-format |
|||
msgid "Color 2" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:49 |
|||
#, python-format |
|||
msgid "Color 3" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:50 |
|||
#, python-format |
|||
msgid "Color 4" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:51 |
|||
#, python-format |
|||
msgid "Color 5" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:52 |
|||
#, python-format |
|||
msgid "Color 6" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:53 |
|||
#, python-format |
|||
msgid "Color 7" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:54 |
|||
#, python-format |
|||
msgid "Color 8" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:55 |
|||
#, python-format |
|||
msgid "Color 9" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model,name:muk_web_utils.model_res_config_settings |
|||
msgid "Config Settings" |
|||
msgstr "Opciones de Configuración" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:45 |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:97 |
|||
#, python-format |
|||
msgid "Download" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dropzone.js:108 |
|||
#, python-format |
|||
msgid "Drop files here to upload!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:45 |
|||
#, python-format |
|||
msgid "External" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model.fields,field_description:muk_web_utils.field_res_config_settings__binary_max_size |
|||
msgid "File Size Limit" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:35 |
|||
#, python-format |
|||
msgid "Internal" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/copy.js:107 |
|||
#, python-format |
|||
msgid "Link Copied!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:48 |
|||
#, python-format |
|||
msgid "Mail" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model_terms:ir.ui.view,arch_db:muk_web_utils.res_config_settings_view_form |
|||
msgid "Maximum allowed file size in MB" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model.fields,help:muk_web_utils.field_res_config_settings__binary_max_size |
|||
msgid "Maximum allowed file size in megabytes. Note that this setting only adjusts\n" |
|||
" the binary widgets accordingly. The maximum file size on your server can probably\n" |
|||
" be restricted in several places. Note that a large file size limit and therefore\n" |
|||
" large files in your system can significantly limit performance." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:38 |
|||
#, python-format |
|||
msgid "Message" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:59 |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:26 |
|||
#, python-format |
|||
msgid "Missing Module" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:42 |
|||
#, python-format |
|||
msgid "Note" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:83 |
|||
#, python-format |
|||
msgid "Open" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dialog.js:45 |
|||
#, python-format |
|||
msgid "Save" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:52 |
|||
#, python-format |
|||
msgid "Send" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:27 |
|||
#, python-format |
|||
msgid "Share" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:74 |
|||
#, python-format |
|||
msgid "Store" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/copy.js:35 |
|||
#, python-format |
|||
msgid "The field '%s' must be a binary field with an set attachment flag for the share widget to work." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:29 |
|||
#, python-format |
|||
msgid "The module could not be found on the server." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/async.js:46 |
|||
#, python-format |
|||
msgid "Upload" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/async.js:47 |
|||
#, python-format |
|||
msgid "Uploading..." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:95 |
|||
#, python-format |
|||
msgid "shared a file with you!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:81 |
|||
#, python-format |
|||
msgid "shared a link with you!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:87 |
|||
#, python-format |
|||
msgid "shared a message with you!" |
|||
msgstr "" |
|||
|
@ -0,0 +1,326 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * muk_web_utils |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 12.0-20190128\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2019-02-27 09:28+0000\n" |
|||
"PO-Revision-Date: 2019-02-27 09:28+0000\n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/color.js:113 |
|||
#, python-format |
|||
msgid "'%s' is not a correct color index (0-12)" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/color.js:68 |
|||
#, python-format |
|||
msgid "'%s' is not a correct color value" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:175 |
|||
#, python-format |
|||
msgid "<%= name %> shared a file!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:115 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:144 |
|||
#, python-format |
|||
msgid "<%= name %> shared a message!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:116 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:145 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:176 |
|||
#, python-format |
|||
msgid "<%= value %>" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dialog.js:51 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:50 |
|||
#, python-format |
|||
msgid "Cancel" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:30 |
|||
#, python-format |
|||
msgid "Click on the download button to be redirected to the store and download the corresponding module." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:46 |
|||
#, python-format |
|||
msgid "Color 0" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:47 |
|||
#, python-format |
|||
msgid "Color 1" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:56 |
|||
#, python-format |
|||
msgid "Color 10" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:57 |
|||
#, python-format |
|||
msgid "Color 11" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:48 |
|||
#, python-format |
|||
msgid "Color 2" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:49 |
|||
#, python-format |
|||
msgid "Color 3" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:50 |
|||
#, python-format |
|||
msgid "Color 4" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:51 |
|||
#, python-format |
|||
msgid "Color 5" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:52 |
|||
#, python-format |
|||
msgid "Color 6" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:53 |
|||
#, python-format |
|||
msgid "Color 7" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:54 |
|||
#, python-format |
|||
msgid "Color 8" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:55 |
|||
#, python-format |
|||
msgid "Color 9" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model,name:muk_web_utils.model_res_config_settings |
|||
msgid "Config Settings" |
|||
msgstr "Paramètres de config" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:45 |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:97 |
|||
#, python-format |
|||
msgid "Download" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dropzone.js:108 |
|||
#, python-format |
|||
msgid "Drop files here to upload!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:45 |
|||
#, python-format |
|||
msgid "External" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model.fields,field_description:muk_web_utils.field_res_config_settings__binary_max_size |
|||
msgid "File Size Limit" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:35 |
|||
#, python-format |
|||
msgid "Internal" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/copy.js:107 |
|||
#, python-format |
|||
msgid "Link Copied!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:48 |
|||
#, python-format |
|||
msgid "Mail" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model_terms:ir.ui.view,arch_db:muk_web_utils.res_config_settings_view_form |
|||
msgid "Maximum allowed file size in MB" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model.fields,help:muk_web_utils.field_res_config_settings__binary_max_size |
|||
msgid "Maximum allowed file size in megabytes. Note that this setting only adjusts\n" |
|||
" the binary widgets accordingly. The maximum file size on your server can probably\n" |
|||
" be restricted in several places. Note that a large file size limit and therefore\n" |
|||
" large files in your system can significantly limit performance." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:38 |
|||
#, python-format |
|||
msgid "Message" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:59 |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:26 |
|||
#, python-format |
|||
msgid "Missing Module" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:42 |
|||
#, python-format |
|||
msgid "Note" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:83 |
|||
#, python-format |
|||
msgid "Open" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dialog.js:45 |
|||
#, python-format |
|||
msgid "Save" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:52 |
|||
#, python-format |
|||
msgid "Send" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:27 |
|||
#, python-format |
|||
msgid "Share" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:74 |
|||
#, python-format |
|||
msgid "Store" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/copy.js:35 |
|||
#, python-format |
|||
msgid "The field '%s' must be a binary field with an set attachment flag for the share widget to work." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:29 |
|||
#, python-format |
|||
msgid "The module could not be found on the server." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/async.js:46 |
|||
#, python-format |
|||
msgid "Upload" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/async.js:47 |
|||
#, python-format |
|||
msgid "Uploading..." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:95 |
|||
#, python-format |
|||
msgid "shared a file with you!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:81 |
|||
#, python-format |
|||
msgid "shared a link with you!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:87 |
|||
#, python-format |
|||
msgid "shared a message with you!" |
|||
msgstr "" |
|||
|
@ -0,0 +1,326 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * muk_web_utils |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 12.0-20190128\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2019-02-27 09:28+0000\n" |
|||
"PO-Revision-Date: 2019-02-27 09:28+0000\n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/color.js:113 |
|||
#, python-format |
|||
msgid "'%s' is not a correct color index (0-12)" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/color.js:68 |
|||
#, python-format |
|||
msgid "'%s' is not a correct color value" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:175 |
|||
#, python-format |
|||
msgid "<%= name %> shared a file!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:115 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:144 |
|||
#, python-format |
|||
msgid "<%= name %> shared a message!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:116 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:145 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:176 |
|||
#, python-format |
|||
msgid "<%= value %>" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dialog.js:51 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:50 |
|||
#, python-format |
|||
msgid "Cancel" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:30 |
|||
#, python-format |
|||
msgid "Click on the download button to be redirected to the store and download the corresponding module." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:46 |
|||
#, python-format |
|||
msgid "Color 0" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:47 |
|||
#, python-format |
|||
msgid "Color 1" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:56 |
|||
#, python-format |
|||
msgid "Color 10" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:57 |
|||
#, python-format |
|||
msgid "Color 11" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:48 |
|||
#, python-format |
|||
msgid "Color 2" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:49 |
|||
#, python-format |
|||
msgid "Color 3" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:50 |
|||
#, python-format |
|||
msgid "Color 4" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:51 |
|||
#, python-format |
|||
msgid "Color 5" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:52 |
|||
#, python-format |
|||
msgid "Color 6" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:53 |
|||
#, python-format |
|||
msgid "Color 7" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:54 |
|||
#, python-format |
|||
msgid "Color 8" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:55 |
|||
#, python-format |
|||
msgid "Color 9" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model,name:muk_web_utils.model_res_config_settings |
|||
msgid "Config Settings" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:45 |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:97 |
|||
#, python-format |
|||
msgid "Download" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dropzone.js:108 |
|||
#, python-format |
|||
msgid "Drop files here to upload!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:45 |
|||
#, python-format |
|||
msgid "External" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model.fields,field_description:muk_web_utils.field_res_config_settings__binary_max_size |
|||
msgid "File Size Limit" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:35 |
|||
#, python-format |
|||
msgid "Internal" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/copy.js:107 |
|||
#, python-format |
|||
msgid "Link Copied!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:48 |
|||
#, python-format |
|||
msgid "Mail" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model_terms:ir.ui.view,arch_db:muk_web_utils.res_config_settings_view_form |
|||
msgid "Maximum allowed file size in MB" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model.fields,help:muk_web_utils.field_res_config_settings__binary_max_size |
|||
msgid "Maximum allowed file size in megabytes. Note that this setting only adjusts\n" |
|||
" the binary widgets accordingly. The maximum file size on your server can probably\n" |
|||
" be restricted in several places. Note that a large file size limit and therefore\n" |
|||
" large files in your system can significantly limit performance." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:38 |
|||
#, python-format |
|||
msgid "Message" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:59 |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:26 |
|||
#, python-format |
|||
msgid "Missing Module" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:42 |
|||
#, python-format |
|||
msgid "Note" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:83 |
|||
#, python-format |
|||
msgid "Open" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dialog.js:45 |
|||
#, python-format |
|||
msgid "Save" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:52 |
|||
#, python-format |
|||
msgid "Send" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:27 |
|||
#, python-format |
|||
msgid "Share" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:74 |
|||
#, python-format |
|||
msgid "Store" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/copy.js:35 |
|||
#, python-format |
|||
msgid "The field '%s' must be a binary field with an set attachment flag for the share widget to work." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:29 |
|||
#, python-format |
|||
msgid "The module could not be found on the server." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/async.js:46 |
|||
#, python-format |
|||
msgid "Upload" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/async.js:47 |
|||
#, python-format |
|||
msgid "Uploading..." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:95 |
|||
#, python-format |
|||
msgid "shared a file with you!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:81 |
|||
#, python-format |
|||
msgid "shared a link with you!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:87 |
|||
#, python-format |
|||
msgid "shared a message with you!" |
|||
msgstr "" |
|||
|
@ -0,0 +1,326 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * muk_web_utils |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 12.0-20190128\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2019-02-27 09:28+0000\n" |
|||
"PO-Revision-Date: 2019-02-27 09:28+0000\n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/color.js:113 |
|||
#, python-format |
|||
msgid "'%s' is not a correct color index (0-12)" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/color.js:68 |
|||
#, python-format |
|||
msgid "'%s' is not a correct color value" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:175 |
|||
#, python-format |
|||
msgid "<%= name %> shared a file!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:115 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:144 |
|||
#, python-format |
|||
msgid "<%= name %> shared a message!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:116 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:145 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/share.js:176 |
|||
#, python-format |
|||
msgid "<%= value %>" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dialog.js:51 |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:50 |
|||
#, python-format |
|||
msgid "Cancel" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:30 |
|||
#, python-format |
|||
msgid "Click on the download button to be redirected to the store and download the corresponding module." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:46 |
|||
#, python-format |
|||
msgid "Color 0" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:47 |
|||
#, python-format |
|||
msgid "Color 1" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:56 |
|||
#, python-format |
|||
msgid "Color 10" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:57 |
|||
#, python-format |
|||
msgid "Color 11" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:48 |
|||
#, python-format |
|||
msgid "Color 2" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:49 |
|||
#, python-format |
|||
msgid "Color 3" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:50 |
|||
#, python-format |
|||
msgid "Color 4" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:51 |
|||
#, python-format |
|||
msgid "Color 5" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:52 |
|||
#, python-format |
|||
msgid "Color 6" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:53 |
|||
#, python-format |
|||
msgid "Color 7" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:54 |
|||
#, python-format |
|||
msgid "Color 8" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/color.xml:55 |
|||
#, python-format |
|||
msgid "Color 9" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model,name:muk_web_utils.model_res_config_settings |
|||
msgid "Config Settings" |
|||
msgstr "Configuratie instellingen" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:45 |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:97 |
|||
#, python-format |
|||
msgid "Download" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dropzone.js:108 |
|||
#, python-format |
|||
msgid "Drop files here to upload!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:45 |
|||
#, python-format |
|||
msgid "External" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model.fields,field_description:muk_web_utils.field_res_config_settings__binary_max_size |
|||
msgid "File Size Limit" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:35 |
|||
#, python-format |
|||
msgid "Internal" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/copy.js:107 |
|||
#, python-format |
|||
msgid "Link Copied!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:48 |
|||
#, python-format |
|||
msgid "Mail" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model_terms:ir.ui.view,arch_db:muk_web_utils.res_config_settings_view_form |
|||
msgid "Maximum allowed file size in MB" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#: model:ir.model.fields,help:muk_web_utils.field_res_config_settings__binary_max_size |
|||
msgid "Maximum allowed file size in megabytes. Note that this setting only adjusts\n" |
|||
" the binary widgets accordingly. The maximum file size on your server can probably\n" |
|||
" be restricted in several places. Note that a large file size limit and therefore\n" |
|||
" large files in your system can significantly limit performance." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:38 |
|||
#, python-format |
|||
msgid "Message" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:59 |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:26 |
|||
#, python-format |
|||
msgid "Missing Module" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:42 |
|||
#, python-format |
|||
msgid "Note" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:83 |
|||
#, python-format |
|||
msgid "Open" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/dialog.js:45 |
|||
#, python-format |
|||
msgid "Save" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:52 |
|||
#, python-format |
|||
msgid "Send" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:27 |
|||
#, python-format |
|||
msgid "Share" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/module.js:74 |
|||
#, python-format |
|||
msgid "Store" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/fields/copy.js:35 |
|||
#, python-format |
|||
msgid "The field '%s' must be a binary field with an set attachment flag for the share widget to work." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/module.xml:29 |
|||
#, python-format |
|||
msgid "The module could not be found on the server." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/async.js:46 |
|||
#, python-format |
|||
msgid "Upload" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/js/core/async.js:47 |
|||
#, python-format |
|||
msgid "Uploading..." |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:95 |
|||
#, python-format |
|||
msgid "shared a file with you!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:81 |
|||
#, python-format |
|||
msgid "shared a link with you!" |
|||
msgstr "" |
|||
|
|||
#. module: muk_web_utils |
|||
#. openerp-web |
|||
#: code:addons/muk_web_utils/static/src/xml/share.xml:87 |
|||
#, python-format |
|||
msgid "shared a message with you!" |
|||
msgstr "" |
|||
|
@ -0,0 +1,25 @@ |
|||
################################################################################### |
|||
# |
|||
# Copyright (c) 2017-2019 MuK IT GmbH. |
|||
# |
|||
# This file is part of MuK Web Utils |
|||
# (see https://mukit.at). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Lesser General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
from . import ir_attachment |
|||
from . import res_config_settings |
|||
|
@ -0,0 +1,46 @@ |
|||
################################################################################### |
|||
# |
|||
# Copyright (c) 2017-2019 MuK IT GmbH. |
|||
# |
|||
# This file is part of MuK Web Utils |
|||
# (see https://mukit.at). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Lesser General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
import base64 |
|||
import logging |
|||
import mimetypes |
|||
|
|||
from odoo import api, models, fields, _ |
|||
from odoo.exceptions import AccessError |
|||
from odoo.tools.mimetypes import guess_mimetype |
|||
|
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
class IrAttachment(models.Model): |
|||
|
|||
_inherit = 'ir.attachment' |
|||
|
|||
#---------------------------------------------------------- |
|||
# Database |
|||
#---------------------------------------------------------- |
|||
|
|||
temporary = fields.Boolean( |
|||
string="Temporary", |
|||
default=False, |
|||
help="Attachments will be deleted by Autovacuum.", |
|||
) |
|||
|
@ -0,0 +1,79 @@ |
|||
################################################################################### |
|||
# |
|||
# Copyright (c) 2017-2019 MuK IT GmbH. |
|||
# |
|||
# This file is part of MuK Web Utils |
|||
# (see https://mukit.at). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Lesser General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
import re |
|||
import json |
|||
import logging |
|||
|
|||
from lxml import etree |
|||
|
|||
from odoo import api, fields, models |
|||
|
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
class ResConfigSettings(models.TransientModel): |
|||
|
|||
_inherit = 'res.config.settings' |
|||
|
|||
#---------------------------------------------------------- |
|||
# Database |
|||
#---------------------------------------------------------- |
|||
|
|||
binary_max_size = fields.Integer( |
|||
string='File Size Limit', |
|||
required=True, |
|||
default=25, |
|||
help="""Maximum allowed file size in megabytes. Note that this setting only adjusts |
|||
the binary widgets accordingly. The maximum file size on your server can probably |
|||
be restricted in several places. Note that a large file size limit and therefore |
|||
large files in your system can significantly limit performance.""") |
|||
|
|||
#---------------------------------------------------------- |
|||
# Functions |
|||
#---------------------------------------------------------- |
|||
|
|||
def set_values(self): |
|||
res = super(ResConfigSettings, self).set_values() |
|||
param = self.env['ir.config_parameter'].with_user(self.env.ref('base.user_admin')) |
|||
param.set_param('muk_web_utils.binary_max_size', self.binary_max_size) |
|||
return res |
|||
|
|||
@api.model |
|||
def get_values(self): |
|||
res = super(ResConfigSettings, self).get_values() |
|||
params = self.env['ir.config_parameter'].with_user(self.env.ref('base.user_admin')) |
|||
res.update(binary_max_size=int(params.get_param('muk_web_utils.binary_max_size', 25))) |
|||
return res |
|||
|
|||
@api.model |
|||
def fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False): |
|||
ret_val = super(ResConfigSettings, self).fields_view_get( |
|||
view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu) |
|||
modules = self.env['ir.module.module'].with_user(self.env.ref('base.user_admin')).search([]).mapped('name') |
|||
document = etree.XML(ret_val['arch']) |
|||
for field in ret_val['fields']: |
|||
if field.startswith("module_") and field[len("module_"):] not in modules: |
|||
for node in document.xpath("//field[@name='%s']" % field): |
|||
if node.get("widget") != 'upgrade_boolean': |
|||
node.set("widget", "module_boolean") |
|||
ret_val['arch'] = etree.tostring(document, encoding='unicode') |
|||
return ret_val |
After Width: 880 | Height: 440 | Size: 45 KiB |
After Width: 250 | Height: 250 | Size: 15 KiB |
1
muk_web_utils/static/description/icon.svg
File diff suppressed because it is too large
View File
@ -0,0 +1,124 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">MuK Web Utils</h2> |
|||
<h3 class="oe_slogan">Utility Features</h3> |
|||
<h4 class="oe_slogan" style="font-size: 23px;">MuK IT GmbH - |
|||
www.mukit.at</h4> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="text-justify" style="max-width: 84%; margin: 16px 8%;"> |
|||
<h3 class="oe_slogan">Overview</h3> |
|||
<p class="oe_mt32">Technical module to provide some utility |
|||
features. The module is mainly used as a dependency by other modules |
|||
and to provide a collection of common libraries. It has no direct |
|||
visible effect on the system.</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h3 class="oe_slogan">Our Services</h3> |
|||
<div |
|||
style="display: flex; padding-top: 20px; justify-content: space-between;"> |
|||
<div style="flex-basis: 18%;"> |
|||
<a href="https://mukit.at/r/MQ5" target="_blank"> |
|||
<div |
|||
style="width: 75px; height: 75px; border-radius: 100%; margin: auto;"> |
|||
<img src="service_implementation.png" |
|||
style="width: 100%; border-radius: 100%;"> |
|||
</div> |
|||
<h3 class="oe_slogan" |
|||
style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 14px; color: #000 !important; margin-top: 5px; opacity: 1 !important; line-height: 17px;"> |
|||
Odoo <br>Implementation |
|||
</h3> |
|||
</a> |
|||
</div> |
|||
<div style="flex-basis: 18%;"> |
|||
<a href="https://mukit.at/r/u7c" target="_blank"> |
|||
<div |
|||
style="width: 75px; height: 75px; border-radius: 100%; margin: auto;"> |
|||
<img src="service_integration.png" |
|||
style="width: 100%; border-radius: 100%;"> |
|||
</div> |
|||
<h3 class="oe_slogan" |
|||
style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 14px; color: #000 !important; margin-top: 5px; opacity: 1 !important; line-height: 17px;"> |
|||
Odoo <br>Integration |
|||
</h3> |
|||
</a> |
|||
</div> |
|||
<div style="flex-basis: 18%;"> |
|||
<a href="https://mukit.at/r/xDJ" target="_blank"> |
|||
<div |
|||
style="width: 75px; height: 75px; border-radius: 100%; margin: auto;"> |
|||
<img src="service_customization.png" |
|||
style="width: 100%; border-radius: 100%;"> |
|||
</div> |
|||
<h3 class="oe_slogan" |
|||
style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 14px; color: #000 !important; margin-top: 5px; opacity: 1 !important; line-height: 17px;"> |
|||
Odoo <br>Customization |
|||
</h3> |
|||
</a> |
|||
</div> |
|||
<div style="flex-basis: 18%;"> |
|||
<a href=" https://mukit.at/r/J3A" target="_blank"> |
|||
<div |
|||
style="width: 75px; height: 75px; border-radius: 100%; margin: auto;"> |
|||
<img src="service_development.png" |
|||
style="width: 100%; border-radius: 100%;"> |
|||
</div> |
|||
<h3 class="oe_slogan" |
|||
style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 14px; color: #000 !important; margin-top: 5px; opacity: 1 !important; line-height: 17px;"> |
|||
Odoo <br>Development |
|||
</h3> |
|||
</a> |
|||
</div> |
|||
<div style="flex-basis: 18%;"> |
|||
<a href=" https://mukit.at/r/R1v" target="_blank"> |
|||
<div |
|||
style="width: 75px; height: 75px; border-radius: 100%; margin: auto;"> |
|||
<img src="service_support.png" |
|||
style="width: 100%; border-radius: 100%;"> |
|||
</div> |
|||
<h3 class="oe_slogan" |
|||
style="text-align: center; font-size: 14px; width: 100%; margin: 0; margin-top: 14px; color: #000 !important; margin-top: 5px; opacity: 1 !important; line-height: 17px;"> |
|||
Odoo <br>Support |
|||
</h3> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container" style="padding: 32px 0;"> |
|||
<div class="oe_row oe_spaced" style="margin: auto;"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<a href="https://mukit.at/r/SgN" target="_blank"> <img src="preview.png"> |
|||
</a> |
|||
</div> |
|||
</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="https://mukit.at" target="_blank"> |
|||
<i class="fa fa-globe"></i> Website |
|||
</a> |
|||
<a class="btn btn-primary btn-lg mt8" href="mailto:sale@mukit.at"> |
|||
<i class="fa fa-envelope"></i> Contact Us |
|||
</a> |
|||
<a class="btn btn-primary btn-lg mt8" href="https://github.com/muk-it" target="_blank"> |
|||
<i class="fa fa-github"></i> Issues |
|||
</a> |
|||
</div> |
|||
<img src="logo.png" |
|||
style="width: 200px; margin-bottom: 20px; display: block;" |
|||
class="mx-auto center-block"> |
|||
</section> |
After Width: 500 | Height: 500 | Size: 37 KiB |
After Width: 1000 | Height: 200 | Size: 32 KiB |
After Width: 250 | Height: 250 | Size: 27 KiB |
After Width: 250 | Height: 250 | Size: 28 KiB |
After Width: 250 | Height: 250 | Size: 26 KiB |
After Width: 250 | Height: 250 | Size: 24 KiB |
After Width: 250 | Height: 250 | Size: 24 KiB |
@ -0,0 +1,160 @@ |
|||
[data-simplebar] { |
|||
position: relative; |
|||
flex-direction: column; |
|||
flex-wrap: wrap; |
|||
justify-content: flex-start; |
|||
align-content: flex-start; |
|||
align-items: flex-start; |
|||
width: inherit; |
|||
height: inherit; |
|||
max-width: inherit; |
|||
max-height: inherit; |
|||
} |
|||
|
|||
.simplebar-offset { |
|||
direction: inherit !important; |
|||
box-sizing: inherit !important; |
|||
resize: none !important; |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
bottom: 0; |
|||
right: 0; |
|||
padding: 0; |
|||
margin: 0; |
|||
-webkit-overflow-scrolling: touch; |
|||
} |
|||
|
|||
.simplebar-content { |
|||
direction: inherit; |
|||
box-sizing: border-box !important; |
|||
position: relative; |
|||
display: block; |
|||
height: 100%; /* Required for horizontal native scrollbar to not appear if parent is taller than natural height */ |
|||
width: auto; |
|||
visibility: visible; |
|||
overflow: scroll; /* Scroll on this element otherwise element can't have a padding applied properly */ |
|||
max-width: 100%; /* Not required for horizontal scroll to trigger */ |
|||
max-height: 100%; /* Needed for vertical scroll to trigger */ |
|||
} |
|||
|
|||
.simplebar-placeholder { |
|||
max-height: 100%; |
|||
max-width: 100%; |
|||
width: 100%; |
|||
pointer-events: none; |
|||
} |
|||
|
|||
.simplebar-height-auto-observer-wrapper { |
|||
box-sizing: inherit !important; |
|||
height: 100%; |
|||
width: inherit; |
|||
max-width: 1px; |
|||
position: relative; |
|||
float: left; |
|||
max-height: 1px; |
|||
overflow: hidden; |
|||
z-index: -1; |
|||
padding: 0; |
|||
margin: 0; |
|||
pointer-events: none; |
|||
flex-grow: inherit; |
|||
flex-shrink: 0; |
|||
flex-basis: 0; |
|||
} |
|||
|
|||
.simplebar-height-auto-observer { |
|||
box-sizing: inherit; |
|||
display: block; |
|||
opacity: 0; |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
height: 1000%; |
|||
width: 1000%; |
|||
min-height: 1px; |
|||
min-width: 1px; |
|||
overflow: hidden; |
|||
pointer-events: none; |
|||
z-index: -1; |
|||
} |
|||
|
|||
.simplebar-track { |
|||
z-index: 1; |
|||
position: absolute; |
|||
right: 0; |
|||
bottom: 0; |
|||
pointer-events: none; |
|||
} |
|||
|
|||
.simplebar-scrollbar { |
|||
position: absolute; |
|||
right: 2px; |
|||
width: 7px; |
|||
min-height: 10px; |
|||
} |
|||
|
|||
.simplebar-scrollbar:before { |
|||
position: absolute; |
|||
content: ""; |
|||
background: black; |
|||
border-radius: 7px; |
|||
left: 0; |
|||
right: 0; |
|||
opacity: 0; |
|||
transition: opacity 0.2s linear; |
|||
} |
|||
|
|||
.simplebar-track .simplebar-scrollbar.simplebar-visible:before { |
|||
/* When hovered, remove all transitions from drag handle */ |
|||
opacity: 0.5; |
|||
transition: opacity 0s linear; |
|||
} |
|||
|
|||
.simplebar-track.simplebar-vertical { |
|||
top: 0; |
|||
width: 11px; |
|||
} |
|||
|
|||
.simplebar-track.simplebar-vertical .simplebar-scrollbar:before { |
|||
top: 2px; |
|||
bottom: 2px; |
|||
} |
|||
|
|||
.simplebar-track.simplebar-horizontal { |
|||
left: 0; |
|||
height: 11px; |
|||
} |
|||
|
|||
.simplebar-track.simplebar-horizontal .simplebar-scrollbar:before { |
|||
height: 100%; |
|||
left: 2px; |
|||
right: 2px; |
|||
} |
|||
|
|||
.simplebar-track.simplebar-horizontal .simplebar-scrollbar { |
|||
right: auto; |
|||
left: 0; |
|||
top: 2px; |
|||
height: 7px; |
|||
min-height: 0; |
|||
min-width: 10px; |
|||
width: auto; |
|||
} |
|||
|
|||
/* Rtl support */ |
|||
[data-simplebar-direction="rtl"] .simplebar-track.simplebar-vertical { |
|||
right: auto; |
|||
left: 0; |
|||
} |
|||
|
|||
.hs-dummy-scrollbar-size { |
|||
direction: rtl; |
|||
position: fixed; |
|||
opacity: 0; |
|||
visibility: hidden; |
|||
height: 500px; |
|||
width: 500px; |
|||
overflow-y: hidden; |
|||
overflow-x: scroll; |
|||
} |
4389
muk_web_utils/static/libs/simplebar/simplebar.js
File diff suppressed because it is too large
View File
After Width: 300 | Height: 150 | Size: 4.8 KiB |
@ -0,0 +1,85 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.async', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
var syncLoop = function(items, func, callback) { |
|||
items.reduce(function(promise, item) { |
|||
return promise.then(func.bind(this, item)); |
|||
}, $.Deferred().resolve()).then(callback); |
|||
}; |
|||
|
|||
var syncProgress = function(items, func, callback, update) { |
|||
var progress = 0; |
|||
items.reduce(function(promise, item) { |
|||
return promise.then(function() { |
|||
update(++progress / items.length); |
|||
return func(item); |
|||
}); |
|||
}, $.Deferred().resolve()).then(callback); |
|||
}; |
|||
|
|||
var createNotification = function(widget, title) { |
|||
return widget.call('notification', 'notify', { |
|||
title: title || _t('Upload'), |
|||
message: _t('Uploading...'), |
|||
icon: 'fa-upload', |
|||
sticky: true, |
|||
progress: { |
|||
text: "0%", |
|||
state: 0.0, |
|||
}, |
|||
}); |
|||
}; |
|||
|
|||
var updateNotification = function(widget, notification, progress) { |
|||
widget.call('notification', 'progress', notification, { |
|||
text: (progress * 100).toFixed(2) + "%", |
|||
state: (progress * 100).toFixed(2), |
|||
}); |
|||
}; |
|||
|
|||
var closeNotification = function(widget, notification) { |
|||
widget.call('notification', 'close', notification); |
|||
}; |
|||
|
|||
var syncNotification = function(widget, title, items, func, callback) { |
|||
var notification = createNotification(widget, title); |
|||
var update = _.partial(updateNotification, widget, notification); |
|||
syncProgress(items, func, function() { |
|||
Promise.resolve(closeNotification(widget, notification)).then(callback); |
|||
}, update); |
|||
}; |
|||
|
|||
return { |
|||
syncLoop: syncLoop, |
|||
syncProgress: syncProgress, |
|||
syncNotification: syncNotification, |
|||
}; |
|||
|
|||
}); |
@ -0,0 +1,68 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.Dialog', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
|
|||
var Dialog = require('web.Dialog'); |
|||
|
|||
var QWeb = core.qweb; |
|||
var _t = core._t; |
|||
|
|||
Dialog.input = function (owner, title, options) { |
|||
var $content = $('<main/>'); |
|||
var $input = $('<input/>', { |
|||
type: 'text', |
|||
class: options && options.input && options.input.class, |
|||
value: options && options.input && options.input.value, |
|||
}); |
|||
$content.append($input); |
|||
var confirm = function(event) { |
|||
if(options && options.confirm_callback) { |
|||
options.confirm_callback.call(self, event, $input.val()); |
|||
} |
|||
} |
|||
var buttons = [ |
|||
{ |
|||
text: _t("Save"), |
|||
classes: 'btn-primary', |
|||
close: true, |
|||
click: confirm, |
|||
}, |
|||
{ |
|||
text: _t("Cancel"), |
|||
close: true, |
|||
click: options && options.cancel_callback |
|||
} |
|||
]; |
|||
return new Dialog(owner, _.extend({ |
|||
size: 'medium', |
|||
buttons: buttons, |
|||
$content: $content, |
|||
title: title, |
|||
}, options)).open({shouldFocusButtons:true}); |
|||
}; |
|||
|
|||
|
|||
}); |
@ -0,0 +1,132 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.dropzone', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
var DropzoneMixin = { |
|||
dropzoneData: {}, |
|||
dropzoneClasses: ['mk_dropzone'], |
|||
_checkDropzoneEvent: function(event) { |
|||
return true; |
|||
}, |
|||
_startDropzone: function($dropzone) { |
|||
if(this.$dropzone) { |
|||
this._destroyDropzone(); |
|||
} |
|||
this.$dropzone = $dropzone; |
|||
this.$dropzone.dndHover().on({ |
|||
'dndHoverStart.dropzone': this._hoverDropzoneEnter.bind(this), |
|||
'dndHoverEnd.dropzone': this._hoverDropzoneLeave.bind(this), |
|||
}); |
|||
this.$dropzone.on('dragenter.dropzone', this._dragenterDropzone.bind(this)); |
|||
this.$dropzone.on('dragover.dropzone', this._dragoverDropzone.bind(this)); |
|||
this.$dropzone.on('dragleave.dropzone', this._dragleaveDropzone.bind(this)); |
|||
this.$dropzone.on('drop.dropzone', this._dropDropzone.bind(this)); |
|||
_.each(this.dropzoneData, function(value, key) { |
|||
this.$dropzone.attr(key, value) |
|||
}, this); |
|||
}, |
|||
_destroyDropzone: function() { |
|||
if(this.$dropzone) { |
|||
this.$dropzone.off('.dropzone'); |
|||
this.$dropzone.dndHover('destroy'); |
|||
_.each(this.dropzoneData, function(value, key) { |
|||
this.$dropzone.removeAttr(key) |
|||
}, this); |
|||
this.$dropzone = false; |
|||
} |
|||
}, |
|||
_toggleDropzone: function(state) { |
|||
this.$dropzone.toggleClass(this.dropzoneClasses.join(" "), state); |
|||
}, |
|||
_hoverDropzoneEnter: function(event, originalEvent) { |
|||
if(this._checkDropzoneEvent(originalEvent)) { |
|||
this._toggleDropzone(true); |
|||
event.preventDefault(); |
|||
return false; |
|||
} |
|||
}, |
|||
_hoverDropzoneLeave: function(event, originalEvent) { |
|||
this._toggleDropzone(false); |
|||
event.stopPropagation(); |
|||
event.preventDefault(); |
|||
return false; |
|||
}, |
|||
_handleDrag: function(event) { |
|||
}, |
|||
_handleDrop: function(event) { |
|||
}, |
|||
_dragenterDropzone: function(event) { |
|||
if(this._checkDropzoneEvent(event)) { |
|||
event.preventDefault(); |
|||
} |
|||
}, |
|||
_dragoverDropzone: function(event) { |
|||
if(this._checkDropzoneEvent(event)) { |
|||
event.preventDefault(); |
|||
this._handleDrag(event); |
|||
} |
|||
}, |
|||
_dragleaveDropzone: function(event) { |
|||
if(this._checkDropzoneEvent(event)) { |
|||
event.preventDefault(); |
|||
} |
|||
}, |
|||
_dropDropzone: function(event) { |
|||
if(this._checkDropzoneEvent(event)) { |
|||
event.preventDefault(); |
|||
// event.stopPropagation();
|
|||
this._handleDrop(event); |
|||
} |
|||
} |
|||
}; |
|||
|
|||
var FileDropzoneMixin = _.extend({}, DropzoneMixin, { |
|||
dropzoneData: { |
|||
'data-dropzone-text': _t("Drop files here to upload!"), |
|||
}, |
|||
dropzoneClasses: DropzoneMixin.dropzoneClasses.concat(['mk_dropzone_file']), |
|||
dropzoneCheck: window.File && window.FileReader && window.FileList && window.Blob, |
|||
_checkDropzoneEvent: function(event) { |
|||
var dataTransfer = event.originalEvent && event.originalEvent.dataTransfer; |
|||
var fileCheck = dataTransfer && _.some(dataTransfer.types, function(type) { |
|||
return type == "Files"; |
|||
}); |
|||
return this.dropzoneCheck && fileCheck; |
|||
}, |
|||
_handleDrag: function(event) { |
|||
event.originalEvent.dataTransfer.dropEffect = 'copy'; |
|||
}, |
|||
}); |
|||
|
|||
return { |
|||
DropzoneMixin: DropzoneMixin, |
|||
FileDropzoneMixin: FileDropzoneMixin, |
|||
}; |
|||
|
|||
}); |
@ -0,0 +1,176 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.files', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
|
|||
var QWeb = core.qweb; |
|||
var _t = core._t; |
|||
|
|||
var traverseItems = function(items, tree) { |
|||
var def = $.Deferred(); |
|||
var files = []; |
|||
var defs = []; |
|||
_.each(items, function(item, index) { |
|||
var entry = item.webkitGetAsEntry(); |
|||
if(entry) { |
|||
var traverse = $.Deferred(); |
|||
traverseEntry(entry, tree).then(function(result) { |
|||
if(tree) { |
|||
files = files.concat(result); |
|||
} else { |
|||
files = _.union(files, result); |
|||
} |
|||
traverse.resolve(); |
|||
}); |
|||
defs.push(traverse); |
|||
} else { |
|||
var file = item.getAsFile(); |
|||
if(file) { |
|||
if(file.size) { |
|||
files.push(_.extend({}, file, {isFileItem: true})); |
|||
} |
|||
} else { |
|||
console.warn("Your browser doesn't support Drag and Drop!"); |
|||
} |
|||
} |
|||
}); |
|||
Promise.resolve().apply($, defs).then(function () { |
|||
def.resolve(files); |
|||
}); |
|||
return def; |
|||
}; |
|||
|
|||
var traverseEntries = function(entries, tree) { |
|||
var def = $.Deferred(); |
|||
var files = []; |
|||
var defs = []; |
|||
_.each(entries, function(entry, index) { |
|||
var traverse = $.Deferred(); |
|||
traverseEntry(entry, tree).then(function(result) { |
|||
if(tree) { |
|||
files = files.concat(result); |
|||
} else { |
|||
files = _.union(files, result); |
|||
} |
|||
traverse.resolve(); |
|||
}); |
|||
defs.push(traverse); |
|||
}); |
|||
Promise.resolve().apply($, defs).then(function () { |
|||
def.resolve(files); |
|||
}); |
|||
return def; |
|||
} |
|||
|
|||
var traverseEntry = function(entry, tree) { |
|||
var def = $.Deferred(); |
|||
if(entry.isFile) { |
|||
def.resolve([entry]); |
|||
} else if(entry.isDirectory) { |
|||
entry.createReader().readEntries(function (entries) { |
|||
traverseEntries(entries, tree).then(function (files) { |
|||
if(tree) { |
|||
def.resolve([{ |
|||
name: entry.name, |
|||
files: files, |
|||
isFile: false, |
|||
isDirectory: true, |
|||
childCount: files.length, |
|||
fullPath: entry.fullPath, |
|||
fileCount: _.reduce(files, function(sum, item) { |
|||
return item.isFile ? sum + 1 : sum + item.fileCount || 0; |
|||
}, 0), |
|||
}]); |
|||
} else { |
|||
def.resolve(files); |
|||
} |
|||
}); |
|||
}); |
|||
} else { |
|||
def.resolve([]); |
|||
} |
|||
return def; |
|||
}; |
|||
|
|||
var getFileTree = function(items, count) { |
|||
var traverse = traverseItems(items, true); |
|||
if(count) { |
|||
var def = $.Deferred(); |
|||
traverse.then(function(files) { |
|||
def.resolve({ |
|||
files: files, |
|||
count: _.reduce(files, function(sum, item) { |
|||
return item.isFile ? sum + 1 : sum + item.fileCount || 0; |
|||
}, 0), |
|||
}); |
|||
}); |
|||
return def; |
|||
} |
|||
return traverse; |
|||
}; |
|||
|
|||
var getFileList = function(items, count) { |
|||
var traverse = traverseItems(items, false); |
|||
if(count) { |
|||
var def = $.Deferred(); |
|||
traverse.then(function(files) { |
|||
def.resolve({ |
|||
files: files, |
|||
count: files.length, |
|||
}); |
|||
|
|||
}); |
|||
return def; |
|||
} |
|||
return traverse; |
|||
}; |
|||
|
|||
var loadFile = function(file, callback) { |
|||
var fileReader = new FileReader(); |
|||
fileReader.readAsDataURL(file); |
|||
fileReader.onloadend = callback; |
|||
}; |
|||
|
|||
var readFile = function(file, callback) { |
|||
if(file.isFile) { |
|||
file.file(function(file) { |
|||
loadFile(file, callback); |
|||
}); |
|||
} else { |
|||
loadFile(file, callback); |
|||
} |
|||
}; |
|||
|
|||
return { |
|||
traverseItems: traverseItems, |
|||
traverseEntries: traverseEntries, |
|||
traverseEntry: traverseEntry, |
|||
getFileTree: getFileTree, |
|||
getFileList: getFileList, |
|||
loadFile: loadFile, |
|||
readFile: readFile, |
|||
}; |
|||
|
|||
}); |
@ -0,0 +1,110 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.mimetype', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
var utils = require('web.utils'); |
|||
|
|||
var QWeb = core.qweb; |
|||
var _t = core._t; |
|||
|
|||
var mapping = [ |
|||
['file-image-o', /^image\//], |
|||
['file-audio-o', /^audio\//], |
|||
['file-video-o', /^video\//], |
|||
['file-pdf-o', 'application/pdf'], |
|||
['file-text-o', 'text/plain'], |
|||
['file-code-o', [ |
|||
'text/html', |
|||
'text/javascript', |
|||
'application/javascript' |
|||
]], |
|||
['file-archive-o', [ |
|||
/^application\/x-(g?tar|xz|compress|bzip2|g?zip)$/, |
|||
/^application\/x-(7z|rar|zip)-compressed$/, |
|||
/^application\/(zip|gzip|tar)$/ |
|||
]], |
|||
['file-word-o', [ |
|||
/ms-?word/, 'application/vnd.oasis.opendocument.text', |
|||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' |
|||
]], |
|||
['file-powerpoint-o', [ |
|||
/ms-?powerpoint/, |
|||
'application/vnd.openxmlformats-officedocument.presentationml.presentation' |
|||
]], |
|||
['file-excel-o', [ |
|||
/ms-?excel/, |
|||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' |
|||
]], |
|||
['file-o' ] |
|||
]; |
|||
|
|||
function match(mimetype, cond) { |
|||
if (Array.isArray(cond)) { |
|||
return cond.reduce(function(v, c) { |
|||
return v || match(mimetype, c); |
|||
}, false); |
|||
} else if (cond instanceof RegExp) { |
|||
return cond.test(mimetype); |
|||
} else if (cond === undefined) { |
|||
return true; |
|||
} else { |
|||
return mimetype === cond; |
|||
} |
|||
} |
|||
|
|||
var cache = {}; |
|||
function resolve(mimetype) { |
|||
if (cache[mimetype]) { |
|||
return cache[mimetype]; |
|||
} |
|||
for (var i = 0; i < mapping.length; i++) { |
|||
if (match(mimetype, mapping[i][1])) { |
|||
cache[mimetype] = mapping[i][0]; |
|||
return mapping[i][0]; |
|||
} |
|||
} |
|||
} |
|||
|
|||
function mimetype2fa(mimetype, options) { |
|||
if (typeof mimetype === 'object') { |
|||
options = mimetype; |
|||
return function(mimetype) { |
|||
return mimetype2fa(mimetype, options); |
|||
}; |
|||
} else { |
|||
var icon = resolve(mimetype); |
|||
if (icon && options && options.prefix) { |
|||
return options.prefix + icon; |
|||
} else { |
|||
return icon; |
|||
} |
|||
} |
|||
} |
|||
|
|||
return { |
|||
mimetype2fa: mimetype2fa, |
|||
}; |
|||
|
|||
}); |
@ -0,0 +1,85 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.utils', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
var isUrl = function(string) { |
|||
var protocol = string.match(/^(?:\w+:)?\/\/(\S+)$/); |
|||
if (protocol && protocol[1]) { |
|||
var localHost = (/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/).test(protocol[1]); |
|||
var nonLocalHost = (/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/).test(protocol[1]); |
|||
return !!(localHost || nonLocalHost); |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
var parseText2Html= function(text) { |
|||
return text |
|||
.replace(/((?:https?|ftp):\/\/[\S]+)/g,'<a href="$1">$1</a> ') |
|||
.replace(/[\n\r]/g,'<br/>'); |
|||
} |
|||
|
|||
var closedRange = function(start, end) { |
|||
return _.range(start, end + 1); |
|||
} |
|||
|
|||
var partitionPageList = function(pages, page, size) { |
|||
if (!size || size < 5) { |
|||
throw "The size must be at least 5 to partition the list."; |
|||
} |
|||
var sideSize = size < 9 ? 1 : 2; |
|||
var leftSize = (size - sideSize * 2 - 3) >> 1; |
|||
var rightSize = (size - sideSize * 2 - 2) >> 1; |
|||
if (pages <= size) { |
|||
return closedRange(1, pages); |
|||
} |
|||
if (page <= size - sideSize - 1 - rightSize) { |
|||
return closedRange(1, size - sideSize - 1) |
|||
.concat([false]) |
|||
.concat(closedRange(pages - sideSize + 1, pages)); |
|||
} |
|||
if (page >= pages - sideSize - 1 - rightSize) { |
|||
return closedRange(1, sideSize) |
|||
.concat([false]) |
|||
.concat(closedRange(pages - sideSize - 1 - rightSize - leftSize, pages)); |
|||
} |
|||
return closedRange(1, sideSize) |
|||
.concat([false]) |
|||
.concat(closedRange(page - leftSize, page + rightSize)) |
|||
.concat([false]) |
|||
.concat(closedRange(pages - sideSize + 1, pages)); |
|||
} |
|||
|
|||
return { |
|||
isUrl: isUrl, |
|||
closedRange: closedRange, |
|||
parseText2Html: parseText2Html, |
|||
partitionPageList: partitionPageList, |
|||
}; |
|||
|
|||
}); |
@ -0,0 +1,46 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.abstract', function(require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
var session = require('web.session'); |
|||
var utils = require('web.field_utils'); |
|||
var fields = require('web.basic_fields'); |
|||
var registry = require('web.field_registry'); |
|||
|
|||
var AbstractField = require('web.AbstractField'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
AbstractField.include({ |
|||
isFocusable: function () { |
|||
if(!!this.attrs.skip_focus){ |
|||
return false; |
|||
} |
|||
return this._super.apply(this, arguments); |
|||
}, |
|||
}); |
|||
|
|||
}); |
@ -0,0 +1,86 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.binary', function(require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
var session = require('web.session'); |
|||
var utils = require('web.field_utils'); |
|||
var fields = require('web.basic_fields'); |
|||
var registry = require('web.field_registry'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
fields.FieldBinaryFile.extend({ |
|||
willStart: function () { |
|||
var def = this._rpc({ |
|||
route: '/config/muk_web_utils.binary_max_size', |
|||
}).then(function(result) { |
|||
this.max_upload_size = result.max_upload_size * 1024 * 1024; |
|||
}.bind(this)); |
|||
return this._super.apply(this, arguments); |
|||
}, |
|||
_renderReadonly: function () { |
|||
this._super.apply(this, arguments); |
|||
var $wrapper = $('<div/>', { |
|||
class: "mk_field_binary_wrapper" |
|||
}); |
|||
$wrapper.addClass(this.$el.attr('class')); |
|||
this.$el.removeClass("o_field_widget"); |
|||
this.$el.removeClass("o_hidden"); |
|||
$wrapper.append(this.$el); |
|||
this.setElement($wrapper); |
|||
}, |
|||
_renderEdit: function () { |
|||
this._super.apply(this, arguments); |
|||
if (this.nodeOptions && this.nodeOptions.accept) { |
|||
this.$('input[name="ufile"]').prop("accept", this.nodeOptions.accept); |
|||
} |
|||
}, |
|||
}); |
|||
|
|||
var FieldBinarySize = fields.FieldFloat.extend({ |
|||
init: function(parent, name, record) { |
|||
this._super.apply(this, arguments); |
|||
this.nodeOptions = _.defaults(this.nodeOptions, { |
|||
si: true, |
|||
}); |
|||
}, |
|||
_formatValue: function (value) { |
|||
var options = _.extend({}, |
|||
this.nodeOptions, |
|||
{ data: this.recordData }, |
|||
this.formatOptions |
|||
); |
|||
return utils.format['binary_size'](value, this.field, options) |
|||
}, |
|||
}); |
|||
|
|||
registry.add('binary_size', FieldBinarySize); |
|||
|
|||
return { |
|||
FieldBinarySize: FieldBinarySize, |
|||
}; |
|||
|
|||
}); |
@ -0,0 +1,130 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.color', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
var fields = require('web.basic_fields'); |
|||
var registry = require('web.field_registry'); |
|||
var colorpicker = require('web.colorpicker'); |
|||
|
|||
var AbstractField = require('web.AbstractField'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
var FieldColor = fields.InputField.extend({ |
|||
events: _.extend({}, fields.InputField.prototype.events, { |
|||
"click .mk_field_color_button": "_onCustomColorButtonClick", |
|||
}), |
|||
template: "muk_web_utils.FieldColor", |
|||
supportedFieldTypes: ['char'], |
|||
start: function() { |
|||
this.$input = this.$('.mk_field_color_input'); |
|||
return this._super.apply(this, arguments); |
|||
}, |
|||
_renderEdit: function () { |
|||
this.$('.mk_field_color_input').val( |
|||
this._formatValue(this.value) |
|||
); |
|||
this.$('.mk_field_color_input').css({ |
|||
'background-color': this._formatValue(this.value), |
|||
}); |
|||
}, |
|||
_renderReadonly: function () { |
|||
this.$el.text(this._formatValue(this.value)); |
|||
this.$el.css({'color': this._formatValue(this.value)}); |
|||
}, |
|||
_doAction: function() { |
|||
this._super.apply(this, arguments); |
|||
this.$('.mk_field_color_input').css({ |
|||
'background-color': this._getValue(), |
|||
}); |
|||
}, |
|||
_formatValue: function (value) { |
|||
return value; |
|||
}, |
|||
_parseValue: function (value) { |
|||
if((/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i).test(value)) { |
|||
return value; |
|||
} else { |
|||
throw new Error(_.str.sprintf(_t("'%s' is not a correct color value"), value)); |
|||
} |
|||
}, |
|||
_onCustomColorButtonClick: function () { |
|||
var ColorpickerDialog = new colorpicker(this, { |
|||
dialogClass: 'mk_field_color_picker', |
|||
defaultColor: this._getValue(), |
|||
}); |
|||
ColorpickerDialog.on('colorpicker:saved', this, function (event) { |
|||
this.$input.val(event.data.hex); |
|||
this._doAction(); |
|||
}); |
|||
ColorpickerDialog.open(); |
|||
}, |
|||
}); |
|||
|
|||
var FieldColorIndex = AbstractField.extend({ |
|||
events: _.extend({}, AbstractField.prototype.events, { |
|||
'change': '_onChange', |
|||
}), |
|||
template: 'muk_web_utils.FieldColorIndex', |
|||
supportedFieldTypes: ['integer'], |
|||
isSet: function () { |
|||
return this.value === 0 || this._super.apply(this, arguments); |
|||
}, |
|||
getFocusableElement: function () { |
|||
return this.$el.is('select') ? this.$el : $(); |
|||
}, |
|||
_renderEdit: function () { |
|||
this.$el.addClass('mk_color_index_' + this.value); |
|||
this.$('option[value="' + this.value + '"]').prop('selected', true); |
|||
}, |
|||
_renderReadonly: function () { |
|||
this.$el.addClass('mk_color_index_' + this.value); |
|||
this.$el.empty().text('Color ' + this._formatValue(this.value)); |
|||
}, |
|||
_onChange: function (event) { |
|||
this.$el.removeClass(function (index, className) { |
|||
return (className.match (/(^|\s)mk_color_index_\S+/g) || []).join(' '); |
|||
}); |
|||
this.$el.addClass('mk_color_index_' + this.$el.val()); |
|||
this._setValue(this.$el.val()); |
|||
}, |
|||
_parseValue: function (value) { |
|||
if(0 > value || value > 12) { |
|||
throw new Error(_.str.sprintf(_t("'%s' is not a correct color index (0-12)"), value)); |
|||
} |
|||
return value; |
|||
}, |
|||
}); |
|||
|
|||
registry.add('color_char', FieldColor); |
|||
registry.add('color_index', FieldColorIndex); |
|||
|
|||
return { |
|||
FieldColor: FieldColor, |
|||
FieldColorIndex: FieldColorIndex, |
|||
}; |
|||
|
|||
}); |
@ -0,0 +1,135 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.copy', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
var session = require('web.session'); |
|||
var fields = require('web.basic_fields'); |
|||
var registry = require('web.field_registry'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
var BinaryFileCopy = fields.FieldBinaryFile.extend({ |
|||
init: function () { |
|||
this._super.apply(this, arguments); |
|||
if (!this.field.attachment) { |
|||
throw _.str.sprintf(_t( |
|||
"The field '%s' must be a binary field with an set " + |
|||
"attachment flag for the share widget to work." |
|||
), this.field.string); |
|||
} |
|||
this.accessToken = !!this.nodeOptions.token; |
|||
}, |
|||
willStart: function() { |
|||
var def = this.value && this.res_id ? this._fetchShareUrl() : Promise.resolve(); |
|||
return Promise.resolve(this._super.apply(this, arguments), def); |
|||
}, |
|||
_fetchShareUrl: function() { |
|||
var self = this; |
|||
var def = $.Deferred(); |
|||
if (this.accessToken) { |
|||
this._rpc({ |
|||
model: 'ir.attachment', |
|||
method: 'search', |
|||
args: [[ |
|||
['res_id', '=', this.res_id], |
|||
['res_field', '=', this.name], |
|||
['res_model', '=', this.model], |
|||
]], |
|||
kwargs: { |
|||
context: session.user_context, |
|||
}, |
|||
}).then(function(attchments) { |
|||
self._rpc({ |
|||
model: 'ir.attachment', |
|||
method: 'generate_access_token', |
|||
args: attchments |
|||
}).then(function(access_token) { |
|||
self.shareUrl = session.url('/web/content', { |
|||
model: self.model, |
|||
field: self.name, |
|||
id: self.res_id, |
|||
access_token: access_token.shift(), |
|||
}); |
|||
def.resolve(); |
|||
}); |
|||
}); |
|||
} else { |
|||
this.shareUrl = session.url('/web/content', { |
|||
model: self.model, |
|||
field: self.name, |
|||
id: self.res_id, |
|||
}); |
|||
def.resolve(); |
|||
} |
|||
return def; |
|||
}, |
|||
_setUpClipboad: function() { |
|||
var self = this; |
|||
var $clipboardBtn = this.$('.mk_copy_binary'); |
|||
this.clipboard = new ClipboardJS($clipboardBtn[0], { |
|||
text: function (trigger) { |
|||
return self.shareUrl; |
|||
}, |
|||
container: self.$el[0] |
|||
}); |
|||
this.clipboard.on('success', function (event) { |
|||
_.defer(function () { |
|||
$clipboardBtn.tooltip('show'); |
|||
_.delay(function () { |
|||
$clipboardBtn.tooltip('hide'); |
|||
}, 800); |
|||
}); |
|||
}); |
|||
$clipboardBtn.click(function(event) { |
|||
event.stopPropagation(); |
|||
}); |
|||
$clipboardBtn.tooltip({ |
|||
title: _t('Link Copied!'), |
|||
trigger: 'manual', |
|||
placement: 'bottom' |
|||
}); |
|||
}, |
|||
_renderReadonly: function () { |
|||
this._super.apply(this, arguments); |
|||
this.$el.addClass('mk_field_copy'); |
|||
this.$el.append($(QWeb.render('muk_web_utils.BinaryFieldCopy'))); |
|||
this._setUpClipboad(); |
|||
}, |
|||
destroy: function () { |
|||
this._super.apply(this, arguments); |
|||
if (this.clipboard) { |
|||
this.clipboard.destroy(); |
|||
} |
|||
}, |
|||
}); |
|||
|
|||
registry.add('copy_binary', BinaryFileCopy); |
|||
|
|||
return { |
|||
BinaryFileCopy: BinaryFileCopy, |
|||
}; |
|||
|
|||
}); |
@ -0,0 +1,54 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.domain', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
var session = require('web.session'); |
|||
var fields = require('web.basic_fields'); |
|||
var view_dialogs = require('web.view_dialogs'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
fields.FieldDomain.include({ |
|||
_onShowSelectionButtonClick: function (e) { |
|||
e.preventDefault(); |
|||
new view_dialogs.SelectCreateDialog(this, { |
|||
context: this.attrs.context || {}, |
|||
title: _t("Selected records"), |
|||
res_model: this._domainModel, |
|||
domain: this.value || "[]", |
|||
no_create: true, |
|||
readonly: true, |
|||
disable_multiple_selection: true, |
|||
}).open(); |
|||
}, |
|||
isValid: function () { |
|||
return ( |
|||
this._isValid && (!this.domainSelector || this.domainSelector.isValid()) |
|||
); |
|||
}, |
|||
}); |
|||
|
|||
}); |
@ -0,0 +1,58 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.image', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
var session = require('web.session'); |
|||
var fields = require('web.basic_fields'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
fields.FieldBinaryImage.extend({ |
|||
willStart: function () { |
|||
var def = this._rpc({ |
|||
route: '/config/muk_web_utils.binary_max_size', |
|||
}).then(function(result) { |
|||
this.max_upload_size = result.max_upload_size * 1024 * 1024; |
|||
}.bind(this)); |
|||
return this._super.apply(this, arguments); |
|||
}, |
|||
_render: function () { |
|||
this._super.apply(this, arguments); |
|||
this.$('.mk_field_image_wrapper').remove(); |
|||
this.$('img').wrap($('<div/>', { |
|||
class: "mk_field_image_wrapper" |
|||
})); |
|||
var $wrapper = $('.mk_field_image_wrapper'); |
|||
var width = this.nodeOptions.size ? |
|||
this.nodeOptions.size[0] : this.attrs.width; |
|||
var height = this.nodeOptions.size ? |
|||
this.nodeOptions.size[1] : this.attrs.height; |
|||
$wrapper.css('min-width', (width || 50) + 'px'); |
|||
$wrapper.css('min-height', (height || 50) + 'px'); |
|||
}, |
|||
}); |
|||
|
|||
}); |
@ -0,0 +1,96 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.ModuleBoolean', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
var fields = require('web.basic_fields'); |
|||
var registry = require('web.field_registry'); |
|||
var framework = require('web.framework'); |
|||
|
|||
var Dialog = require('web.Dialog'); |
|||
var AbstractField = require('web.AbstractField'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
var ModuleBoolean = fields.FieldBoolean.extend({ |
|||
supportedFieldTypes: [], |
|||
events: _.extend({}, AbstractField.prototype.events, { |
|||
'click input': '_onInputClicked', |
|||
}), |
|||
renderWithLabel: function ($label) { |
|||
this.$label = $label; |
|||
this._render(); |
|||
}, |
|||
_openDialog: function () { |
|||
var buttons = [{ |
|||
text: _t("Download"), |
|||
classes: 'btn-primary', |
|||
close: true, |
|||
click: this._confirmRedirect.bind(this), |
|||
}, { |
|||
text: _t("Cancel"), |
|||
close: true, |
|||
}]; |
|||
return new Dialog(this, { |
|||
size: 'medium', |
|||
buttons: buttons, |
|||
$content: $('<div>', { |
|||
html: $(QWeb.render('muk_web_utils.MissingModuleDialog')), |
|||
}), |
|||
title: _t("Missing Module"), |
|||
}).open(); |
|||
}, |
|||
_confirmRedirect: function () { |
|||
if(this.nodeOptions.url) { |
|||
framework.redirect(this.nodeOptions.url); |
|||
} else { |
|||
var module = this.name.replace("module_", ""); |
|||
framework.redirect("https://apps.odoo.com/apps/modules/browse?search=" + module); |
|||
} |
|||
}, |
|||
_render: function () { |
|||
this._super.apply(this, arguments); |
|||
var $element = this.$label || this.$el; |
|||
$element.append(' ').append($("<span>", { |
|||
'text': _t("Store"), |
|||
'class': "badge badge-primary oe_inline mk_module_label" |
|||
})); |
|||
}, |
|||
_onInputClicked: function (event) { |
|||
if ($(event.currentTarget).prop("checked")) { |
|||
var dialog = this._openDialog(); |
|||
dialog.on('closed', this, this._resetValue.bind(this)); |
|||
} |
|||
}, |
|||
_resetValue: function () { |
|||
this.$input.prop("checked", false).change(); |
|||
}, |
|||
}); |
|||
|
|||
registry.add('module_boolean', ModuleBoolean); |
|||
|
|||
return ModuleBoolean; |
|||
|
|||
}); |
@ -0,0 +1,119 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.path', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
var fields = require('web.basic_fields'); |
|||
var registry = require('web.field_registry'); |
|||
var colorpicker = require('web.colorpicker'); |
|||
|
|||
var AbstractField = require('web.AbstractField'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
var FieldPathNames = fields.FieldChar.extend({ |
|||
init: function(parent, name, record) { |
|||
this._super.apply(this, arguments); |
|||
this.max_width = this.nodeOptions.width || 500; |
|||
}, |
|||
_renderReadonly: function() { |
|||
var show_value = this._formatValue(this.value); |
|||
var text_witdh = $.fn.textWidth(show_value); |
|||
if(text_witdh >= this.max_width) { |
|||
var ratio_start = (1 - (this.max_width / text_witdh)) * show_value.length; |
|||
show_value = ".." + show_value.substring(ratio_start, show_value.length); |
|||
} |
|||
this.$el.text(show_value); |
|||
}, |
|||
}); |
|||
|
|||
var FieldPathJson = fields.FieldText.extend({ |
|||
events: _.extend({}, fields.FieldText.prototype.events, { |
|||
'click a' : '_onNodeClicked', |
|||
}), |
|||
init: function(parent, name, record) { |
|||
this._super.apply(this, arguments); |
|||
this.max_width = this.nodeOptions.width || 500; |
|||
this.seperator = this.nodeOptions.seperator || "/"; |
|||
this.prefix = this.nodeOptions.prefix || false; |
|||
this.suffix = this.nodeOptions.suffix || false; |
|||
}, |
|||
_renderReadonly: function() { |
|||
this.$el.empty(); |
|||
this._renderPath(); |
|||
}, |
|||
_renderPath: function() { |
|||
var text_width_measure = ""; |
|||
var path = JSON.parse(this.value || "[]"); |
|||
$.each(_.clone(path).reverse(), function(index, element) { |
|||
text_width_measure += element.name + "/"; |
|||
if($.fn.textWidth(text_width_measure) >= this.max_width) { |
|||
this.$el.prepend($('<span/>').text("..")); |
|||
} else { |
|||
if (index == 0) { |
|||
if(this.suffix) { |
|||
this.$el.prepend($('<span/>').text(this.seperator)); |
|||
} |
|||
this.$el.prepend($('<span/>').text(element.name)); |
|||
this.$el.prepend($('<span/>').text(this.seperator)); |
|||
} else { |
|||
this.$el.prepend($('<a/>', { |
|||
'class': 'oe_form_uri', |
|||
'data-model': element.model, |
|||
'data-id': element.id, |
|||
'href': "javascript:void(0);", |
|||
'text': element.name, |
|||
})); |
|||
if (index != path.length - 1) { |
|||
this.$el.prepend($('<span/>').text(this.seperator)); |
|||
} else if (this.prefix) { |
|||
this.$el.prepend($('<span/>').text(this.seperator)); |
|||
} |
|||
} |
|||
} |
|||
return ($.fn.textWidth(text_width_measure) < this.max_width); |
|||
}.bind(this)); |
|||
}, |
|||
_onNodeClicked : function(event) { |
|||
this.do_action({ |
|||
type: 'ir.actions.act_window', |
|||
res_model: $(event.currentTarget).data('model'), |
|||
res_id: $(event.currentTarget).data('id'), |
|||
views: [[false, 'form']], |
|||
target: 'current', |
|||
context: {}, |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
registry.add('path_names', FieldPathNames); |
|||
registry.add('path_json', FieldPathJson); |
|||
|
|||
return { |
|||
FieldPathNames: FieldPathNames, |
|||
FieldPathJson: FieldPathJson, |
|||
}; |
|||
|
|||
}); |
@ -0,0 +1,226 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.share', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
var session = require('web.session'); |
|||
var fields = require('web.basic_fields'); |
|||
var registry = require('web.field_registry'); |
|||
|
|||
var utils = require('muk_web_utils.utils'); |
|||
var copy = require('muk_web_utils.copy'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
var ShareMixin = { |
|||
shareEvents: { |
|||
'click .mk_share_dropdown_message': '_onShareMessageClick', |
|||
'click .mk_share_dropdown_note': '_onShareNoteClick', |
|||
'click .mk_share_dropdown_mail': '_onShareMailClick', |
|||
'click .mk_share_dropdown_send': '_onShareSendClick', |
|||
}, |
|||
getShareMessageValues: function(message) { |
|||
var values = { |
|||
name: session.partner_display_name, |
|||
record: this.recordData.display_name, |
|||
url: utils.isUrl(this.value) && this.value, |
|||
value: this.value, |
|||
}; |
|||
return { |
|||
subject: _.template(this.shareOptions.subjectTemplate)(values), |
|||
body: QWeb.render(this.shareOptions.bodyTemplate, values), |
|||
text: _.template(this.shareOptions.textTemplate)(values), |
|||
url: utils.isUrl(this.value) && this.value, |
|||
} |
|||
}, |
|||
openShareChat: function(note) { |
|||
var values = this.getShareMessageValues(); |
|||
var context = { |
|||
default_is_log: note, |
|||
default_body: values.body, |
|||
default_subject: values.subject, |
|||
default_model: this.shareOptions.res_model, |
|||
default_res_id: this.shareOptions.res_id, |
|||
mail_post_autofollow: false, |
|||
}; |
|||
this.do_action({ |
|||
type: 'ir.actions.act_window', |
|||
res_model: 'mail.compose.message', |
|||
view_mode: 'form', |
|||
views: [[false, 'form']], |
|||
target: 'new', |
|||
context: context, |
|||
}); |
|||
}, |
|||
_onShareMessageClick: function(event) { |
|||
event.preventDefault(); |
|||
event.stopPropagation(); |
|||
this.openShareChat(false); |
|||
}, |
|||
_onShareNoteClick: function(event) { |
|||
event.preventDefault(); |
|||
event.stopPropagation(); |
|||
this.openShareChat(true); |
|||
}, |
|||
_onShareMailClick: function(event) { |
|||
event.preventDefault(); |
|||
event.stopPropagation(); |
|||
var values = this.getShareMessageValues(); |
|||
var subject = "subject=" + values.subject; |
|||
var body = "&body=" + encodeURIComponent(values.text); |
|||
window.location.href = "mailto:?" + subject + body; |
|||
}, |
|||
_onShareSendClick: function(event) { |
|||
event.preventDefault(); |
|||
event.stopPropagation(); |
|||
var values = this.getShareMessageValues(); |
|||
navigator.share({ |
|||
title: values.subject, |
|||
text: values.text, |
|||
url: values.url, |
|||
}); |
|||
}, |
|||
}; |
|||
|
|||
var CharShare = fields.CharCopyClipboard.extend(ShareMixin, { |
|||
fieldDependencies: _.extend({}, fields.CharCopyClipboard.prototype.fieldDependencies, { |
|||
display_name: {type: 'char'}, |
|||
}), |
|||
events: _.extend({}, fields.CharCopyClipboard.prototype.events, ShareMixin.shareEvents), |
|||
init: function(parent, name, record) { |
|||
this._super.apply(this, arguments); |
|||
this.navigator = window.navigator.share; |
|||
this.chatter = _.contains(odoo._modules, "mail"); |
|||
this.shareOptions = _.defaults(this.nodeOptions, { |
|||
subjectTemplate: _t("<%= name %> shared a message!"), |
|||
textTemplate: _t("<%= value %>"), |
|||
bodyTemplate: 'muk_web_utils.ShareMessage', |
|||
}); |
|||
this.shareOptions = _.extend({}, this.shareOptions, { |
|||
res_model: this.recordData[this.nodeOptions.res_model] || this.model, |
|||
res_id: this.recordData[this.nodeOptions.res_id] || this.res_id, |
|||
}); |
|||
}, |
|||
_render: function() { |
|||
this._super.apply(this, arguments); |
|||
this.$el.addClass('mk_field_share'); |
|||
this.$el.prepend($(QWeb.render('muk_web_utils.CharShare', { |
|||
navigator: !!this.navigator, |
|||
chatter: !!this.chatter, |
|||
}))); |
|||
}, |
|||
}); |
|||
|
|||
var TextShare = fields.TextCopyClipboard.extend(ShareMixin, { |
|||
fieldDependencies: _.extend({}, fields.TextCopyClipboard.prototype.fieldDependencies, { |
|||
display_name: {type: 'char'}, |
|||
}), |
|||
events: _.extend({}, fields.TextCopyClipboard.prototype.events, ShareMixin.shareEvents), |
|||
init: function(parent, name, record) { |
|||
this._super.apply(this, arguments); |
|||
this.navigator = window.navigator.share; |
|||
this.chatter = _.contains(odoo._modules, "mail"); |
|||
this.shareOptions = _.defaults(this.nodeOptions, { |
|||
subjectTemplate: _t("<%= name %> shared a message!"), |
|||
textTemplate: _t("<%= value %>"), |
|||
bodyTemplate: 'muk_web_utils.ShareMessage', |
|||
}); |
|||
this.shareOptions = _.extend({}, this.shareOptions, { |
|||
res_model: this.recordData[this.nodeOptions.res_model] || this.model, |
|||
res_id: this.recordData[this.nodeOptions.res_id] || this.res_id, |
|||
}); |
|||
}, |
|||
_render: function() { |
|||
this._super.apply(this, arguments); |
|||
this.$el.addClass('mk_field_share'); |
|||
this.$el.prepend($(QWeb.render('muk_web_utils.TextShare', { |
|||
navigator: !!this.navigator, |
|||
chatter: !!this.chatter, |
|||
}))); |
|||
} |
|||
}); |
|||
|
|||
var BinaryFileShare = copy.BinaryFileCopy.extend(ShareMixin, { |
|||
fieldDependencies: _.extend({}, fields.FieldBinaryFile.prototype.fieldDependencies, { |
|||
display_name: {type: 'char'}, |
|||
}), |
|||
events: _.extend({}, copy.BinaryFileCopy.prototype.events, ShareMixin.shareEvents, { |
|||
'click .mk_share_button': '_onShareDropdownClick', |
|||
}), |
|||
init: function () { |
|||
this._super.apply(this, arguments); |
|||
this.navigator = window.navigator.share; |
|||
this.chatter = _.contains(odoo._modules, "mail"); |
|||
this.shareOptions = _.defaults(this.nodeOptions, { |
|||
subjectTemplate: _t("<%= name %> shared a file!"), |
|||
textTemplate: _t("<%= value %>"), |
|||
bodyTemplate: 'muk_web_utils.ShareBinaryMessage', |
|||
}); |
|||
this.shareOptions = _.extend({}, this.shareOptions, { |
|||
res_model: this.recordData[this.nodeOptions.res_model] || this.model, |
|||
res_id: this.recordData[this.nodeOptions.res_id] || this.res_id, |
|||
}); |
|||
}, |
|||
getShareMessageValues: function() { |
|||
var values = { |
|||
name: session.partner_display_name, |
|||
record: this.recordData.display_name, |
|||
url: this.shareUrl, |
|||
value: this.shareUrl, |
|||
}; |
|||
return { |
|||
subject: _.template(this.shareOptions.subjectTemplate)(values), |
|||
body: QWeb.render(this.shareOptions.bodyTemplate, values), |
|||
text: _.template(this.shareOptions.textTemplate)(values), |
|||
url: this.shareUrl, |
|||
} |
|||
}, |
|||
_renderReadonly: function () { |
|||
this._super.apply(this, arguments); |
|||
this.$el.addClass('mk_field_share'); |
|||
this.$el.append($(QWeb.render('muk_web_utils.BinaryShare', { |
|||
navigator: !!this.navigator, |
|||
chatter: !!this.chatter, |
|||
share: !!this.shareUrl, |
|||
}))); |
|||
}, |
|||
_onShareDropdownClick: function(event) { |
|||
$(event.currentTarget).dropdown("toggle"); |
|||
event.stopPropagation(); |
|||
}, |
|||
}); |
|||
|
|||
registry.add('share_char', CharShare); |
|||
registry.add('share_text', TextShare); |
|||
registry.add('share_binary', BinaryFileShare); |
|||
|
|||
return { |
|||
ShareMixin: ShareMixin, |
|||
CharShare: CharShare, |
|||
TextShare: TextShare, |
|||
BinaryFileShare: BinaryFileShare, |
|||
}; |
|||
|
|||
}); |
@ -0,0 +1,54 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.field_utils', function(require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
var session = require('web.session'); |
|||
var utils = require('web.field_utils'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
function formatBinarySize(value, field, options) { |
|||
options = _.defaults(options || {}, { |
|||
si: true, |
|||
}); |
|||
var thresh = options.si ? 1000 : 1024; |
|||
if(Math.abs(value) < thresh) { |
|||
return utils.format['float'](value, field, options) + ' B'; |
|||
} |
|||
var units = options.si |
|||
? ['KB','MB','GB','TB','PB','EB','ZB','YB'] |
|||
: ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB']; |
|||
var unit = -1; |
|||
do { |
|||
value /= thresh; |
|||
++unit; |
|||
} while(Math.abs(value) >= thresh && unit < units.length - 1); |
|||
return utils.format['float'](value, field, options) + ' ' + units[unit]; |
|||
} |
|||
|
|||
utils.format.binary_size = formatBinarySize; |
|||
|
|||
}); |
@ -0,0 +1,104 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
$.fn.textWidth = function(text, font) { |
|||
if (!$.fn.textWidth.fakeEl) $.fn.textWidth.fakeEl = $('<span>').hide().appendTo(document.body); |
|||
$.fn.textWidth.fakeEl.text(text || this.val() || this.text()).css('font', font || this.css('font')); |
|||
return $.fn.textWidth.fakeEl.width(); |
|||
}; |
|||
|
|||
$.fn.dndHover = function(options) { |
|||
return this.each(function() { |
|||
var self = $(this); |
|||
var collection = $(); |
|||
var dragenter = function(event) { |
|||
if (collection.size() === 0) { |
|||
self.trigger('dndHoverStart', [event]); |
|||
} |
|||
collection = collection.add(event.target); |
|||
}; |
|||
var dragleave = function(event) { |
|||
setTimeout(function() { |
|||
collection = collection.not(event.target); |
|||
if (collection.size() === 0) { |
|||
self.trigger('dndHoverEnd', [event]); |
|||
} |
|||
}, 1); |
|||
}; |
|||
var drop = function(event) { |
|||
setTimeout(function() { |
|||
collection = $(); |
|||
self.trigger('dndHoverEnd', [event]); |
|||
}, 1); |
|||
}; |
|||
if(options && options === 'destroy') { |
|||
self.off('dragenter.dnd_hover'); |
|||
self.off('dragleave.dnd_hover'); |
|||
self.off('drop.dnd_hover'); |
|||
} else { |
|||
self.on('dragenter.dnd_hover', dragenter); |
|||
self.on('dragleave.dnd_hover', dragleave); |
|||
self.on('drop.dnd_hover', drop); |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
$.ajaxTransport("+binary", function(options, originalOptions, jqXHR) { |
|||
if (window.FormData && ((options.dataType && (options.dataType == 'binary')) || |
|||
(options.data && ((window.ArrayBuffer && options.data instanceof ArrayBuffer) || |
|||
(window.Blob && options.data instanceof Blob))))) { |
|||
return { |
|||
send: function(headers, callback){ |
|||
var xhr = new XMLHttpRequest(); |
|||
var url = options.url, |
|||
type = options.type, |
|||
async = options.async || true, |
|||
dataType = options.responseType || 'blob', |
|||
data = options.data || null, |
|||
username = options.username, |
|||
password = options.password; |
|||
xhr.addEventListener('load', function(){ |
|||
var data = {}; |
|||
data[options.dataType] = xhr.response; |
|||
callback(xhr.status, xhr.statusText, data, xhr.getAllResponseHeaders()); |
|||
}); |
|||
xhr.open(type, url, async, username, password); |
|||
for (var i in headers ) { |
|||
xhr.setRequestHeader(i, headers[i] ); |
|||
} |
|||
if (options.xhrFields) { |
|||
for (var key in options.xhrFields) { |
|||
if (key in xhr) { |
|||
xhr[key] = options.xhrFields[key]; |
|||
} |
|||
} |
|||
} |
|||
xhr.responseType = dataType; |
|||
xhr.send(data); |
|||
}, |
|||
abort: function(){ |
|||
jqXHR.abort(); |
|||
} |
|||
}; |
|||
} |
|||
}); |
|||
|
@ -0,0 +1,27 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
$.fn.renderScrollBar = function() { |
|||
this.each(function() { |
|||
new SimpleBar(this); |
|||
}); |
|||
}; |
@ -0,0 +1,47 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
_.mixin({ |
|||
memoizeDebounce: function(func, wait, options) { |
|||
wait = (typeof wait !== 'undefined') ? wait : 0; |
|||
options = (typeof options !== 'undefined') ? options : {}; |
|||
var mem = _.memoize(function() { |
|||
return _.debounce(func, wait, options) |
|||
}, options.resolver); |
|||
return function() { |
|||
mem.apply(this, arguments).apply(this, arguments) |
|||
} |
|||
} |
|||
}); |
|||
|
|||
_.mixin({ |
|||
memoizeThrottle: function(func, wait, options) { |
|||
wait = (typeof wait !== 'undefined') ? wait : 0; |
|||
options = (typeof options !== 'undefined') ? options : {}; |
|||
var mem = _.memoize(function() { |
|||
return _.throttle(func, wait, options) |
|||
}, options.resolver); |
|||
return function() { |
|||
mem.apply(this, arguments).apply(this, arguments) |
|||
} |
|||
} |
|||
}); |
@ -0,0 +1,37 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.NotificationService', function (require) { |
|||
"use strict"; |
|||
|
|||
var NotificationService = require('web.NotificationService'); |
|||
|
|||
NotificationService.include({ |
|||
progress: function (notificationId, progress) { |
|||
if(notificationId in this.notifications) { |
|||
var notification = this.notifications[notificationId]; |
|||
notification.updateProgress(progress.state, progress.text); |
|||
} |
|||
}, |
|||
}); |
|||
|
|||
}); |
@ -0,0 +1,47 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.FormRenderer', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
|
|||
var FormRenderer = require('web.FormRenderer'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
FormRenderer.include({ |
|||
_updateView: function ($newContent) { |
|||
this._super.apply(this, arguments); |
|||
_.each(this.allFieldWidgets[this.state.id], function (widget) { |
|||
if (widget.attrs.widget === 'module_boolean') { |
|||
var inputID = this.idsForLabels[widget.name]; |
|||
var $widgets = this.$('.o_field_widget[name=' + widget.name + ']'); |
|||
var $label = inputID ? this.$('.o_form_label[for=' + inputID + ']') : $(); |
|||
widget.renderWithLabel($label.eq($widgets.index(widget.$el))); |
|||
} |
|||
}, this); |
|||
} |
|||
}); |
|||
|
|||
}); |
@ -0,0 +1,46 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_utils.Notification', function (require) { |
|||
"use strict"; |
|||
|
|||
var core = require('web.core'); |
|||
|
|||
var Notification = require('web.Notification'); |
|||
|
|||
var _t = core._t; |
|||
var QWeb = core.qweb; |
|||
|
|||
Notification.include({ |
|||
init: function (parent, params) { |
|||
this._super.apply(this, arguments); |
|||
this.icon = params.icon || this.icon; |
|||
this.progress = params.progress; |
|||
}, |
|||
updateProgress: function(state, text) { |
|||
this.progress = {state: state, text: text}; |
|||
this.$(".progress-bar").text(text); |
|||
this.$(".progress-bar").width(state + "%"); |
|||
}, |
|||
}); |
|||
|
|||
}); |
@ -0,0 +1,28 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
.o_list_view .o_field_widget.o_field_binary_file { |
|||
height: 100%; |
|||
button.btn { |
|||
padding-top: 0.25rem; |
|||
} |
|||
} |
@ -0,0 +1,66 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
.mk_field_color_picker { |
|||
.o_opacity_slider { |
|||
display: none ! important; |
|||
} |
|||
input#opacity { |
|||
display: none ! important; |
|||
} |
|||
label[for="opacity"] { |
|||
display: none ! important; |
|||
} |
|||
} |
|||
|
|||
.o_field_widget.mk_field_color { |
|||
.mk_field_color_input { |
|||
width: auto; |
|||
display: inline-block; |
|||
} |
|||
.mk_field_color_button { |
|||
display: inline-block; |
|||
margin-bottom: 0.25rem; |
|||
line-height: 1.42rem; |
|||
} |
|||
} |
|||
|
|||
span.mk_field_color_index { |
|||
@for $size from 1 through length($o-colors) { |
|||
&.mk_color_index_#{$size - 1} { |
|||
color: nth($o-colors, $size); |
|||
} |
|||
} |
|||
} |
|||
|
|||
select.mk_field_color_index { |
|||
&.mk_color_index_0, .mk_color_index_0 { |
|||
background-color: $white ! important; |
|||
color: nth($o-colors, 1) ! important; |
|||
} |
|||
@for $size from 2 through length($o-colors) { |
|||
&.mk_color_index_#{$size - 1}, .mk_color_index_#{$size - 1} { |
|||
background-color: nth($o-colors, $size) ! important; |
|||
color: $white ! important; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,34 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
.o_field_widget.mk_field_copy { |
|||
.mk_copy_binary { |
|||
margin-left: 0.5rem; |
|||
.mk_copy_button { |
|||
font-size: 0.8rem; |
|||
line-height: 0.5; |
|||
border-radius: 0.2rem; |
|||
margin-bottom: 0.12rem; |
|||
padding: 0.25rem 0.4rem; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,64 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
.mk_dropzone { |
|||
position: relative; |
|||
&:before { |
|||
display:flex; |
|||
z-index: 1052; |
|||
color: gray('700'); |
|||
flex-direction:row; |
|||
align-items: center; |
|||
justify-content: center; |
|||
width: #{"calc(100% - 20px)"}; |
|||
height: #{"calc(100% - 20px)"}; |
|||
border: 2px dashed gray('700'); |
|||
@include gradient-y($white, gray('100')); |
|||
@include o-position-absolute(10px, 0, 0, 10px); |
|||
} |
|||
&:after { |
|||
display:flex; |
|||
z-index: 1052; |
|||
color: gray('700'); |
|||
flex-direction:row; |
|||
align-items: center; |
|||
justify-content: center; |
|||
width: #{"calc(100% - 20px)"}; |
|||
height: #{"calc(100% - 10px)"}; |
|||
@include o-position-absolute(0, 0, 0, 0); |
|||
} |
|||
&.mk_dropzone_file { |
|||
&:before { |
|||
font-family: FontAwesome; |
|||
text-decoration: inherit; |
|||
font-style: normal; |
|||
font-weight: normal; |
|||
font-size: 15rem; |
|||
content: "\f0ee"; |
|||
} |
|||
&:after { |
|||
padding-top: 18rem; |
|||
font-size: 3rem; |
|||
content: attr(data-dropzone-text); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,84 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
.o_field_widget.o_field_image { |
|||
@include media-breakpoint-up(sm, $o-extra-grid-breakpoints) { |
|||
.mk_field_image_wrapper { |
|||
min-height: 60px; |
|||
min-width: 80px; |
|||
} |
|||
} |
|||
.mk_form_image_controls { |
|||
@include o-position-absolute($left: 0, $bottom: 0); |
|||
width: 100%; |
|||
color: white; |
|||
background-color: $o-brand-primary; |
|||
opacity: 0; |
|||
transition: opacity ease 400ms; |
|||
> button.fa { |
|||
border: none; |
|||
background-color: transparent; |
|||
} |
|||
> .fa { |
|||
margin: 5px; |
|||
cursor: pointer; |
|||
} |
|||
} |
|||
&:hover .mk_form_image_controls { |
|||
opacity: 0.8; |
|||
} |
|||
@include media-breakpoint-down(xs, $o-extra-grid-breakpoints) { |
|||
.mk_form_image_controls{ |
|||
position: initial; |
|||
opacity: 1; |
|||
> .fa{ |
|||
width: 50%; |
|||
padding: 6px; |
|||
margin: 0px; |
|||
text-align: center; |
|||
background: $o-brand-secondary; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.o_field_widget.o_field_image.oe_avatar { |
|||
.mk_form_image_controls { |
|||
@include o-position-absolute($left: 0, $bottom: 10px); |
|||
} |
|||
img { |
|||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); |
|||
max-width: $o-avatar-size; |
|||
max-height: $o-avatar-size; |
|||
vertical-align: top; |
|||
margin-bottom: 10px; |
|||
border: none; |
|||
} |
|||
@include media-breakpoint-down(xs, $o-extra-grid-breakpoints) { |
|||
.mk_form_image_controls{ |
|||
position: initial; |
|||
> .fa{ |
|||
background: $o-brand-secondary; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
@mixin mk-flex-container ($direction: row, $wrap: nowrap, $justify: flex-start, $items: stretch, $content: stretch) { |
|||
display: flex; |
|||
flex-wrap: $wrap; |
|||
flex-direction: $direction; |
|||
justify-content: $justify; |
|||
align-content: $content; |
|||
align-items: $items; |
|||
} |
|||
|
|||
@mixin mk-flex-child ($grow: 0, $shrink: 1, $basis: auto, $order: 0) { |
|||
display: flex; |
|||
flex-grow: $grow; |
|||
flex-shrink: $shrink; |
|||
flex-basis: $basis; |
|||
order: $order; |
|||
} |
|||
|
|||
|
@ -0,0 +1,33 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
.o_settings_container { |
|||
.o_setting_box { |
|||
.o_setting_left_pane { |
|||
.mk_module_label { |
|||
position: absolute; |
|||
top: 0px; |
|||
right: 40px; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
.o_notification { |
|||
.mk_notification_progress { |
|||
padding: 2px 10px 10px 10px; |
|||
.progress { |
|||
background-color: rgba(0, 0, 0, 0.3); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,54 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
.o_field_widget.mk_field_share { |
|||
&.o_field_copy { |
|||
padding-left: 90px; |
|||
.mk_share_dropdown { |
|||
@include o-position-absolute($top: 0, $left: 0); |
|||
.mk_share_button { |
|||
padding: 0 10px; |
|||
} |
|||
&.mk_share_char { |
|||
height: 100%; |
|||
|
|||
} |
|||
&.mk_share_text { |
|||
.dropdown-menu { |
|||
line-height: 0.1 |
|||
} |
|||
} |
|||
} |
|||
} |
|||
&.o_form_uri { |
|||
.mk_share_dropdown { |
|||
margin-left: 0.2rem; |
|||
.mk_share_button { |
|||
padding: 0.25rem 0.4rem; |
|||
font-size: 0.8rem; |
|||
line-height: 0.5; |
|||
border-radius: 0.2rem; |
|||
margin-bottom: 0.12rem; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,158 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
.switch { |
|||
font-size: $font-size-base; |
|||
position: relative; |
|||
|
|||
input { |
|||
position: absolute; |
|||
height: 1px; |
|||
width: 1px; |
|||
background: none; |
|||
border: 0; |
|||
clip: rect(0 0 0 0); |
|||
clip-path: inset(50%); |
|||
overflow: hidden; |
|||
padding: 0; |
|||
|
|||
+ label { |
|||
position: relative; |
|||
min-width: calc(#{$switch-height} * 2); |
|||
border-radius: $switch-border-radius; |
|||
height: $switch-height; |
|||
line-height: $switch-height; |
|||
display: inline-block; |
|||
cursor: pointer; |
|||
outline: none; |
|||
user-select: none; |
|||
vertical-align: middle; |
|||
text-indent: calc(calc(#{$switch-height} * 2) + .5rem); |
|||
} |
|||
|
|||
+ label::before, |
|||
+ label::after { |
|||
content: ''; |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
width: calc(#{$switch-height} * 2); |
|||
bottom: 0; |
|||
display: block; |
|||
} |
|||
|
|||
+ label::before { |
|||
right: 0; |
|||
background-color: $switch-bg; |
|||
border-radius: $switch-border-radius; |
|||
transition: $switch-transition; |
|||
} |
|||
|
|||
+ label::after { |
|||
top: $switch-thumb-padding; |
|||
left: $switch-thumb-padding; |
|||
width: calc(#{$switch-height} - calc(#{$switch-thumb-padding} * 2)); |
|||
height: calc(#{$switch-height} - calc(#{$switch-thumb-padding} * 2)); |
|||
border-radius: $switch-thumb-border-radius; |
|||
background-color: $switch-thumb-bg; |
|||
transition: $switch-transition; |
|||
} |
|||
|
|||
&:checked + label::before { |
|||
background-color: $switch-checked-bg; |
|||
} |
|||
|
|||
&:checked + label::after { |
|||
margin-left: $switch-height; |
|||
} |
|||
|
|||
&:focus + label::before { |
|||
outline: none; |
|||
box-shadow: $switch-focus-box-shadow; |
|||
} |
|||
|
|||
&:disabled + label { |
|||
color: $switch-disabled-color; |
|||
cursor: not-allowed; |
|||
} |
|||
|
|||
&:disabled + label::before { |
|||
background-color: $switch-disabled-bg; |
|||
} |
|||
} |
|||
|
|||
&.switch-sm { |
|||
font-size: $font-size-sm; |
|||
|
|||
input { |
|||
+ label { |
|||
min-width: calc(#{$switch-height-sm} * 2); |
|||
height: $switch-height-sm; |
|||
line-height: $switch-height-sm; |
|||
text-indent: calc(calc(#{$switch-height-sm} * 2) + .5rem); |
|||
} |
|||
|
|||
+ label::before { |
|||
width: calc(#{$switch-height-sm} * 2); |
|||
} |
|||
|
|||
+ label::after { |
|||
width: calc(#{$switch-height-sm} - calc(#{$switch-thumb-padding} * 2)); |
|||
height: calc(#{$switch-height-sm} - calc(#{$switch-thumb-padding} * 2)); |
|||
} |
|||
|
|||
&:checked + label::after { |
|||
margin-left: $switch-height-sm; |
|||
} |
|||
} |
|||
} |
|||
|
|||
&.switch-lg { |
|||
font-size: $font-size-lg; |
|||
|
|||
input { |
|||
+ label { |
|||
min-width: calc(#{$switch-height-lg} * 2); |
|||
height: $switch-height-lg; |
|||
line-height: $switch-height-lg; |
|||
text-indent: calc(calc(#{$switch-height-lg} * 2) + .5rem); |
|||
} |
|||
|
|||
+ label::before { |
|||
width: calc(#{$switch-height-lg} * 2); |
|||
} |
|||
|
|||
+ label::after { |
|||
width: calc(#{$switch-height-lg} - calc(#{$switch-thumb-padding} * 2)); |
|||
height: calc(#{$switch-height-lg} - calc(#{$switch-thumb-padding} * 2)); |
|||
} |
|||
|
|||
&:checked + label::after { |
|||
margin-left: $switch-height-lg; |
|||
} |
|||
} |
|||
} |
|||
|
|||
+ .switch { |
|||
margin-left: 1rem; |
|||
} |
|||
} |
@ -0,0 +1,39 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
//---------------------------------------------------------- |
|||
// Switch |
|||
//---------------------------------------------------------- |
|||
|
|||
$switch-bg: #dee2e6; |
|||
$switch-disabled-bg: #e9ecef; |
|||
$switch-disabled-color: #868e96; |
|||
$switch-height: calc(#{$input-height} * .8) !default; |
|||
$switch-height-sm: calc(#{$input-height-sm} * .8) !default; |
|||
$switch-height-lg: calc(#{$input-height-lg} * .8) !default; |
|||
$switch-checked-bg: map-get($theme-colors, 'primary') !default; |
|||
$switch-thumb-bg: $white !default; |
|||
$switch-thumb-border-radius: 50% !default; |
|||
$switch-thumb-padding: 2px !default; |
|||
$switch-transition: .2s all !default; |
|||
$switch-border-radius: $switch-height; |
|||
$switch-focus-box-shadow: 0 0 0 $input-btn-focus-width rgba(map-get($theme-colors, 'primary'), .25); |
@ -0,0 +1,65 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-2019 MuK IT GmbH. |
|||
|
|||
This file is part of MuK Web Utils |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<templates id="template" xml:space="preserve"> |
|||
|
|||
<t t-name="muk_web_utils.FieldColor"> |
|||
<span t-if="widget.mode === 'readonly'" class="mk_field_color"/> |
|||
<div t-if="widget.mode !== 'readonly'" class="mk_field_color"> |
|||
<input type="text" class="o_input mk_field_color_input" |
|||
t-att-name="widget.name" |
|||
t-att-tabindex="widget.attrs.tabindex" |
|||
t-att-autocomplete="widget.attrs.autocomplete" |
|||
t-att-placeholder="widget.attrs.placeholder" |
|||
t-att-autofocus="widget.attrs.autofocus"/> |
|||
<button class="btn btn-sm btn-outline-primary mk_field_color_button" type="button"> |
|||
<span class="fa fa-paint-brush"></span> |
|||
</button> |
|||
</div> |
|||
</t> |
|||
|
|||
<t t-name="muk_web_utils.FieldColorIndex"> |
|||
<span t-if="widget.mode === 'readonly'" class="mk_field_color_index"/> |
|||
<select t-if="widget.mode !== 'readonly'" |
|||
class="o_input mk_field_color_index" |
|||
t-att-name="widget.name" |
|||
t-att-tabindex="widget.attrs.tabindex" |
|||
t-att-autofocus="widget.attrs.autofocus" |
|||
t-att-id="widget.idForLabel"> |
|||
<option class="mk_color_index_0" value="0">Color 0</option> |
|||
<option class="mk_color_index_1" value="1">Color 1</option> |
|||
<option class="mk_color_index_2" value="2">Color 2</option> |
|||
<option class="mk_color_index_3" value="3">Color 3</option> |
|||
<option class="mk_color_index_4" value="4">Color 4</option> |
|||
<option class="mk_color_index_5" value="5">Color 5</option> |
|||
<option class="mk_color_index_6" value="6">Color 6</option> |
|||
<option class="mk_color_index_7" value="7">Color 7</option> |
|||
<option class="mk_color_index_8" value="8">Color 8</option> |
|||
<option class="mk_color_index_9" value="9">Color 9</option> |
|||
<option class="mk_color_index_10" value="10">Color 10</option> |
|||
<option class="mk_color_index_11" value="11">Color 11</option> |
|||
</select> |
|||
</t> |
|||
|
|||
</templates> |
@ -0,0 +1,35 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-2019 MuK IT GmbH. |
|||
|
|||
This file is part of MuK Web Utils |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<templates id="template" xml:space="preserve"> |
|||
|
|||
<t t-name="muk_web_utils.BinaryFieldCopy"> |
|||
<div class="d-inline-block mk_copy_binary"> |
|||
<button class="btn btn-sm btn-outline-primary mk_copy_button" type="button"> |
|||
<span class="fa fa-clipboard"></span> |
|||
</button> |
|||
</div> |
|||
</t> |
|||
|
|||
</templates> |
@ -0,0 +1,34 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-2019 MuK IT GmbH. |
|||
|
|||
This file is part of MuK Web Utils |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<templates id="template" xml:space="preserve"> |
|||
|
|||
<t t-extend="FieldBinaryImage"> |
|||
<t t-jquery=".o_form_image_controls" t-operation="after"> |
|||
<div class="mk_form_image_controls"> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
|
|||
</templates> |
@ -0,0 +1,39 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-2019 MuK IT GmbH. |
|||
|
|||
This file is part of MuK Web Utils |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<templates id="template" xml:space="preserve"> |
|||
|
|||
<t t-name="muk_web_utils.MissingModuleDialog"> |
|||
<div class="row" role="status"> |
|||
<div class="col-6"> |
|||
<img class="img-fluid" t-att-src='_s + "/muk_web_utils/static/src/img/module.png"' alt="Missing Module" /> |
|||
</div> |
|||
<div class="col-6"> |
|||
<p><strong>The module could not be found on the server.</strong></p> |
|||
<p>Click on the download button to be redirected to the store and download the corresponding module.</p> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
|
|||
</templates> |
@ -0,0 +1,39 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-2019 MuK IT GmbH. |
|||
|
|||
This file is part of MuK Web Utils |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<templates id="template" xml:space="preserve"> |
|||
|
|||
<t t-extend="Notification"> |
|||
<t t-jquery=".o_notification_content" t-operation="after"> |
|||
<div t-if="widget.progress" class="mk_notification_progress"> |
|||
<div class="progress"> |
|||
<div class="progress-bar" t-attf-style="width: #{widget.progress.state}%;"> |
|||
<t t-esc="widget.progress.text"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
|
|||
</templates> |
@ -0,0 +1,106 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-2019 MuK IT GmbH. |
|||
|
|||
This file is part of MuK Web Utils |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<templates id="template" xml:space="preserve"> |
|||
|
|||
<t t-name="muk_web_utils.Share"> |
|||
<div t-attf-class="btn-group mk_share_dropdown #{share_class}"> |
|||
<button class="btn btn-sm btn-primary dropdown-toggle mk_share_button" type="button" data-toggle="dropdown"> |
|||
<span class="fa fa-share-alt"></span> |
|||
<span>Share</span> |
|||
</button> |
|||
<t t-call="muk_web_utils.ShareDropdown" /> |
|||
</div> |
|||
</t> |
|||
|
|||
<t t-name="muk_web_utils.ShareDropdown"> |
|||
<div class="dropdown-menu"> |
|||
<h6 class="dropdown-header">Internal</h6> |
|||
<a t-if="chatter" class="dropdown-item mk_share_dropdown_message" href="#"> |
|||
<span class="fa fa-comments"></span> |
|||
<span>Message</span> |
|||
</a> |
|||
<a t-if="chatter" class="dropdown-item mk_share_dropdown_note" href="#"> |
|||
<span class="fa fa-sticky-note"></span> |
|||
<span>Note</span> |
|||
</a> |
|||
<div class="dropdown-divider"></div> |
|||
<h6 class="dropdown-header">External</h6> |
|||
<a class="dropdown-item mk_share_dropdown_mail" href="#"> |
|||
<span class="fa fa-envelope"></span> |
|||
<span>Mail</span> |
|||
</a> |
|||
<a t-if="navigator" class="dropdown-item mk_share_dropdown_send" href="#"> |
|||
<span class="fa fa-paper-plane"></span> |
|||
<span>Send</span> |
|||
</a> |
|||
</div> |
|||
</t> |
|||
|
|||
<t t-name="muk_web_utils.CharShare"> |
|||
<t t-call="muk_web_utils.Share"> |
|||
<t t-set="share_class" t-value="'mk_share_char'"/> |
|||
</t> |
|||
</t> |
|||
|
|||
<t t-name="muk_web_utils.TextShare"> |
|||
<t t-call="muk_web_utils.Share"> |
|||
<t t-set="share_class" t-value="'mk_share_text'"/> |
|||
</t> |
|||
</t> |
|||
|
|||
<t t-name="muk_web_utils.BinaryShare"> |
|||
<div t-if="share" t-attf-class="btn-group mk_share_dropdown"> |
|||
<button class="btn btn-sm btn-outline-primary dropdown-toggle mk_share_button" type="button" data-toggle="dropdown"> |
|||
<span class="fa fa-share-alt"></span> |
|||
</button> |
|||
<t t-call="muk_web_utils.ShareDropdown" /> |
|||
</div> |
|||
</t> |
|||
|
|||
<t t-name="muk_web_utils.ShareMessage"> |
|||
<div> |
|||
<t t-if="url"> |
|||
<p><span t-esc="name"/> shared a link with you!</p> |
|||
<a t-attf-href="#{url}" target="_blank" style="background-color: #875A7B; padding: 10px; text-decoration: none; color: #fff; border-radius: 5px; font-size: 12px;"> |
|||
<strong>Open</strong> |
|||
</a> |
|||
</t> |
|||
<t t-else=""> |
|||
<p><span t-esc="name"/> shared a message with you!</p> |
|||
<p t-esc="value" /> |
|||
</t> |
|||
</div> |
|||
</t> |
|||
|
|||
<t t-name="muk_web_utils.ShareBinaryMessage"> |
|||
<div> |
|||
<p><span t-esc="name"/> shared a file with you!</p> |
|||
<a t-attf-href="#{url}" target="_blank" style="background-color: #875A7B; padding: 10px; text-decoration: none; color: #fff; border-radius: 5px; font-size: 12px;"> |
|||
<strong>Download</strong> |
|||
</a> |
|||
</div> |
|||
</t> |
|||
|
|||
</templates> |
@ -0,0 +1,54 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-2019 MuK IT GmbH. |
|||
|
|||
This file is part of MuK Web Utils |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<templates id="template" xml:space="preserve"> |
|||
|
|||
<t t-name="muk_web_utils.switch"> |
|||
<span class="switch"> |
|||
<input type="checkbox" t-att-id="id" /> |
|||
<label t-att-for="id"> |
|||
<t t-if="label"><t t-esc="label"/></t> |
|||
</label> |
|||
</span> |
|||
</t> |
|||
|
|||
<t t-name="muk_web_utils.switch_sm"> |
|||
<span class="switch switch-sm"> |
|||
<input type="checkbox" t-att-id="id" /> |
|||
<label t-att-for="id"> |
|||
<t t-if="label"><t t-esc="label"/></t> |
|||
</label> |
|||
</span> |
|||
</t> |
|||
|
|||
<t t-name="muk_web_utils.switch_lg"> |
|||
<span class="switch switch-lg"> |
|||
<input type="checkbox" t-att-id="id" /> |
|||
<label t-att-for="id"> |
|||
<t t-if="label"><t t-esc="label"/></t> |
|||
</label> |
|||
</span> |
|||
</t> |
|||
|
|||
</templates> |
@ -0,0 +1,205 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-2019 MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Web Utils |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
odoo.define('muk_web_utils.tests.fields', function (require) { |
|||
"use strict"; |
|||
|
|||
var basicFields = require('web.basic_fields'); |
|||
var concurrency = require('web.concurrency'); |
|||
var config = require('web.config'); |
|||
var core = require('web.core'); |
|||
var FormView = require('web.FormView'); |
|||
var KanbanView = require('web.KanbanView'); |
|||
var ListView = require('web.ListView'); |
|||
var session = require('web.session'); |
|||
var testUtils = require('web.test_utils'); |
|||
var field_registry = require('web.field_registry'); |
|||
|
|||
var createView = testUtils.createView; |
|||
var createAsyncView = testUtils.createAsyncView; |
|||
var DebouncedField = basicFields.DebouncedField; |
|||
var JournalDashboardGraph = basicFields.JournalDashboardGraph; |
|||
var _t = core._t; |
|||
|
|||
QUnit.module('muk_web_utils', {}, function () { |
|||
|
|||
QUnit.module('fields', { |
|||
beforeEach: function () { |
|||
this.data = { |
|||
partner: { |
|||
fields: { |
|||
display_name: { |
|||
string: "Displayed name", |
|||
type: "char", |
|||
searchable: true |
|||
}, |
|||
short: { |
|||
string: "Short", |
|||
type: "char", |
|||
searchable: true, |
|||
trim: true |
|||
}, |
|||
long: { |
|||
string: "Long", |
|||
string: "txt", |
|||
type: "text", |
|||
}, |
|||
document: { |
|||
string: "Binary", |
|||
type: "binary", |
|||
attachment: true, |
|||
}, |
|||
}, |
|||
records: [{ |
|||
id: 1, |
|||
display_name: "first record", |
|||
short: "Short Text", |
|||
long: "Super looooooong Text", |
|||
document: 'coucou==\n', |
|||
}], |
|||
}, |
|||
}; |
|||
} |
|||
}, function () { |
|||
QUnit.module('BinaryFileCopy'); |
|||
|
|||
QUnit.test('Fields is correctly rendered', function (assert) { |
|||
assert.expect(2); |
|||
|
|||
var form = createView({ |
|||
View: FormView, |
|||
model: 'partner', |
|||
data: this.data, |
|||
arch: ( |
|||
'<form string="Partners">' + |
|||
'<field name="document" widget="copy_binary" filename="short"/>' + |
|||
'<field name="short"/>' + |
|||
'</form>' |
|||
), |
|||
res_id: 1, |
|||
}); |
|||
|
|||
assert.strictEqual( |
|||
form.$('a.o_field_widget[name="document"] > .mk_copy_binary > .mk_copy_button').length, |
|||
1, "the copy button should be visible in readonly mode" |
|||
); |
|||
|
|||
form.$buttons.find('.o_form_button_edit').click(); |
|||
|
|||
assert.strictEqual( |
|||
form.$('a.o_field_widget[name="document"] > .mk_copy_binary').length, |
|||
0, "the copy button shouldn't be visible in edit mode" |
|||
); |
|||
|
|||
form.destroy(); |
|||
}); |
|||
|
|||
QUnit.module('CharShare'); |
|||
|
|||
QUnit.test('Fields is correctly rendered', function (assert) { |
|||
assert.expect(1); |
|||
|
|||
var form = createView({ |
|||
View: FormView, |
|||
model: 'partner', |
|||
data: this.data, |
|||
arch: ( |
|||
'<form string="Partners">' + |
|||
'<div>' + |
|||
'<field name="short" widget="share_char"/>' + |
|||
'</div>' + |
|||
'</form>' |
|||
), |
|||
res_id: 1, |
|||
}); |
|||
|
|||
assert.strictEqual( |
|||
form.$('span.o_field_widget[name="short"] > .mk_share_dropdown.mk_share_char').length, |
|||
1, "the copy button should be visible in readonly mode" |
|||
); |
|||
|
|||
form.destroy(); |
|||
}); |
|||
|
|||
QUnit.module('TextShare'); |
|||
|
|||
QUnit.test('Fields is correctly rendered', function (assert) { |
|||
assert.expect(1); |
|||
|
|||
var form = createView({ |
|||
View: FormView, |
|||
model: 'partner', |
|||
data: this.data, |
|||
arch: ( |
|||
'<form string="Partners">' + |
|||
'<div>' + |
|||
'<field name="long" widget="share_text"/>' + |
|||
'</div>' + |
|||
'</form>' |
|||
), |
|||
res_id: 1, |
|||
}); |
|||
|
|||
assert.strictEqual( |
|||
form.$('span.o_field_widget[name="long"] > .mk_share_dropdown.mk_share_text').length, |
|||
1, "the copy button should be visible in readonly mode" |
|||
); |
|||
|
|||
form.destroy(); |
|||
}); |
|||
|
|||
QUnit.module('BinaryFileShare'); |
|||
|
|||
QUnit.test('Fields is correctly rendered', function (assert) { |
|||
assert.expect(2); |
|||
|
|||
var form = createView({ |
|||
View: FormView, |
|||
model: 'partner', |
|||
data: this.data, |
|||
arch: ( |
|||
'<form string="Partners">' + |
|||
'<field name="document" widget="share_binary" filename="short"/>' + |
|||
'<field name="short"/>' + |
|||
'</form>' |
|||
), |
|||
res_id: 1, |
|||
}); |
|||
|
|||
assert.strictEqual( |
|||
form.$('a.o_field_widget[name="document"] > .mk_share_dropdown > .mk_share_button').length, |
|||
1, "the share dropdown should be visible in readonly mode" |
|||
); |
|||
|
|||
form.$buttons.find('.o_form_button_edit').click(); |
|||
|
|||
assert.strictEqual( |
|||
form.$('a.o_field_widget[name="document"] > .mk_share_dropdown > .mk_share_button').length, |
|||
0, "the share dropdown shouldn't be visible in edit mode" |
|||
); |
|||
|
|||
form.destroy(); |
|||
}); |
|||
}); |
|||
|
|||
}); |
|||
|
|||
}); |
@ -0,0 +1,79 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-2019 MuK IT GmbH. |
|||
|
|||
This file is part of MuK Web Utils |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<odoo> |
|||
|
|||
<template id="assets_backend" name="Backend Assets" inherit_id="web.assets_backend"> |
|||
<xpath expr="//link[last()]" position="after"> |
|||
<link rel="stylesheet" type="text/css" href="/muk_web_utils/static/libs/simplebar/simplebar.css" /> |
|||
</xpath> |
|||
<xpath expr="//script[last()]" position="after"> |
|||
<script type="text/javascript" src="/muk_web_utils/static/libs/simplebar/simplebar.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/libs/jquery.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/libs/scrollbar.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/libs/underscore.js" /> |
|||
</xpath> |
|||
<xpath expr="//link[last()]" position="after"> |
|||
<link rel="stylesheet" type="text/scss" href="/muk_web_utils/static/src/scss/variables.scss" /> |
|||
<link rel="stylesheet" type="text/scss" href="/muk_web_utils/static/src/scss/mixins.scss" /> |
|||
<link rel="stylesheet" type="text/scss" href="/muk_web_utils/static/src/scss/switch.scss" /> |
|||
<link rel="stylesheet" type="text/scss" href="/muk_web_utils/static/src/scss/dropzone.scss" /> |
|||
<link rel="stylesheet" type="text/scss" href="/muk_web_utils/static/src/scss/module.scss" /> |
|||
<link rel="stylesheet" type="text/scss" href="/muk_web_utils/static/src/scss/color.scss" /> |
|||
<link rel="stylesheet" type="text/scss" href="/muk_web_utils/static/src/scss/binary.scss" /> |
|||
<link rel="stylesheet" type="text/scss" href="/muk_web_utils/static/src/scss/image.scss" /> |
|||
<link rel="stylesheet" type="text/scss" href="/muk_web_utils/static/src/scss/copy.scss" /> |
|||
<link rel="stylesheet" type="text/scss" href="/muk_web_utils/static/src/scss/share.scss" /> |
|||
<link rel="stylesheet" type="text/scss" href="/muk_web_utils/static/src/scss/notification.scss" /> |
|||
</xpath> |
|||
<xpath expr="//script[last()]" position="after"> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/core/utils.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/core/async.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/core/files.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/core/dropzone.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/core/mimetype.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/core/dialog.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/services/notification_service.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/widgets/notification.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/fields/abstract.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/fields/utils.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/fields/color.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/fields/image.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/fields/copy.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/fields/share.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/fields/path.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/fields/binary.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/fields/module.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/fields/domain.js" /> |
|||
<script type="text/javascript" src="/muk_web_utils/static/src/js/views/form/renderer.js" /> |
|||
</xpath> |
|||
</template> |
|||
|
|||
<template id="qunit_suite" name="QUnit Assets" inherit_id="web.qunit_suite"> |
|||
<xpath expr="//script[last()]" position="after"> |
|||
<script type="text/javascript" src="/muk_web_utils/static/tests/fields.js" /> |
|||
</xpath> |
|||
</template> |
|||
|
|||
</odoo> |
@ -0,0 +1,23 @@ |
|||
################################################################################### |
|||
# |
|||
# Copyright (c) 2017-2019 MuK IT GmbH. |
|||
# |
|||
# This file is part of MuK Web Utils |
|||
# (see https://mukit.at). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Lesser General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
from . import test_js |
@ -0,0 +1,41 @@ |
|||
################################################################################### |
|||
# |
|||
# Copyright (c) 2017-2019 MuK IT GmbH. |
|||
# |
|||
# This file is part of MuK Web Utils |
|||
# (see https://mukit.at). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Lesser General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
import os |
|||
import json |
|||
import logging |
|||
import requests |
|||
import unittest |
|||
|
|||
from odoo import _, http, tools, SUPERUSER_ID |
|||
from odoo.tests.common import HttpCase |
|||
|
|||
from odoo.addons.muk_utils.tools.json import RecordEncoder |
|||
|
|||
_path = os.path.dirname(os.path.dirname(__file__)) |
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
class WebSuite(HttpCase): |
|||
|
|||
@unittest.skip("") |
|||
def test_js(self): |
|||
self.browser_js('/web/tests?module=muk_web_utils&failfast', "", "", login='admin', timeout=1800) |
@ -0,0 +1,49 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-2019 MuK IT GmbH. |
|||
|
|||
This file is part of MuK Web Utils |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<odoo> |
|||
|
|||
<record id="res_config_settings_view_form" model="ir.ui.view"> |
|||
<field name="name">res.config.settings.view.form</field> |
|||
<field name="model">res.config.settings</field> |
|||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/> |
|||
<field name="arch" type="xml"> |
|||
<div name="storage" position="inside"> |
|||
<div class="col-12 col-lg-6 o_setting_box"> |
|||
<div class="o_setting_left_pane"></div> |
|||
<div class="o_setting_right_pane"> |
|||
<label for="binary_max_size"/> |
|||
<div class="text-muted"> |
|||
Maximum allowed file size in MB |
|||
</div> |
|||
<div class="mt8"> |
|||
<field name="binary_max_size" class="o_light_label"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</field> |
|||
</record> |
|||
|
|||
</odoo> |