[FIX] project: parse the context given by the backend
Before this commit, the context retrieves when the user clicks on a Profitability section is not parse, and since this context is a string containing the JS object with the context added, the context is not correctly added with the existing context. This commit parses the added context to correctly append it with the initial one. task-2814466 Part-of: odoo/odoo#88219
This commit is contained in:
@@ -82,10 +82,7 @@ export default class ProjectRightPanel extends LegacyComponent {
|
||||
if (dataset.resId) {
|
||||
args.push(Number(dataset.resId));
|
||||
}
|
||||
let context = {};
|
||||
if (dataset.context) {
|
||||
context = dataset.context;
|
||||
}
|
||||
const context = dataset.context ? JSON.parse(dataset.context) : {};
|
||||
action = await this.rpc({
|
||||
// Use the call_button method in order to have an action
|
||||
// with the correct view naming, i.e. list view is named
|
||||
|
||||
Reference in New Issue
Block a user