summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2015-09-14 14:07:19 +0200
committerYannick Tivisse <yti@odoo.com>2015-09-22 11:33:58 +0200
commite5181b05f73364c424ab3e7cef186501b2dcb63a (patch)
tree5a3204d699927804a9bcf96357b64b3d30b833a2 /addons/web/static/src/xml/base.xml
parent8c8fee29ea3ee9737f4da19e7eed2f9937232517 (diff)
[FIX] web_kanban, web: KanbanSelection widget refactoring
- Change the widget behavior from asynchronous to asynchronous, by adding 3 related fields on the project.task model, which are the custom labels defined for the stage - Instead of making a rpc call, we are taking directly the labels on the parent for the kanban view, or on the view datarecord for the form view - There are now 2 templates for the kanban view or the form view - The development has been backported in the community version - The options attribute has been removed on the project_view.xml file for the kanban_state field
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
-rw-r--r--addons/web/static/src/xml/base.xml29
1 files changed, 11 insertions, 18 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index be17df5ba48..435352efc16 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -679,28 +679,21 @@
</t>
</span>
</t>
-<t t-name="KanbanSelection">
- <div class="btn-group kanban_state">
- <t t-foreach="widget.states" t-as="rec">
- <a t-if="widget.get('value') === rec.name">
- <a class="dropdown-toggle" data-toggle="dropdown">
- <span t-att-class="rec.state_class" t-if="widget.get('value') === rec.name" t-att-title="rec.tooltip"/>
- <span class="sr-only">Toggle Dropdown</span>
- </a>
- </a>
- </t>
+<t t-name="FormSelection">
+ <div class="btn-group o_kanban_selection">
+ <a href="#" data-toggle="dropdown"><span class="oe_kanban_status"/></a>
<ul class="dropdown-menu state" role="menu">
- <t t-foreach="widget.states" t-as="rec">
- <t t-if="widget.get('value') !== rec.name">
- <li t-att-data-value="rec.name" ><a href="#">
- <span t-att-class="rec.state_class" t-att-title="rec.tooltip"/>
- <t t-raw="rec.state_name" /></a>
- </li>
- </t>
- </t>
</ul>
</div>
</t>
+<t t-name="FormSelection.items">
+ <li t-foreach="states" t-as="rec" t-att-data-value="rec.name">
+ <a href="#">
+ <span t-att-class="'oe_kanban_status ' + (rec.state_class &amp;&amp; rec.state_class || '')"/>
+ <t t-raw="rec.state_name"/>
+ </a>
+ </li>
+</t>
<div t-name="Priority" class="o_priority">
<a t-if="!widget.readonly" t-foreach="widget.values.slice(1)" t-as="v" href="#" t-att-data-value="v[0]" t-att-title="v[1]" class="o_priority_star fa"/>
<span t-if="widget.readonly" t-foreach="widget.values.slice(1)" t-as="v" t-att-data-value="v[0]" t-att-title="v[1]" class="o_priority_star fa"/>