[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:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user