@@ -195,7 +195,7 @@
|
||||
</ul>
|
||||
<h4><t t-esc="record.name.value.substr(0,32)"/><t t-if="record.name.value.length > 32">...</t></h4>
|
||||
<h4 id="list" height="10px">
|
||||
<a>
|
||||
<a id="1">
|
||||
<t t-if="record.task.raw_value">
|
||||
<button name="open_tasks" id = "open_tasks" class="oe_project_buttons" type="object"><t t-if="record.open_task.value <= 1"> Task</t><t t-if="record.open_task.value > 1"> Tasks</t>(<t t-esc="record.open_task.value"/>)</button>
|
||||
</t>
|
||||
|
||||
@@ -24,6 +24,18 @@ openerp.project = function(openerp) {
|
||||
//if task is true , then open the task when click on the anywhere in the box.
|
||||
if(this.record.task.raw_value)$(this.$element).find('.click_button').attr('data-name','open_tasks');
|
||||
if(!this.record.task.raw_value)$(this.$element).find('.click_button').attr('data-name','dummy');
|
||||
|
||||
// set sequence like Tasks,Issues,Timesheets and Phases
|
||||
my_list = $("#list a")
|
||||
my_list.sort(function (a, b) {
|
||||
var aValue = parseInt(a.id);
|
||||
var bValue = parseInt(b.id);
|
||||
// ASC
|
||||
//return aValue == bValue ? 0 : aValue < bValue ? -1 : 1;
|
||||
// DESC
|
||||
return aValue == bValue ? 0 : aValue < bValue ? -1 : 1;
|
||||
});
|
||||
$('#list').replaceWith(my_list);
|
||||
};
|
||||
self._super();
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@
|
||||
<field name="total_issues" invisible="1"/>
|
||||
</field>
|
||||
<xpath expr="//h4[@id='list']" position="inside">
|
||||
<a>
|
||||
<a id="2">
|
||||
<t t-if="record.issues.raw_value">
|
||||
<button name="open_issues" class="oe_project_buttons" type="object"><t t-if="record.total_issues.value <= 1"> Issue</t><t t-if="record.total_issues.value > 1"> Issues</t>(<t t-esc="record.total_issues.value"/>)</button>
|
||||
</t>
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<field name="open_phases"/>
|
||||
</field>
|
||||
<xpath expr="//h4[@id='list']" position="inside">
|
||||
<a>
|
||||
<a id="4">
|
||||
<t t-if="record.phases.raw_value">
|
||||
<button name="open_phase" class="oe_project_buttons" type="object"><t t-if="record.open_phases.value <= 1"> Phase</t><t t-if="record.open_phases.value > 1"> Phases</t>(<t t-esc="record.open_phases.value"/>)</button>
|
||||
</t>
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
<field name="total_timesheet"/>
|
||||
<field name="currency_id"/>
|
||||
</field>
|
||||
<xpath expr="//h4[@id='list']" position="inside">
|
||||
<a>
|
||||
<t t-if="record.timesheets.raw_value">
|
||||
<button name="open_timesheets" class="oe_project_buttons" type="object"><t t-if="record.total_timesheet.value <= 1"> Timesheet</t><t t-if="record.total_timesheet.value > 1"> Timesheets</t>(<t t-esc="record.total_timesheet.value"/>)</button>
|
||||
</t>
|
||||
</a>
|
||||
</xpath>
|
||||
<xpath expr="//h4[@id='list']" position="inside">
|
||||
<a id="3">
|
||||
<t t-if="record.timesheets.raw_value">
|
||||
<button name="open_timesheets" class="oe_project_buttons" type="object"><t t-if="record.total_timesheet.value <= 1"> Timesheet</t><t t-if="record.total_timesheet.value > 1"> Timesheets</t>(<t t-esc="record.total_timesheet.value"/>)</button>
|
||||
</t>
|
||||
</a>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//tr[@id='deadline']" position="before">
|
||||
<tr >
|
||||
|
||||
Reference in New Issue
Block a user