summaryrefslogtreecommitdiff
path: root/addons/base_import_module/tests
diff options
context:
space:
mode:
Diffstat (limited to 'addons/base_import_module/tests')
-rw-r--r--addons/base_import_module/tests/test_module/__manifest__.py19
-rw-r--r--addons/base_import_module/tests/test_module/static/src/img/c64.pngbin0 -> 24385 bytes
-rw-r--r--addons/base_import_module/tests/test_module/static/src/js/test.js1
-rw-r--r--addons/base_import_module/tests/test_module/test.xml49
4 files changed, 69 insertions, 0 deletions
diff --git a/addons/base_import_module/tests/test_module/__manifest__.py b/addons/base_import_module/tests/test_module/__manifest__.py
new file mode 100644
index 00000000..690dddd7
--- /dev/null
+++ b/addons/base_import_module/tests/test_module/__manifest__.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+{
+ 'name': 'Test Module',
+ 'category': 'Website/Website',
+ 'summary': 'Custom',
+ 'version': '1.0',
+ 'description': """
+ Test
+ """,
+ 'depends': ['website'],
+ 'data': [
+ 'test.xml',
+ ],
+ 'installable': True,
+ 'application': True,
+ 'license': 'LGPL-3',
+}
diff --git a/addons/base_import_module/tests/test_module/static/src/img/c64.png b/addons/base_import_module/tests/test_module/static/src/img/c64.png
new file mode 100644
index 00000000..3e8183f9
--- /dev/null
+++ b/addons/base_import_module/tests/test_module/static/src/img/c64.png
Binary files differ
diff --git a/addons/base_import_module/tests/test_module/static/src/js/test.js b/addons/base_import_module/tests/test_module/static/src/js/test.js
new file mode 100644
index 00000000..de803c83
--- /dev/null
+++ b/addons/base_import_module/tests/test_module/static/src/js/test.js
@@ -0,0 +1 @@
+console.log('test_module javascript');
diff --git a/addons/base_import_module/tests/test_module/test.xml b/addons/base_import_module/tests/test_module/test.xml
new file mode 100644
index 00000000..46ffc861
--- /dev/null
+++ b/addons/base_import_module/tests/test_module/test.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <!-- TODO: make test suite -->
+ <record id="base.main_company" model="res.company">
+ <field name="name">The base company is noupdate=1</field>
+ </record>
+
+ <record id="main_company2" model="res.company">
+ <field name="name">Hagrid</field>
+ <field name="report_header">My Company Tagline</field>
+ <field name="currency_id" ref="base.EUR"/>
+ </record>
+
+ <template id="test_page" name="Test Page">
+ <t t-call="website.layout">
+ <h1>
+ This page comes from an imported module!
+ </h1>
+ <p>
+ And this static image too !
+ <img src="/test_module/static/src/img/c64.png" alt='Logo'/>
+ </p>
+ </t>
+ </template>
+
+ <template id="website.homepage">
+ <t t-call="website.layout">
+ <div id="wrap" class="oe_structure oe_empty">
+ This homepage has been overwritten by an imported module !
+ <p>
+ <a href="/page/test_module.test_page">Link to page added by imported module</a>
+ </p>
+ </div>
+ </t>
+ </template>
+
+ <template id="contactus_test" name="Contact Form" inherit_id="website.contactus">
+ <xpath expr="//h1" position="replace">
+ <h1>This contact us title has been changed by an imported module</h1>
+ </xpath>
+ </template>
+
+ <template id="assets" inherit_id="web.assets_backend" name="base module import test">
+ <xpath expr="." position="inside">
+ <script type="text/javascript" src="/test_module/static/src/js/test.js"></script>
+ </xpath>
+ </template>
+
+</odoo>