-
-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[13.0][MIG] website_snippet_preset #688
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8dadb68
[11.0][ADD] website_snippet_preset (#414)
tarteo c76f9f5
[UPD] Update website_snippet_preset.pot
oca-travis cf731e7
[ADD] icon.png
OCA-git-bot d9c3297
[FIX][11.0][WIP] website_snippet_preset travis warning
tbaden 8a6224f
[UPD] Update website_snippet_preset.pot
oca-travis 150047a
[IMP] website_snippet_preset: black, isort
tarteo c2416a0
[MIG] website_snippet_preset: Migration to 13.0
tarteo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png | ||
:target: https://www.gnu.org/licenses/agpl | ||
:alt: License: AGPL-3 | ||
|
||
======================= | ||
Website Snippet Presets | ||
======================= | ||
|
||
This module allows the user to save and restore presets of snippets. | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
#. Go in editing mode on the website | ||
#. Select a snippet | ||
#. Click 'Presets' | ||
#. Click 'Save Current' | ||
#. Select a different snippet of the same type | ||
#. Select the added preset in the 'Load' menu | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/186/11.0 | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/website/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smash it by providing detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Dennis Sluijk <d.sluijk@onestein.nl> | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
To contribute to this module, please visit https://odoo-community.org. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright 2018 Onestein | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2018 Onestein | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Website Snippet Presets", | ||
"summary": "This module allows the user " | ||
"to save and restore presets of snippets.", | ||
"category": "Website", | ||
"version": "13.0.1.0.0", | ||
"author": "Onestein, Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"website": "https://github.com/OCA/website", | ||
"depends": ["website"], | ||
"data": ["templates/assets.xml", "security/ir.model.access.csv"], | ||
"qweb": ["static/src/xml/website_snippet_preset.xml"], | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * website_snippet_preset | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 11.0\n" | ||
"Report-Msgid-Bugs-To: \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: website_snippet_preset | ||
#. openerp-web | ||
#: code:addons/website_snippet_preset/static/src/js/website_snippet_preset.js:17 | ||
#, python-format | ||
msgid "<p>Preset with this name already exists.Do you want to overwrite it?</p>" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#: model:ir.model.fields,field_description:website_snippet_preset.field_snippet_preset_arch | ||
msgid "Arch" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#. openerp-web | ||
#: code:addons/website_snippet_preset/static/src/js/website_snippet_preset.js:61 | ||
#, python-format | ||
msgid "Cancel" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#: model:ir.model.fields,field_description:website_snippet_preset.field_snippet_preset_create_uid | ||
msgid "Created by" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#: model:ir.model.fields,field_description:website_snippet_preset.field_snippet_preset_create_date | ||
msgid "Created on" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#: model:ir.model.fields,field_description:website_snippet_preset.field_snippet_preset_display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#. openerp-web | ||
#: code:addons/website_snippet_preset/static/src/js/website_snippet_preset.js:49 | ||
#, python-format | ||
msgid "Enter Name" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#: model:ir.model.fields,field_description:website_snippet_preset.field_snippet_preset_id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#: model:ir.model.fields,field_description:website_snippet_preset.field_snippet_preset___last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#: model:ir.model.fields,field_description:website_snippet_preset.field_snippet_preset_write_uid | ||
msgid "Last Updated by" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#: model:ir.model.fields,field_description:website_snippet_preset.field_snippet_preset_write_date | ||
msgid "Last Updated on" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#. openerp-web | ||
#: code:addons/website_snippet_preset/static/src/xml/website_snippet_preset.xml:13 | ||
#, python-format | ||
msgid "Load" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#. openerp-web | ||
#: code:addons/website_snippet_preset/static/src/xml/website_snippet_preset.xml:32 | ||
#: model:ir.model.fields,field_description:website_snippet_preset.field_snippet_preset_name | ||
#, python-format | ||
msgid "Name" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#. openerp-web | ||
#: code:addons/website_snippet_preset/static/src/js/website_snippet_preset.js:28 | ||
#, python-format | ||
msgid "No" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#. openerp-web | ||
#: code:addons/website_snippet_preset/static/src/js/website_snippet_preset.js:23 | ||
#, python-format | ||
msgid "Overwrite" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#. openerp-web | ||
#: code:addons/website_snippet_preset/static/src/js/website_snippet_preset.js:16 | ||
#, python-format | ||
msgid "Overwrite?" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#. openerp-web | ||
#: code:addons/website_snippet_preset/static/src/xml/website_snippet_preset.xml:9 | ||
#, python-format | ||
msgid "Presets" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#. openerp-web | ||
#: code:addons/website_snippet_preset/static/src/js/website_snippet_preset.js:56 | ||
#, python-format | ||
msgid "Save" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#. openerp-web | ||
#: code:addons/website_snippet_preset/static/src/xml/website_snippet_preset.xml:11 | ||
#, python-format | ||
msgid "Save Current" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#: model:ir.model.fields,field_description:website_snippet_preset.field_snippet_preset_snippet | ||
msgid "Snippet" | ||
msgstr "" | ||
|
||
#. module: website_snippet_preset | ||
#: model:ir.model,name:website_snippet_preset.model_snippet_preset | ||
msgid "snippet.preset" | ||
msgstr "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright 2018 Onestein | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import snippet_preset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright 2018 Onestein | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class SnippetPreset(models.Model): | ||
_name = "snippet.preset" | ||
|
||
snippet = fields.Char() | ||
name = fields.Char() | ||
arch = fields.Text() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Dennis Sluijk <d.sluijk@onestein.nl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This module allows the user to save and restore presets of snippets. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
To use this module, you need to: | ||
|
||
#. Go in editing mode on the website | ||
#. Select a snippet | ||
#. Click 'Presets' | ||
#. Click 'Save Current' | ||
#. Select a different snippet of the same type | ||
#. Select the added preset in the 'Load' menu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
read,Persission to read presets,model_snippet_preset,website.group_website_publisher,1,0,0,0 | ||
edit,Persission to edit presets,model_snippet_preset,website.group_website_designer,1,1,1,1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions
14
website_snippet_preset/static/src/css/website_snippet_preset.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,14 @@ | ||||||
/* Copyright 2018 Onestein | ||||||
* License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). */ | ||||||
|
||||||
body #oe_manipulators .oe_overlay > .oe_overlay_options { | ||||||
width: 400px; | ||||||
} | ||||||
|
||||||
.o_snippet_preset_del { | ||||||
position: absolute; | ||||||
right: 0px; | ||||||
top: 0px; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
height: 100%; | ||||||
line-height: 200%; | ||||||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.