Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][FIX] maintenance_timesheet: lost files in directory report #425

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions maintenance_timesheet/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from . import models
from . import report
1 change: 1 addition & 0 deletions maintenance_timesheet/report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import timesheets_analysis_report
27 changes: 27 additions & 0 deletions maintenance_timesheet/report/timesheets_analysis_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from odoo import api, fields, models


class TimesheetsAnalysisReport(models.Model):
_inherit = "timesheets.analysis.report"

maintenance_request_id = fields.Many2one(
comodel_name="maintenance.request", readonly=True
)

@api.model
def _select(self):
return (
super()._select()
+ """,
A.maintenance_request_id AS maintenance_request_id
"""
)

@api.model
def _from(self):
return (
super()._from()
+ """
LEFT JOIN maintenance_request MR ON A.maintenance_request_id = MR.id
"""
)
Loading