Purpose is to add some tests for newly added feature logging portal access granting. Some code is also cleaned to avoid unnecessary computation when groups are not modified on user model. closes odoo/odoo#76040 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>