Browse Source

[ADD] inject xmlids in an indirect way to avoid warnings

pull/204/head
Holger Brunn 7 years ago
parent
commit
facfa8bdaa
No known key found for this signature in database GPG Key ID: 1C9760FECA3AE18
  1. 20
      mail_activity/data/ir_model_data.xml
  2. 2
      mail_activity/data/mail_message_subtype.xml
  3. 1
      mail_activity/models/__init__.py
  4. 2
      mail_activity/views/mail_activity.xml

20
mail_activity/data/ir_model_data.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo noupdate="1">
<!-- inject xmlids so that we can address the records via its
mail xmlid as we'd do it in 11.0
/-->
<record id="xmlid_mail_mt_activities" model="ir.model.data">
<field name="model">mail.message.subtype</field>
<field name="res_id" ref="mt_activities" />
<field name="module">mail</field>
<field name="name">mt_activities</field>
<field name="noupdate" eval="True" />
</record>
<record id="xmlid_mail_message_activity_done" model="ir.model.data">
<field name="model">ir.ui.view</field>
<field name="res_id" ref="message_activity_done" />
<field name="module">mail</field>
<field name="name">message_activity_done</field>
<field name="noupdate" eval="True" />
</record>
</odoo>

2
mail_activity/data/mail_message_subtype.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="mail.mt_activities" model="mail.message.subtype">
<record id="mt_activities" model="mail.message.subtype">
<field name="name">Activities</field>
<field name="default" eval="True"/>
<field name="internal" eval="True"/>

1
mail_activity/models/__init__.py

@ -5,3 +5,4 @@ from . import mail_activity_type
from . import mail_activity
from . import mail_activity_mixin
from . import res_partner
from . import mail_message

2
mail_activity/views/mail_activity.xml

@ -161,7 +161,7 @@
</field>
</record>
<template id="mail.message_activity_done">
<template id="message_activity_done">
<div>
<p>
<strong><span t-attf-class="fa #{activity.activity_type_id.icon}"/></strong> <span t-field="activity.activity_type_id.name"/> done

Loading…
Cancel
Save