[MIG] timesheet_timesheet_analysis_report: migrate to 18.0
This commit is contained in:
@@ -1,20 +1,26 @@
|
|||||||
# timesheet_timesheet_analysis_report
|
# timesheet_timesheet_analysis_report
|
||||||
|
|
||||||
Add a `timesheet_id` Many2one relation to the `timesheets.analysis.report` model, linking each analysis report line back to its source `account.analytic.line` record. This allows filtering and grouping the Timesheet Analysis Report by individual timesheet entry.
|
Add a `timesheet_id` Many2one relation to the `timesheets.analysis.report` model,
|
||||||
|
linking each analysis report line back to its source `account.analytic.line` record.
|
||||||
|
This allows filtering and grouping the Timesheet Analysis Report by individual timesheet
|
||||||
|
entry.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Use the standard Odoo module installation procedure to install `timesheet_timesheet_analysis_report`.
|
Use the standard Odoo module installation procedure to install
|
||||||
|
`timesheet_timesheet_analysis_report`.
|
||||||
|
|
||||||
**Dependencies:** `base`, `hr_timesheet`
|
**Dependencies:** `base`, `hr_timesheet`
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
No specific configuration is required. The `timesheet_id` field is automatically available on the Timesheet Analysis Report once the module is installed.
|
No specific configuration is required. The `timesheet_id` field is automatically
|
||||||
|
available on the Timesheet Analysis Report once the module is installed.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
After installation, the Timesheet Analysis Report (`timesheets.analysis.report`) includes a new **Timesheet** field. You can use it to:
|
After installation, the Timesheet Analysis Report (`timesheets.analysis.report`)
|
||||||
|
includes a new **Timesheet** field. You can use it to:
|
||||||
|
|
||||||
- **Filter** the analysis report by specific timesheet entries.
|
- **Filter** the analysis report by specific timesheet entries.
|
||||||
- **Group by** timesheet to aggregate data per individual time entry.
|
- **Group by** timesheet to aggregate data per individual time entry.
|
||||||
@@ -26,7 +32,10 @@ None yet.
|
|||||||
|
|
||||||
## Bug Tracker
|
## Bug Tracker
|
||||||
|
|
||||||
Bugs are tracked on [our issues website](https://git.elabore.coop/Elabore/hr-tools/issues). In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smash it by providing detailed feedback.
|
Bugs are tracked on
|
||||||
|
[our issues website](https://git.elabore.coop/Elabore/hr-tools/issues). In case of
|
||||||
|
trouble, please check there if your issue has already been reported. If you spotted it
|
||||||
|
first, help us smash it by providing detailed feedback.
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
from . import models
|
from . import models
|
||||||
|
|||||||
@@ -5,14 +5,15 @@
|
|||||||
"name": "timesheet_timesheet_analysis_report",
|
"name": "timesheet_timesheet_analysis_report",
|
||||||
"version": "18.0.1.0.0",
|
"version": "18.0.1.0.0",
|
||||||
"author": "Elabore",
|
"author": "Elabore",
|
||||||
"website": "https://elabore.coop",
|
"website": "https://git.elabore.coop/elabore/hr-tools",
|
||||||
"maintainer": "Elabore",
|
"maintainer": "Elabore",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"category": "HR",
|
"category": "HR",
|
||||||
"summary": "add a timesheet_id relation to timesheet.analysis.report model",
|
"summary": "add a timesheet_id relation to timesheet.analysis.report model",
|
||||||
# any module necessary for this one to work correctly
|
# any module necessary for this one to work correctly
|
||||||
"depends": [
|
"depends": [
|
||||||
"base","hr_timesheet",
|
"base",
|
||||||
|
"hr_timesheet",
|
||||||
],
|
],
|
||||||
"qweb": [],
|
"qweb": [],
|
||||||
"external_dependencies": {
|
"external_dependencies": {
|
||||||
@@ -29,4 +30,4 @@
|
|||||||
# and independently installed. Used for synergetic or glue modules.
|
# and independently installed. Used for synergetic or glue modules.
|
||||||
"auto_install": False,
|
"auto_install": False,
|
||||||
"application": False,
|
"application": False,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
from . import timesheet_analysis_report
|
from . import timesheet_analysis_report
|
||||||
|
|||||||
@@ -1,12 +1,21 @@
|
|||||||
from odoo import fields, models, api
|
from odoo import api, fields, models
|
||||||
|
|
||||||
|
|
||||||
class TimesheetsAnalysisReport(models.Model):
|
class TimesheetsAnalysisReport(models.Model):
|
||||||
_inherit = "timesheets.analysis.report"
|
_inherit = "timesheets.analysis.report"
|
||||||
|
|
||||||
timesheet_id = fields.Many2one("account.analytic.line", string="Timesheet", readonly=True, help="Feuille de temps")
|
timesheet_id = fields.Many2one(
|
||||||
|
"account.analytic.line",
|
||||||
|
string="Timesheet",
|
||||||
|
readonly=True,
|
||||||
|
help="Feuille de temps",
|
||||||
|
)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _select(self):
|
def _select(self):
|
||||||
return super()._select() + """,
|
return (
|
||||||
|
super()._select()
|
||||||
|
+ """,
|
||||||
A.id AS timesheet_id
|
A.id AS timesheet_id
|
||||||
"""
|
"""
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user