diff options
| author | Yannick Tivisse <yti@odoo.com> | 2019-05-22 09:03:55 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2019-05-29 08:09:15 +0000 |
| commit | f5dfe4727c086c7577da2aef12c2d3548ba938a3 (patch) | |
| tree | 8af04c84c18ded0c1ed48c7c61640021dd9d24cb /addons/project_timesheet_holidays/__init__.py | |
| parent | 11cab26fb0f2167bfccfc3f11db10ff308f067b4 (diff) | |
[IMP] api.py: Rename company_id/company_ids into company/companies
The goal is to be coherent with the user property.
Actually, company_id and company_ids on the environment are no fields.
Calling env.company_id returns a browse record, not an id.
Diffstat (limited to 'addons/project_timesheet_holidays/__init__.py')
| -rw-r--r-- | addons/project_timesheet_holidays/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/project_timesheet_holidays/__init__.py b/addons/project_timesheet_holidays/__init__.py index cfae265bb38..388eef6f439 100644 --- a/addons/project_timesheet_holidays/__init__.py +++ b/addons/project_timesheet_holidays/__init__.py @@ -13,7 +13,7 @@ def post_init(cr, registry): env = api.Environment(cr, SUPERUSER_ID, {}) for hr_leave_type in env['hr.leave.type'].search([('timesheet_generate', '=', True), ('timesheet_project_id', '=', False)]): - company = hr_leave_type.company_id or env.company_id + company = hr_leave_type.company_id or env.company hr_leave_type.write({ 'timesheet_project_id': company.leave_timesheet_project_id.id, 'timesheet_task_id': company.leave_timesheet_task_id.id, |
