| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Website (website)
• Discuss (mail) |
| Community Apps Dependencies | Show |
| Lines of code | 1651 |
| Technical Name |
d_website_amp_editor_badges |
| License | OPL-1 |
| Website | https://duong-odoo-apps.odoo.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Website (website)
• Discuss (mail) |
| Community Apps Dependencies | Show |
| Lines of code | 1651 |
| Technical Name |
d_website_amp_editor_badges |
| License | OPL-1 |
| Website | https://duong-odoo-apps.odoo.com |
AMP Editor Badges for Odoo Website Builder
Help website editors understand how Odoo snippets behave in AMP output before publishing or updating pages.
Snippet badges indicate whether a block is AMP-safe, degraded in AMP output, or removed from AMP pages. This gives editors better visibility when building pages that should also work well as AMP alternatives.
Snippet compatibility badges
- AMP Safe: The snippet is expected to work well in AMP output.
- AMP Degraded: The snippet can be displayed, but some interactive behavior may be reduced.
- AMP Removed: The snippet is not suitable for AMP and may be removed from the AMP version.
The badge registry can be extended by related modules, including blog and eCommerce AMP modules.
Editor visibility
Badges help authors identify AMP-friendly and AMP-limited blocks while building pages in the standard Odoo website editor. This makes it easier to choose snippets that will produce useful AMP alternatives.
Developer tools and precheck endpoint
Developer-oriented details can help technical users understand why a snippet is safe, degraded, or removed from AMP output.
A precheck endpoint is available for custom editor workflows that want to warn authors about AMP compatibility before publishing.
Best used with AMP validation
Editor badges provide early guidance, while the validation dashboard should be used to review the final AMP output for important public pages before production use.
Documentation
Open the Documentation tab on the right of this page for details. Installs alongside Website AMP and the website editor.
Support
Contact us at duongodooapps@gmail.com
Website AMP — Editor Readiness Badges Guide
d_website_amp_editor_badges shows AMP-readiness chips on every snippet in the website editor and adds an AMP Developer Tools preference. It installs automatically with Website AMP and the website editor.
1. Reading the chips
Open any page in the website editor and look at the blocks panel. Each snippet carries a chip:
- AMP ✓ — converts cleanly to AMP.
- AMP ⚠ — degrades: it still renders on AMP but loses some interactivity or animation.
- AMP ✗ — stripped: there is no AMP-legal equivalent (for example third-party JavaScript widgets), so the block is removed from the AMP page.
Hover a chip to see a short explanation. The classification lives in the website_amp.snippet_fidelity registry, which the blog and eCommerce apps extend with their own snippets.
Close-up of the chip styling:
2. Developer Tools
Enable AMP Developer Tools from your user preferences (top-right user menu → My Preferences → AMP):
When on, each chip's tooltip also shows the snippet key and the exact fidelity level, which is handy when building or debugging custom snippets.
3. Pre-publish validation
The module exposes a /website_amp/precheck endpoint that converts a chunk of page HTML to AMP and returns any validation errors (code, message, source sanitizer). This is the hook used to warn about AMP issues before content is saved.
Notes & limitations
- The chips are added defensively by observing the editor's block panel; if a future editor refactor changes the panel markup, the chips simply stop appearing — they never interfere with editing.
Support
Questions or issues: duongodooapps@gmail.com
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module