flectra/doc/howtos/backend/exercise-kanban
flectra-admin 769eafb483 [INIT] Inception of Flectra from Odoo
Flectra is Forked from Odoo v11 commit : (6135e82d73)
2018-01-16 11:45:59 +05:30

79 lines
3.9 KiB
Plaintext

# HG changeset patch
# Parent 8d66f7620781558d4520f97e4cebc14ed180683e
Index: addons/openacademy/models.py
===================================================================
--- addons.orig/openacademy/models.py 2014-08-28 14:21:58.627015606 +0200
+++ addons/openacademy/models.py 2014-08-28 14:21:58.623015606 +0200
@@ -47,6 +47,7 @@
duration = fields.Float(digits=(6, 2), help="Duration in days")
seats = fields.Integer(string="Number of seats")
active = fields.Boolean(default=True)
+ color = fields.Integer()
instructor_id = fields.Many2one('res.partner', string="Instructor",
domain=['|', ('instructor', '=', True),
Index: addons/openacademy/views/openacademy.xml
===================================================================
--- addons.orig/openacademy/views/openacademy.xml 2014-08-28 14:21:58.627015606 +0200
+++ addons/openacademy/views/openacademy.xml 2014-08-28 14:21:58.623015606 +0200
@@ -166,11 +166,57 @@
</field>
</record>
+ <record model="ir.ui.view" id="view_openacad_session_kanban">
+ <field name="name">openacad.session.kanban</field>
+ <field name="model">openacademy.session</field>
+ <field name="arch" type="xml">
+ <kanban default_group_by="course_id">
+ <field name="color"/>
+ <templates>
+ <t t-name="kanban-box">
+ <div
+ t-attf-class="oe_kanban_color_{{kanban_getcolor(record.color.raw_value)}}
+ oe_kanban_global_click_edit oe_semantic_html_override
+ oe_kanban_card {{record.group_fancy==1 ? 'oe_kanban_card_fancy' : ''}}">
+ <div class="oe_dropdown_kanban">
+ <!-- dropdown menu -->
+ <div class="oe_dropdown_toggle">
+ <i class="fa fa-bars fa-lg"/>
+ <ul class="oe_dropdown_menu">
+ <li>
+ <a type="delete">Delete</a>
+ </li>
+ <li>
+ <ul class="oe_kanban_colorpicker"
+ data-field="color"/>
+ </li>
+ </ul>
+ </div>
+ <div class="oe_clear"></div>
+ </div>
+ <div t-attf-class="oe_kanban_content">
+ <!-- title -->
+ Session name:
+ <field name="name"/>
+ <br/>
+ Start date:
+ <field name="start_date"/>
+ <br/>
+ duration:
+ <field name="duration"/>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
<record model="ir.actions.act_window" id="session_list_action">
<field name="name">Sessions</field>
<field name="res_model">openacademy.session</field>
<field name="view_type">form</field>
- <field name="view_mode">tree,form,calendar,gantt,graph</field>
+ <field name="view_mode">tree,form,calendar,gantt,graph,kanban</field>
</record>
<menuitem id="session_menu" name="Sessions"