Skip to content

Commit

Permalink
fix: context in odoo 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Tardo committed Oct 8, 2024
1 parent 31a6a11 commit 9436836
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

**11.6.0**

```
IMP: Support Odoo 18.0
FIX: Paste clipboard content in the terminal input
```

**11.5.2**

```
Expand Down
10 changes: 5 additions & 5 deletions src/js/page/odoo/utils/get_odoo_session.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

import getOdooService from './get_odoo_service';

let cachedSession;
export default function (): OdooSession | void {
const sess_obj = getOdooService('web.session', '@web/session');
if (!sess_obj) {
return odoo.session_info || odoo.info;
cachedSession = odoo.session_info || odoo.info;
} else if (Object.hasOwn(sess_obj, 'session')) {
cachedSession = sess_obj.session;
}
if (Object.hasOwn(sess_obj, 'session')) {
return sess_obj.session;
}
return sess_obj;
return cachedSession || sess_obj;
}

0 comments on commit 9436836

Please sign in to comment.