[FIX] bus: restore current partner in pyEnv

Since [1], `pyEnv.currentPartner` has been removed. This was
a mistake since this information is still used during tests.

This PR restores it.

[1]: https://github.com/odoo/odoo/pull/98374

closes odoo/odoo#103544

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
tsm-odoo
2022-10-19 18:06:50 +02:00
parent c3638cef9b
commit 7277275d06
@@ -104,6 +104,12 @@ let pyEnv;
}
pyEnv = new Proxy(
{
get currentPartner() {
if ('res.partner' in this.mockServer.models) {
return this.mockServer.getRecords('res.partner', [['id', '=', this.currentPartnerId]])[0];
}
return undefined;
},
getData() {
return this.mockServer.models;
},