diff --git a/timesheet_timesheet_analysis_report/README.md b/timesheet_timesheet_analysis_report/README.md new file mode 100644 index 0000000..f12269d --- /dev/null +++ b/timesheet_timesheet_analysis_report/README.md @@ -0,0 +1,45 @@ +# 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. + +## Installation + +Use the standard Odoo module installation procedure to install `timesheet_timesheet_analysis_report`. + +**Dependencies:** `base`, `hr_timesheet` + +## Configuration + +No specific configuration is required. The `timesheet_id` field is automatically available on the Timesheet Analysis Report once the module is installed. + +## Usage + +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. +- **Group by** timesheet to aggregate data per individual time entry. +- **Search** for report lines linked to a particular timesheet record. + +## Known Issues / Roadmap + +None yet. + +## 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. + +## Credits + +### Contributors + +- [Elabore](mailto:laetitia.dacosta@elabore.coop) + +### Funders + +The development of this module has been financially supported by: + +- [Elabore](https://elabore.coop) + +### Maintainer + +This module is maintained by Elabore. diff --git a/timesheet_timesheet_analysis_report/__init__.py b/timesheet_timesheet_analysis_report/__init__.py new file mode 100644 index 0000000..9a7e03e --- /dev/null +++ b/timesheet_timesheet_analysis_report/__init__.py @@ -0,0 +1 @@ +from . import models \ No newline at end of file diff --git a/timesheet_timesheet_analysis_report/__manifest__.py b/timesheet_timesheet_analysis_report/__manifest__.py new file mode 100644 index 0000000..f5e9f22 --- /dev/null +++ b/timesheet_timesheet_analysis_report/__manifest__.py @@ -0,0 +1,32 @@ +# Copyright 2025 Elabore () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "timesheet_timesheet_analysis_report", + "version": "18.0.1.0.0", + "author": "Elabore", + "website": "https://elabore.coop", + "maintainer": "Elabore", + "license": "AGPL-3", + "category": "HR", + "summary": "add a timesheet_id relation to timesheet.analysis.report model", + # any module necessary for this one to work correctly + "depends": [ + "base","hr_timesheet", + ], + "qweb": [], + "external_dependencies": { + "python": [], + }, + # always loaded + "data": [], + # only loaded in demonstration mode + "demo": [], + "js": [], + "css": [], + "installable": True, + # Install this module automatically if all dependency have been previously + # and independently installed. Used for synergetic or glue modules. + "auto_install": False, + "application": False, +} \ No newline at end of file diff --git a/timesheet_timesheet_analysis_report/models/__init__.py b/timesheet_timesheet_analysis_report/models/__init__.py new file mode 100644 index 0000000..5ef14e0 --- /dev/null +++ b/timesheet_timesheet_analysis_report/models/__init__.py @@ -0,0 +1 @@ +from . import timesheet_analysis_report \ No newline at end of file diff --git a/timesheet_timesheet_analysis_report/models/timesheet_analysis_report.py b/timesheet_timesheet_analysis_report/models/timesheet_analysis_report.py new file mode 100644 index 0000000..432350e --- /dev/null +++ b/timesheet_timesheet_analysis_report/models/timesheet_analysis_report.py @@ -0,0 +1,12 @@ +from odoo import fields, models, api + +class TimesheetsAnalysisReport(models.Model): + _inherit = "timesheets.analysis.report" + + timesheet_id = fields.Many2one("account.analytic.line", string="Timesheet", readonly=True, help="Feuille de temps") + + @api.model + def _select(self): + return super()._select() + """, + A.id AS timesheet_id + """