Files
odoo_source/addons/web
Arnaud Joset 4e006fb831 [FIX] web: prevent traceback during calendar popover processing
Before this commit, a traceback would occurs in sale_management calendar view when the user would try to display the popover of a sale_order.

```js
basic_model.js:2399 Uncaught (in promise) Error: for modifier "readonly": Unknown field state in domain
    at Class._evalModifiers (basic_model.js:2399)
    at calendar_popover.js:203
    at Function._.each._.forEach (underscore.js:145)
    at calendar_popover.js:180
    at async Promise.all (index 1)
_evalModifiers @ basic_model.js:2399
(anonymous) @ calendar_popover.js:203
_.each._.forEach @ underscore.js:145
(anonymous) @ calendar_popover.js:180
Promise.then (async)
_renderEventPopover @ calendar_renderer.js:861
eventClick @ calendar_renderer.js:416
Calendar.publiclyTrigger @ main.js:6981
EventClicking._this.handleSegClick @ main.js:6462
realHandler @ main.js:385
```

It would happen because the domain of the partner_id is ["state", "not in", ['draft', 'sent']] but the state field is invisible="1" in the view.
state was absent during of the evalContext in the _evalModifiers function.

closes odoo/odoo#72617

Taskid: 2524993
X-original-commit: 0d636c0f8dbcfb4b7adda26c0edc02a12b0c7e44
Signed-off-by: Michaël Mattiello <mcm-odoo@users.noreply.github.com>
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-06-23 11:15:21 +00:00
..
2021-06-18 21:31:27 +02:00