Yannick Tivisse 152097d099 [IMP] hr*: Use correct default employee_id based on company
Followup of https://github.com/odoo/odoo/pull/50982/commits

Courtesy of https://github.com/sswapnesh

In a multi-company environment `self.env['hr.employee'].search([('user_id', '=', self.env.uid)], limit=1)` could be wrong while `employee_id`represents correct employee based on company.

https://github.com/odoo/odoo/blob/fb17af76d791488c69eb3829376940b32998d374/addons/hr/models/res_users.py#L13

Making behavior Similar to https://github.com/odoo/odoo/blob/fb17af76d791488c69eb3829376940b32998d374/addons/hr_expense/models/hr_expense.py#L663

closes odoo/odoo#51246

Taskid: 2254687
X-original-commit: d7d1557e7a0f613335a9ca5ca1355d246093f9d1
Related: odoo/enterprise#10599
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-15 07:06:59 +00:00
2020-04-20 11:41:39 +00:00
…
2019-10-03 12:48:09 +00:00
…
…
…
2019-11-08 11:24:04 +00:00
2019-10-03 12:48:09 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%