Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] project_timesheet_holidays: add default project and task on status
When using this module, the default behavior is to generate timesheet. This timsheet is linked to a project and a task and there is a constrain that verify that the task and project are set on model. If another module (like l10n_fr_hr_payroll for example) tries to create holidays.status without a project and task, it causes a traceback. This commit adds default values for these fields in order fullfill the constrains. Notice that the order of the imports in the __init__ is important because the columns have to be created on the res.company before the status is initialized.
- Loading branch information
Showing
3 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import res_company # has to be before hr_holidays to create needed columns on res.company | ||
from . import account_analytic | ||
from . import hr_holidays | ||
from . import res_config_settings | ||
from . import res_company |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters