Skip to content

Commit

Permalink
[FIX] survey: properly inherit survey assets in website_survey module
Browse files Browse the repository at this point in the history
Purpose
=======

Survey assets were incorrectly overridden in the website_survey module and all copy/pasted.

This will correctly include the survey_assets template and get rid of these copy/pasted
assets references, while keeping the website style on survey pages.

Task: #1915790
closes #29314
  • Loading branch information
awa-odoo authored and tde-banana-odoo committed Dec 7, 2018
1 parent f0d5a5b commit 8f89c1b
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions addons/website_survey/views/website_survey_templates.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<template id="survey_login_layout" inherit_id="survey.layout" name="Website Survey Login Layout">
<template id="website_survey_layout" inherit_id="survey.layout" name="Website Survey Layout">
<xpath expr="t" position="replace">
<t t-call="website.layout">
<t t-set="head">
<t t-raw="head"/>
<t t-call-assets="survey.survey_assets"/>
</t>
<t t-raw="0"/>
</t>
</xpath>
</template>

<template id="assets_frontend" inherit_id="website.assets_frontend" name="Survey Assets">
<xpath expr="." position="inside">
<script src="/web/static/lib/nvd3/d3.v3.js"/>
<script src="/web/static/lib/nvd3/nv.d3.js"/>
<script type="text/javascript" src="/survey/static/src/js/survey_result.js"/>
<script type="text/javascript" src="/survey/static/src/js/survey.js"/>
<script type="text/javascript" src="/survey/static/src/js/tour_test_survey.js"/>
<script type="text/javascript" src="/web/static/src/js/fields/field_utils.js"/>
<link href="/survey/static/src/css/survey_print.css" rel="stylesheet" type="text/css"/>
<link href="/web/static/lib/nvd3/nv.d3.css" rel="stylesheet" type="text/css"/>
<link href="/survey/static/src/css/survey_result.css" rel="stylesheet" type="text/css"/>
</xpath>
</template>
</odoo>

0 comments on commit 8f89c1b

Please sign in to comment.