[ADD] base modules
This commit is contained in:
22
web_cohort/views/assets.xml
Executable file
22
web_cohort/views/assets.xml
Executable file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="assets_backend" name="cohort assets" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript" src="/web_cohort/static/src/js/cohort_view.js" />
|
||||
<script type="text/javascript" src="/web_cohort/static/src/js/cohort_model.js" />
|
||||
<script type="text/javascript" src="/web_cohort/static/src/js/cohort_controller.js" />
|
||||
<script type="text/javascript" src="/web_cohort/static/src/js/cohort_renderer.js" />
|
||||
<script type="text/javascript" src="/web_cohort/static/src/js/sample_server.js" />
|
||||
<link rel="stylesheet" type="text/scss" href="/web_cohort/static/src/scss/web_cohort.scss" />
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="qunit_suite" name="cohort tests" inherit_id="web.qunit_suite_tests">
|
||||
<xpath expr="//script[contains(@src, '/web/static/tests/views/kanban_tests.js')]" position="after">
|
||||
<script type="text/javascript" src="/web_cohort/static/tests/cohort_tests.js" />
|
||||
<script type="text/javascript" src="/web_cohort/static/tests/mock_server.js" />
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
104
web_cohort/views/cohort.rng
Executable file
104
web_cohort/views/cohort.rng
Executable file
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
|
||||
xmlns:a="http://relaxng.org/ns/annotation/1.0"
|
||||
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
||||
|
||||
<start>
|
||||
<ref name="cohort" />
|
||||
</start>
|
||||
|
||||
<define name="cohort">
|
||||
<element name="cohort">
|
||||
<attribute name="string"/>
|
||||
<attribute name="date_start"/>
|
||||
<attribute name="date_stop"/>
|
||||
<optional><attribute name="mode"/></optional>
|
||||
<optional><attribute name="timeline"/></optional>
|
||||
<optional><attribute name="interval"/></optional>
|
||||
<optional><attribute name="measure"/></optional>
|
||||
<optional><attribute name="sample"/></optional>
|
||||
<zeroOrMore>
|
||||
<ref name="field"/>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="field">
|
||||
<element name="field">
|
||||
<attribute name="name"/>
|
||||
<ref name="overload"/>
|
||||
<optional><attribute name="modifiers"/></optional>
|
||||
<optional><attribute name="attrs"/></optional>
|
||||
<optional><attribute name="string"/></optional>
|
||||
<optional><attribute name="invisible"/></optional>
|
||||
<zeroOrMore>
|
||||
<choice>
|
||||
<ref name="field"/>
|
||||
<ref name="xpath"/>
|
||||
</choice>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="overload">
|
||||
<optional>
|
||||
<!--
|
||||
Alter matched element with content
|
||||
-->
|
||||
<choice>
|
||||
<attribute name="position">
|
||||
<choice>
|
||||
<!-- Insert content before first child -->
|
||||
<value>before</value>
|
||||
<!-- Insert content after last child -->
|
||||
<value>after</value>
|
||||
<!-- Replace all children with content -->
|
||||
<value>inside</value>
|
||||
<!-- Replace matched element itself with content -->
|
||||
<value>replace</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
<group>
|
||||
<attribute name="position">
|
||||
<!-- Edit element attributes -->
|
||||
<value>attributes</value>
|
||||
</attribute>
|
||||
<oneOrMore>
|
||||
<element name="attribute">
|
||||
<attribute name="name"><text/></attribute>
|
||||
<text />
|
||||
</element>
|
||||
</oneOrMore>
|
||||
</group>
|
||||
</choice>
|
||||
</optional>
|
||||
</define>
|
||||
|
||||
<define name="any">
|
||||
<element>
|
||||
<anyName/>
|
||||
<zeroOrMore>
|
||||
<choice>
|
||||
<attribute>
|
||||
<anyName/>
|
||||
</attribute>
|
||||
<text/>
|
||||
<ref name="any"/>
|
||||
</choice>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name="xpath">
|
||||
<element name="xpath">
|
||||
<optional><attribute name="expr"/></optional>
|
||||
<ref name="overload"/>
|
||||
<zeroOrMore>
|
||||
<choice>
|
||||
<ref name="any"/>
|
||||
<ref name="field"/>
|
||||
</choice>
|
||||
</zeroOrMore>
|
||||
</element>
|
||||
</define>
|
||||
</grammar>
|
||||
Reference in New Issue
Block a user