forked from Techsystech/web
[FIX] web_timeline: Wrap fields_get arg into a list
By contract the first argument of the `fields_get` method is supposed to be a list. Before this fix, `web_timeline` would call `fields_get` with a string instead of a list. Fortunately in case only 1 field is being grouped, this worked as Odoo does an `x in y` comparison in its `fields_get` implementation, which does pass in a simple `"project_id" in "project_id"` case. But that call remains invalid and can break when `fields_get` has been tweaked by other modules.16.0
parent
e703dd3bfc
commit
bc577b6656
|
@ -10,6 +10,12 @@
|
||||||
* Pedro M. Baeza
|
* Pedro M. Baeza
|
||||||
* Alexandre Díaz
|
* Alexandre Díaz
|
||||||
* César A. Sánchez
|
* César A. Sánchez
|
||||||
|
|
||||||
* `Onestein <https://www.onestein.nl>`_:
|
* `Onestein <https://www.onestein.nl>`_:
|
||||||
|
|
||||||
* Dennis Sluijk <d.sluijk@onestein.nl>
|
* Dennis Sluijk <d.sluijk@onestein.nl>
|
||||||
* Anjeel Haria
|
* Anjeel Haria
|
||||||
|
|
||||||
|
* `XCG Consulting <https://xcg-consulting.fr>`_:
|
||||||
|
|
||||||
|
* Houzéfa Abbasbhay
|
||||||
|
|
|
@ -399,7 +399,7 @@ odoo.define("web_timeline.TimelineRenderer", function (require) {
|
||||||
await this._rpc({
|
await this._rpc({
|
||||||
model: this.modelName,
|
model: this.modelName,
|
||||||
method: "fields_get",
|
method: "fields_get",
|
||||||
args: [grouped_field],
|
args: [[grouped_field]],
|
||||||
context: this.getSession().user_context,
|
context: this.getSession().user_context,
|
||||||
}).then(async (fields) => {
|
}).then(async (fields) => {
|
||||||
if (fields[grouped_field].type === "many2many") {
|
if (fields[grouped_field].type === "many2many") {
|
||||||
|
|
Loading…
Reference in New Issue