diff --git a/analytic_base_department/__manifest__.py b/analytic_base_department/__manifest__.py index c16e822a48..1bb0a7a1fa 100644 --- a/analytic_base_department/__manifest__.py +++ b/analytic_base_department/__manifest__.py @@ -4,12 +4,12 @@ { "name": "Base Analytic Department Categorization", "summary": "Add relationship between Analytic and Department", - "version": "18.0.1.0.0", + "version": "18.0.1.0.1", "author": "Camptocamp, Daniel Reis, Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Generic Modules/Projects & Services", "website": "https://github.com/OCA/account-analytic", - "depends": ["account", "hr"], + "depends": ["account", "hr_timesheet"], "data": ["views/analytic.xml", "views/hr_department_views.xml"], "installable": True, } diff --git a/analytic_base_department/models/__init__.py b/analytic_base_department/models/__init__.py index 3a887e5528..480e5c9dd2 100644 --- a/analytic_base_department/models/__init__.py +++ b/analytic_base_department/models/__init__.py @@ -1,2 +1,3 @@ from . import analytic from . import hr_department +from . import timesheets_analysis_report diff --git a/analytic_base_department/models/timesheets_analysis_report.py b/analytic_base_department/models/timesheets_analysis_report.py new file mode 100644 index 0000000000..6e829f6258 --- /dev/null +++ b/analytic_base_department/models/timesheets_analysis_report.py @@ -0,0 +1,14 @@ +from odoo import fields, models + + +class TimesheetsAnalysisReport(models.Model): + _inherit = "timesheets.analysis.report" + + account_department_id = fields.Many2one( + comodel_name="hr.department", + related="department_id", + string="Account Department", + store=True, + readonly=True, + help="Account's related department", + )