[IMP] base: Add support for private addresses #24573
Add the possibility to create private addresses, only accessible for a subset
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
Purpose ======= Add the possibility to create private addresses, only accessible for a subset of users. Specification ============= - Add a new 'Private' partner type - Add a res.groups in base 'Access to Private Addresses' - Add ir.rules for the following behavior: - Every employees/internal users can read non-private addresses - Only users in group_private_addresses can access private addresses - Add in base a simplified form view for private addresses - A HR Officer is automatically granted in group_private_addresses - Use the simplified form view to open the address_home_id form on employees
With the current code when adding new employees (and add a home_address) do get the type private, but all existing records don't.
How would a customer with 300+ employees already added with home_address_id records already created for each employee deal with setting the existing res.partner object to type 'private'? Should he go by all those records and set the type to private? Oh wait you can set the type anywhere ;)
It might be handy to be able to set all res.partners linked to an employee record on the address_home_id to type private. Or do this automatically when updating the module during startup or something.