[NEW] training-tools addons
This commit is contained in:
40
learning_base/views/event_event.xml
Normal file
40
learning_base/views/event_event.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2018 Nicolas JEUDY
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
|
||||
<odoo>
|
||||
<record id="learning_base_event_event_form" model="ir.ui.view">
|
||||
<field name="name">event.event.learning.form.inherit</field>
|
||||
<field name="model">event.event</field>
|
||||
<field name="inherit_id" ref="event.view_event_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<field name="date_tz" position="after">
|
||||
<field name="duration_hour" widget="float_time"/>
|
||||
<field name="duration_days" readonly="1"/>
|
||||
<field name="date_text"/>
|
||||
<field name="hour_text"/>
|
||||
</field>
|
||||
<field name="organizer_id" position="before">
|
||||
<field name="learning_id"/>
|
||||
</field>
|
||||
<field name="organizer_id" position="after">
|
||||
<field name="methodology_partner_id"/>
|
||||
</field>
|
||||
<field name="event_ticket_ids" position="attributes">
|
||||
<attribute name="context">{'default_name': name, 'learning_id': learning_id}</attribute>
|
||||
</field>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
<record id="learning_base_view_event_search" model="ir.ui.view">
|
||||
<field name="name">learning.base.event_search.inherit</field>
|
||||
<field name="model">event.event</field>
|
||||
<field name="inherit_id" ref="event.view_event_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="after">
|
||||
<field name="learning_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
100
learning_base/views/product_template.xml
Normal file
100
learning_base/views/product_template.xml
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2018 Nicolas JEUDY
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
|
||||
<odoo>
|
||||
<record id="learning_base_product_template_form" model="ir.ui.view">
|
||||
<field name="name">product.template.learning.form.inherit</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<div name="button_box" position="inside">
|
||||
<button name="%(ir_actions_act_window_session_r0)d"
|
||||
type="action"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
context="{'search_default_learning_id': active_id, 'default_name': name, 'default_learning_id': active_id}">
|
||||
<field name="count_session" widget="statinfo" string="Sessions"/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<page name="sales" position="after">
|
||||
<page string="Learning" attrs="{'invisible':[('detailed_type','!=','learning')]}" name="Learning">
|
||||
<group name="Informations">
|
||||
<group>
|
||||
<field name="domain_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<group name="Duration">
|
||||
<group>
|
||||
<field name="duration_days"/>
|
||||
<field name="hours_per_day"/>
|
||||
<field name="duration_hour"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="duration_text" placeholder="Specific duration details" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group name="Financial Programs">
|
||||
<field name="financial_program_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
|
||||
<div name="learning_data">
|
||||
<separator string="Goal"/>
|
||||
<div class="alert alert-info" role="alert">
|
||||
To edit content, please go to the website page directly.
|
||||
</div>
|
||||
<field name="goal" readonly="1"/>
|
||||
<separator string="Duration Details"/>
|
||||
<div class="alert alert-info" role="alert">
|
||||
To edit content, please go to the website page directly.
|
||||
</div>
|
||||
|
||||
<field name="duration_html" readonly="1"/>
|
||||
<separator string="Public"/>
|
||||
<div class="alert alert-info" role="alert">
|
||||
To edit content, please go to the website page directly.
|
||||
</div>
|
||||
<field name="public" readonly="1"/>
|
||||
<separator string="Prerequisite"/>
|
||||
<div class="alert alert-info" role="alert">
|
||||
To edit content, please go to the website page directly.
|
||||
</div>
|
||||
<field name="prerequisite" readonly="1"/>
|
||||
<separator string="Content"/>
|
||||
<div class="alert alert-info" role="alert">
|
||||
To edit content, please go to the website page directly.
|
||||
</div>
|
||||
<field name="content" readonly="1"/>
|
||||
<separator string="Organizer"/>
|
||||
<div class="alert alert-info" role="alert">
|
||||
To edit content, please go to the website page directly.
|
||||
</div>
|
||||
<field name="organizer" readonly="1"/>
|
||||
<separator string="Methodology"/>
|
||||
<div class="alert alert-info" role="alert">
|
||||
To edit content, please go to the website page directly.
|
||||
</div>
|
||||
<field name="methodology" readonly="1"/>
|
||||
<separator string="Technical"/>
|
||||
<div class="alert alert-info" role="alert">
|
||||
To edit content, please go to the website page directly.
|
||||
</div>
|
||||
<field name="technic" readonly="1"/>
|
||||
<separator string="Price details"/>
|
||||
<div class="alert alert-info" role="alert">
|
||||
To edit content, please go to the website page directly.
|
||||
</div>
|
||||
<field name="price_html" readonly="1"/>
|
||||
<separator string="Registration"/>
|
||||
<div class="alert alert-info" role="alert">
|
||||
To edit content, please go to the website page directly.
|
||||
</div>
|
||||
<field name="registration" readonly="1"/>
|
||||
</div>
|
||||
</page>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
23
learning_base/views/res_company.xml
Normal file
23
learning_base/views/res_company.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2018 Nicolas JEUDY
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
|
||||
<odoo>
|
||||
<record id="learning_base_view_company_form" model="ir.ui.view">
|
||||
<field name="name">learning_base.view_company_form</field>
|
||||
<field name="model">res.company</field>
|
||||
<field name="inherit_id" ref="base.view_company_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<notebook position="inside">
|
||||
<page name="learning" string="Learning">
|
||||
<group name="legal" string="Legal">
|
||||
<field name="learning_code"/>
|
||||
<field name="learning_support_email"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
22
learning_base/views/res_partner.xml
Normal file
22
learning_base/views/res_partner.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2018 Nicolas JEUDY
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
|
||||
<odoo>
|
||||
<record id="learning_base_view_partner_form" model="ir.ui.view">
|
||||
<field name="name">learning.base.partner.form.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook" position="inside">
|
||||
<page name="learning" string="Learning Info">
|
||||
<group>
|
||||
<field name="is_trainer"/>
|
||||
<field name="is_student"/>
|
||||
<field name="is_learning_contact"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
48
learning_base/views/template.xml
Normal file
48
learning_base/views/template.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="learning_product" inherit_id="website_sale.product" active="True" name="Learning Product">
|
||||
<xpath expr="//div[@id='product_full_description']" position="before">
|
||||
<section t-if="product.is_learning" id="learning_detail" class="container">
|
||||
<h2>Goal</h2>
|
||||
<div itemprop="goal" t-field="product.goal" class="oe_structure mt16" id="product_goal"/>
|
||||
</section>
|
||||
<section t-if="product.is_learning" id="learning_detail" class="container">
|
||||
<h2>Duration Details</h2>
|
||||
<div itemprop="duration_html" t-field="product.duration_html" class="oe_structure mt16" id="product_duration_html"/>
|
||||
</section>
|
||||
<section t-if="product.is_learning" id="learning_public" class="container">
|
||||
<h2>Public</h2>
|
||||
<div itemprop="public" t-field="product.public" class="oe_structure mt16" id="product_public"/>
|
||||
</section>
|
||||
<section t-if="product.is_learning" id="learning_prerequisite" class="container">
|
||||
<h2>Prerequisite</h2>
|
||||
<div itemprop="prerequisite" t-field="product.prerequisite" class="oe_structure mt16" id="product_prerequisite"/>
|
||||
</section>
|
||||
<section t-if="product.is_learning" id="learning_content" class="container">
|
||||
<h2>Content</h2>
|
||||
<div itemprop="content" t-field="product.content" class="oe_structure mt16" id="product_content"/>
|
||||
</section>
|
||||
<section t-if="product.is_learning" id="learning_organizer" class="container">
|
||||
<h2>Organizer</h2>
|
||||
<div itemprop="organizer" t-field="product.organizer" class="oe_structure mt16" id="product_organizer"/>
|
||||
</section>
|
||||
<section t-if="product.is_learning" id="learning_methodology" class="container">
|
||||
<h2>Methodology</h2>
|
||||
<div itemprop="methodology" t-field="product.methodology" class="oe_structure mt16" id="product_methodology"/>
|
||||
</section>
|
||||
<section t-if="product.is_learning" id="learning_technic" class="container">
|
||||
<h2>Technic</h2>
|
||||
<div itemprop="technic" t-field="product.technic" class="oe_structure mt16" id="product_technic"/>
|
||||
</section>
|
||||
<section t-if="product.is_learning" id="learning_technic" class="container">
|
||||
<h2>Price Details</h2>
|
||||
<div t-field="product.price_html" class="oe_structure mt16" id="product_price_html"/>
|
||||
</section>
|
||||
<section t-if="product.is_learning" id="learning_technic" class="container">
|
||||
<h2>Registration Details</h2>
|
||||
<div t-field="product.registration" class="oe_structure mt16" id="product_registration"/>
|
||||
</section>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
Reference in New Issue
Block a user