[FIX] mail: Don't send negative id via rpc
Issue
- Install live chat and website
- In incognito mode, send a message via live chat (as public user)
- Log in the database
Erro: Record does not exist or has been deleted. (Record: res.partner(-1,), User: 2)
Cause
Guest with negative id are sent to the server
Solution
Don't send negative id
opw-2371677
closes odoo/odoo#61407
X-original-commit: 5dfd793470deed9ab459ccb2d747511213bc5bf9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -224,7 +224,7 @@ function factory(dependencies) {
|
||||
static async _fetchImStatus() {
|
||||
const partnerIds = [];
|
||||
for (const partner of this.all()) {
|
||||
if (partner.im_status !== 'im_partner') {
|
||||
if (partner.im_status !== 'im_partner' && partner.id > 0) {
|
||||
partnerIds.push(partner.id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user