Mathias Markl
7 years ago
7 changed files with 241 additions and 6 deletions
-
2muk_web_preview/__init__.py
-
5muk_web_preview/__manifest__.py
-
5muk_web_preview/doc/changelog.rst
-
20muk_web_preview/models/__init__.py
-
64muk_web_preview/models/res_config_settings.py
-
6muk_web_preview/static/description/index.html
-
145muk_web_preview/views/res_config_settings_view.xml
@ -0,0 +1,20 @@ |
|||||
|
################################################################################### |
||||
|
# |
||||
|
# Copyright (C) 2017 MuK IT GmbH |
||||
|
# |
||||
|
# This program is free software: you can redistribute it and/or modify |
||||
|
# it under the terms of the GNU Affero 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 Affero General Public License for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################### |
||||
|
|
||||
|
from . import res_config_settings |
@ -0,0 +1,64 @@ |
|||||
|
################################################################################### |
||||
|
# |
||||
|
# Copyright (C) 2017 MuK IT GmbH |
||||
|
# |
||||
|
# This program is free software: you can redistribute it and/or modify |
||||
|
# it under the terms of the GNU Affero 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 Affero General Public License for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
################################################################################### |
||||
|
|
||||
|
from odoo import api, fields, models |
||||
|
|
||||
|
class ResConfigSettings(models.TransientModel): |
||||
|
|
||||
|
_inherit = 'res.config.settings' |
||||
|
|
||||
|
module_muk_web_preview_audio = fields.Boolean( |
||||
|
string="Preview Audio", |
||||
|
help="Extendes the Preview Dialog to support audio.") |
||||
|
|
||||
|
module_muk_web_preview_csv = fields.Boolean( |
||||
|
string="Preview CSV", |
||||
|
help="Extendes the Preview Dialog to support csv files.") |
||||
|
|
||||
|
module_muk_web_preview_image = fields.Boolean( |
||||
|
string="Preview Image", |
||||
|
help="Extendes the Preview Dialog to support image files.") |
||||
|
|
||||
|
module_muk_web_preview_mail = fields.Boolean( |
||||
|
string="Preview Mail", |
||||
|
help="Extendes the Preview Dialog to support mails.") |
||||
|
|
||||
|
module_muk_web_preview_markdown = fields.Boolean( |
||||
|
string="Preview Markdown", |
||||
|
help="Extendes the Preview Dialog to support markdown files.") |
||||
|
|
||||
|
module_muk_web_preview_msoffice = fields.Boolean( |
||||
|
string="Preview MS Office", |
||||
|
help="Extendes the Preview Dialog to support office files.") |
||||
|
|
||||
|
module_muk_web_preview_rst = fields.Boolean( |
||||
|
string="Preview ReStructuredText", |
||||
|
help="Extendes the Preview Dialog to support reStructuredText.") |
||||
|
|
||||
|
module_muk_web_preview_text = fields.Boolean( |
||||
|
string="Preview Text", |
||||
|
help="Extendes the Preview Dialog to support text files.") |
||||
|
|
||||
|
module_muk_web_preview_vector = fields.Boolean( |
||||
|
string="Preview Vector", |
||||
|
help="Extendes the Preview Dialog to support vector files.") |
||||
|
|
||||
|
module_muk_web_preview_video = fields.Boolean( |
||||
|
string="Preview Video", |
||||
|
help="Extendes the Preview Dialog to support video files.") |
@ -0,0 +1,145 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
|
||||
|
<!-- |
||||
|
Copyright (C) 2017 MuK IT GmbH |
||||
|
|
||||
|
This program is free software: you can redistribute it and/or modify |
||||
|
it under the terms of the GNU Affero 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 Affero General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU Affero 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="integration" position="after"> |
||||
|
<h2>Web Previews</h2> |
||||
|
<div class="row mt16 o_settings_container" name="web_client"> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="module_muk_web_preview_audio" /> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="module_muk_web_preview_audio" /> |
||||
|
<div class="text-muted"> |
||||
|
Extendes the Preview Dialog to support audio |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="module_muk_web_preview_csv" /> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="module_muk_web_preview_csv" /> |
||||
|
<div class="text-muted"> |
||||
|
Extendes the Preview Dialog to support csv files |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="module_muk_web_preview_image" /> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="module_muk_web_preview_image" /> |
||||
|
<div class="text-muted"> |
||||
|
Extendes the Preview Dialog to support image files |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="module_muk_web_preview_mail" /> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="module_muk_web_preview_mail" /> |
||||
|
<div class="text-muted"> |
||||
|
Extendes the Preview Dialog to support mails |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="module_muk_web_preview_markdown" /> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="module_muk_web_preview_markdown" /> |
||||
|
<div class="text-muted"> |
||||
|
Extendes the Preview Dialog to support markdown files |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="module_muk_web_preview_msoffice" /> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="module_muk_web_preview_msoffice" /> |
||||
|
<div class="text-muted"> |
||||
|
Extendes the Preview Dialog to support office files |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="module_muk_web_preview_rst" /> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="module_muk_web_preview_rst" /> |
||||
|
<div class="text-muted"> |
||||
|
Extendes the Preview Dialog to support reStructuredText |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="module_muk_web_preview_text" /> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="module_muk_web_preview_text" /> |
||||
|
<div class="text-muted"> |
||||
|
Extendes the Preview Dialog to support text files |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="module_muk_web_preview_vector" /> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="module_muk_web_preview_vector" /> |
||||
|
<div class="text-muted"> |
||||
|
Extendes the Preview Dialog to support vector files |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12 col-md-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="module_muk_web_preview_video" /> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane"> |
||||
|
<label for="module_muk_web_preview_video" /> |
||||
|
<div class="text-muted"> |
||||
|
Extendes the Preview Dialog to support video files |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue