bemade_fsm, fsm_equipment: fixes #109
Updated report template to use display_name and converted the _compute_complete_name function to _compute_display_name in fsm.equipment model.
This commit is contained in:
parent
8007912746
commit
1a042a720f
5 changed files with 7 additions and 6 deletions
|
|
@ -20,7 +20,7 @@
|
||||||
########################################################################################
|
########################################################################################
|
||||||
{
|
{
|
||||||
"name": "Improved Field Service Management",
|
"name": "Improved Field Service Management",
|
||||||
"version": "17.0.0.4.0",
|
"version": "17.0.0.4.1",
|
||||||
"summary": (
|
"summary": (
|
||||||
"Adds functionality necessary for managing field service operations at Durpro."
|
"Adds functionality necessary for managing field service operations at Durpro."
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -288,7 +288,7 @@
|
||||||
<h3 t-if="intervention.equipment_ids">Equipment:
|
<h3 t-if="intervention.equipment_ids">Equipment:
|
||||||
<t t-foreach="intervention.equipment_ids" t-as="equipment_id">
|
<t t-foreach="intervention.equipment_ids" t-as="equipment_id">
|
||||||
<span
|
<span
|
||||||
t-out="equipment_id.complete_name + (', ' if not equipment_id_last else '')"
|
t-out="equipment_id.display_name + (', ' if not equipment_id_last else '')"
|
||||||
/>
|
/>
|
||||||
</t>
|
</t>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,8 @@
|
||||||
</h1>
|
</h1>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//page[@name='extra_info']" position="after">
|
<xpath expr="//page[@name='extra_info']" position="after">
|
||||||
<page string="Field Service" name="field_service" translate="True">
|
<page string="Equipment and Contacts" name="equipment_contacts"
|
||||||
|
translate="True">
|
||||||
<group name="equipment_and_contacts">
|
<group name="equipment_and_contacts">
|
||||||
<field
|
<field
|
||||||
name="equipment_ids"
|
name="equipment_ids"
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#
|
#
|
||||||
{
|
{
|
||||||
"name": "FSM Equipment",
|
"name": "FSM Equipment",
|
||||||
"version": "17.0.0.1.1",
|
"version": "17.0.0.1.2",
|
||||||
"summary": "Add the notion of client equipment for Field Service",
|
"summary": "Add the notion of client equipment for Field Service",
|
||||||
"category": "Services/Field Service",
|
"category": "Services/Field Service",
|
||||||
"author": "Bemade Inc.",
|
"author": "Bemade Inc.",
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,8 @@ class Equipment(models.Model):
|
||||||
}
|
}
|
||||||
|
|
||||||
@api.depends("code", "name")
|
@api.depends("code", "name")
|
||||||
def _compute_complete_name(self):
|
def _compute_display_name(self):
|
||||||
for rec in self:
|
for rec in self:
|
||||||
tag_part = "[%s] " % rec.code if rec.code else ""
|
tag_part = "[%s] " % rec.code if rec.code else ""
|
||||||
name = rec.name or ""
|
name = rec.name or ""
|
||||||
rec.complete_name = tag_part + name
|
rec.display_name = tag_part + name
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue