Files
odoo_source/odoo
Denis Ledoux 8865d63134 [FIX] res_partner: a partner is portal if he has no employee users
Currently, a partner is considered a portal
if he has no users
or
if at least one of his users is portal.

This causes problems if an employee has two users,
one portal, one employee
and gets notified in a thread (e.g. @ Marc demo):
The email sent won't contain the action buttons (e.g. view opportunity)
because the employee is considered as portal.

A partner of an employee can have multiple users
linked if at some point two partners were merged,
and the partners had each a user, one a portal
and the other an employee.

This revision changes this behavior,
to consider a user as not portal (employee)
if one of its users is not a portal (an employee).

This is uniform with to the behavior of the
`share` field of `res.users`,
which is `True` when the user is part of the group employee.
```
user.share = not user.has_group('base.group_user')
```

opw-1914103

closes odoo/odoo#30314
2019-01-17 13:08:35 +00:00
..
2018-11-14 09:40:17 +00:00
…
…
…
…