[IMP] fleet: Add 'Next Activities' on vehicles

This commit adds:
- The button on the chatter
- The button on the kanban card and a progress bar on top of the stage
This commit is contained in:
Yannick Tivisse
2018-04-27 17:30:30 +02:00
parent 3fc4c3b966
commit 7356c3b5b6
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ from odoo import api, fields, models, _
class FleetVehicle(models.Model):
_inherit = 'mail.thread'
_inherit = ['mail.thread', 'mail.activity.mixin']
_name = 'fleet.vehicle'
_description = 'Information on a vehicle'
_order = 'license_plate asc, acquisition_date asc'
@@ -112,6 +112,7 @@
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread" options='{"thread_level": 1}'/>
</div>
</form>
@@ -178,6 +179,9 @@
<field name="contract_renewal_name" />
<field name="contract_renewal_total" />
<field name="contract_count" />
<field name="activity_ids"/>
<field name="activity_state"/>
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="kanban-box">
@@ -215,6 +219,9 @@
</span>
</a>
</div>
<div class="o_kanban_inline_block">
<field name="activity_ids" widget="kanban_activity"/>
</div>
</div>
</t>
</templates>