Skip to content

Commit 98cdf79

Browse files
committed
[FIX] hr: fix default work address
Steps to reproduce: - Open the Employee app. - Create a new employee in a company different from the current user's company. Issue: - The default address is taken from the current user's company instead of the active company's address. Fix: - Default address now uses the active company's address instead of the user's company. task-5138714 closes odoo#235062 X-original-commit: 3af6e77 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> Signed-off-by: Rajat Mungra (rmun) <rmun@odoo.com>
1 parent e1919b9 commit 98cdf79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/hr/models/hr_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class HrVersion(models.Model):
2929
_rec_name = 'name'
3030

3131
def _get_default_address_id(self):
32-
address = self.env.user.company_id.partner_id.address_get(['default'])
32+
address = self.env.company.partner_id.address_get(['default'])
3333
return address['default'] if address else False
3434

3535
def _default_salary_structure(self):

0 commit comments

Comments
 (0)