Skip to content
Snippets Groups Projects
Commit 0b0fd85c authored by Thomas Lefebvre (thle)'s avatar Thomas Lefebvre (thle)
Browse files

[FIX] mail: add luxon in context


Steps to reproduce:
-------------------
- go to Appraisal app;
- click on Activity button;
- schedule an activity if there is none;

Issue:
------
A traceback occurs.

Solution:
---------
Add luxon library to context.

Note:
-----
Backport of commit:
e602a555

opw-3488028

closes odoo/odoo#134101

Signed-off-by: default avatarFlorent Dardenne (dafl) <dafl@odoo.com>
parent a33fb767
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,7 @@ var ActivityRecord = KanbanRecord.extend({
record: this.record,
user_context: this.getSession().user_context,
widget: this,
luxon,
};
},
});
......
......@@ -608,4 +608,27 @@ QUnit.test('Activity view: apply progressbar filter', async function (assert) {
"other records should be hidden");
});
QUnit.test("Activity view: luxon in renderingContext", async function (assert) {
Object.assign(serverData.views, {
"mail.test.activity,false,activity": `
<activity string="MailTestActivity">
<templates>
<div t-name="activity-box">
<t t-if="luxon">
<span class="luxon">luxon</span>
</t>
</div>
</templates>
</activity>`,
});
const { openView } = await start({
serverData,
});
await openView({
res_model: "mail.test.activity",
views: [[false, "activity"]],
});
assert.containsN(document.body, ".luxon", 2);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment