-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- remove Powered by Odoo into survey website
- Loading branch information
Showing
7 changed files
with
59 additions
and
0 deletions.
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,3 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from .hooks import post_init_hook |
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 2016 Tecnativa, S.L. - Vicent Cubells | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Remove Odoo Branding from Survey", | ||
"version": "16.0.1.0.0", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/survey", | ||
"license": "AGPL-3", | ||
"category": "Marketing/Surveys", | ||
"depends": ["survey"], | ||
"data": ["templates/disable_odoo.xml"], | ||
"installable": True, | ||
"post_init_hook": "post_init_hook", | ||
} |
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,20 @@ | ||
# Copyright (C) 2020 Alexandre Díaz - Tecnativa S.L. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from odoo import SUPERUSER_ID, api | ||
from odoo.tools import config | ||
|
||
|
||
def post_init_hook(cr, registry): | ||
# This is here to not broke the tests. The idea: | ||
# - XML changes in website are made using 'customize_show=True' | ||
# - When Odoo is running in testing mode, we disable our changes | ||
# - When run our test, we enable the changes and test it. (see test file) | ||
# | ||
# For the user it has no impact (only more customizable options in the website) | ||
# For CI/CD avoids problems testing modules that removes/positioning elements | ||
# that other modules uses in their tests. | ||
if config["test_enable"] or config["test_file"]: | ||
env = api.Environment(cr, SUPERUSER_ID, {}) | ||
env.ref( | ||
"survey_odoo_debranding.frontend_layout_remove_brand" | ||
).active = False |
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 @@ | ||
* `TechnoLibre <https://technolibre.ca>`_: | ||
|
||
* Mathieu Benoit |
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 @@ | ||
This module remove Odoo branding on survey: | ||
|
||
* Remove "Powered by Odoo" from footer |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,16 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<!-- Remove "Powered by Odoo" --> | ||
<template | ||
id="frontend_layout_remove_brand" | ||
inherit_id="survey.layout" | ||
customize_show="True" | ||
name="Remove Odoo Promotional Link" | ||
priority="999" | ||
> | ||
<xpath | ||
expr="//div[hasclass('o_survey_brand_message')]/div[hasclass('d-inline-block')]" | ||
position="replace" | ||
/> | ||
</template> | ||
</odoo> |