.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github :target: https://github.com/OCA/hr/tree/10.0/hr_employee_data_from_work_address :alt: OCA/hr .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/hr-10-0/hr-10-0-hr_employee_data_from_work_address :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png :target: https://runbot.odoo-community.org/runbot/116/10.0 :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
When using HR, there are a couple of partners involved per employee: The employee's work address, the employee's private address and the partner assigned to the employee's user (if any). The latter is used to store some data about the user, like the email address. In many cases, it would be more convenient to edit this data from the employee record. This module assumes you assign a (different) partner for the work address to every employee, and synchronizes its values with the employee record. Then you should use this partner record also for the user record. When assigning an existing user, the module will replace this user's partner with the current work address's partner.
Table of contents
.. contents:: :local:
After installation, updating an employee's
image fields transparently changes the linked partner's appropriate field and vice versa. For obvious reasons, the default for the work address being the company's address has been lifted. Partners created through the work address field will have the
employee-flag set, and the
partner_id field on the user record filters for this flag.
When creating a user, you can select the existing partner record for your employee, so it will be updated transparently too. Creating a user via the user field in the employee form preselects this partner record.
As it would be problematic to have work addresses pointing to the company's partner with this module, all employees are updated with either a new partner as work address in case they are not linked to a user, or with the user's partner otherwise. This may take some time if you have a lot of employees. For existing work addresses, the partner's data win, so if your employee as ha different email/phone number/image than the corresponding partner, those fields will be overwritten - but only if it is set in the partner.
Also multiple employees pointing to the same partner is problematic. This is fixed by creating new partners for all employees involved, and flagging all of them with the label 'Duplicate work address' and the newly created ones with 'Duplicate work address / Newly created'. Then after installation, search for partners with this labels to do whatever cleanup you consider necessary. After this, it's safe to delete the labels again.
Bugs are tracked on
GitHub Issues <https://github.com/OCA/hr/issues>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
Do not contact contributors directly about support or help with technical issues.
* Therp BV Contributors
* Icon courtesy of http://www.picol.org (refresh.svg) and https://github.com/odoo/odoo/blob/8.0/addons/hr/static/description/icon.png Maintainers ~~~~~~~~~~~ This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. This module is part of the `OCA/hr <https://github.com/OCA/hr/tree/10.0/hr_employee_data_from_work_address>`_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.