@@ -28,7 +28,6 @@ class HrUtilizationReport(models.TransientModel):
28
28
required = True ,
29
29
)
30
30
only_active_employees = fields .Boolean (
31
- string = "Only Active Employees" ,
32
31
default = True ,
33
32
)
34
33
employee_ids = fields .Many2many (
@@ -84,7 +83,6 @@ class HrUtilizationReport(models.TransientModel):
84
83
store = True ,
85
84
)
86
85
total_capacity = fields .Float (
87
- string = "Total Capacity" ,
88
86
compute = "_compute_total_capacity" ,
89
87
store = True ,
90
88
)
@@ -292,7 +290,7 @@ def get_action(self, report_type="qweb-html"):
292
290
self .ensure_one ()
293
291
294
292
if report_type not in self ._supported_report_types ():
295
- raise UserError (_ ('"%s" report type is not supported' % ( report_type )) )
293
+ raise UserError (_ ('"%s" report type is not supported' ) % report_type )
296
294
297
295
report_name = "hr_utilization_report.report"
298
296
@@ -306,11 +304,15 @@ def get_action(self, report_type="qweb-html"):
306
304
)
307
305
if not action :
308
306
raise UserError (
309
- _ ('"%s" report with "%s" type not found' % (report_name , report_type ))
307
+ _ ('"%(report_name)s" report with "%(report_type)s" type not found' )
308
+ % {
309
+ "report_name" : report_name ,
310
+ "report_type" : report_type ,
311
+ }
310
312
)
311
313
312
314
context = dict (self .env .context )
313
- return action .with_context (context ).report_action (self )
315
+ return action .with_context (** context ).report_action (self )
314
316
315
317
316
318
class HrUtilizationReportAbstractField (models .AbstractModel ):
@@ -325,7 +327,6 @@ class HrUtilizationReportAbstractField(models.AbstractModel):
325
327
ondelete = "cascade" ,
326
328
)
327
329
sequence = fields .Integer (
328
- string = "Sequence" ,
329
330
required = True ,
330
331
)
331
332
field_name = fields .Char (
@@ -337,14 +338,12 @@ class HrUtilizationReportAbstractField(models.AbstractModel):
337
338
required = True ,
338
339
)
339
340
field_type = fields .Char (
340
- string = "Field type" ,
341
+ "Field type" ,
341
342
required = True ,
342
343
)
343
- aggregation = fields .Char (
344
- string = "Aggregation" ,
345
- )
344
+ aggregation = fields .Char ()
346
345
groupby = fields .Char (
347
- string = "Group-by expression" ,
346
+ "Group-by expression" ,
348
347
compute = "_compute_groupby" ,
349
348
)
350
349
@@ -404,11 +403,9 @@ class HrUtilizationReportGroup(models.TransientModel):
404
403
ondelete = "cascade" ,
405
404
)
406
405
sequence = fields .Integer (
407
- string = "Sequence" ,
408
406
required = True ,
409
407
)
410
408
scope = fields .Char (
411
- string = "Scope" ,
412
409
required = True ,
413
410
)
414
411
name = fields .Char ()
@@ -425,7 +422,6 @@ class HrUtilizationReportGroup(models.TransientModel):
425
422
store = True ,
426
423
)
427
424
total_capacity = fields .Float (
428
- string = "Total Capacity" ,
429
425
compute = "_compute_total_capacity" ,
430
426
store = True ,
431
427
)
@@ -516,11 +512,9 @@ class HrUtilizationReportBlock(models.TransientModel):
516
512
ondelete = "cascade" ,
517
513
)
518
514
sequence = fields .Integer (
519
- string = "Sequence" ,
520
515
required = True ,
521
516
)
522
517
employee_id = fields .Many2one (
523
- string = "Employee" ,
524
518
comodel_name = "hr.employee" ,
525
519
required = True ,
526
520
)
@@ -537,7 +531,6 @@ class HrUtilizationReportBlock(models.TransientModel):
537
531
store = True ,
538
532
)
539
533
capacity = fields .Float (
540
- string = "Capacity" ,
541
534
compute = "_compute_capacity" ,
542
535
store = True ,
543
536
)
@@ -683,15 +676,12 @@ class HrUtilizationReportEntry(models.TransientModel):
683
676
ondelete = "cascade" ,
684
677
)
685
678
sequence = fields .Integer (
686
- string = "Sequence" ,
687
679
required = True ,
688
680
)
689
681
scope = fields .Char (
690
- string = "Scope" ,
691
682
required = True ,
692
683
)
693
684
any_line_id = fields .Many2one (
694
- string = "Account Analytics Lines" ,
695
685
comodel_name = "account.analytic.line" ,
696
686
compute = "_compute_any_line_id" ,
697
687
)
@@ -815,7 +805,6 @@ def _emit_report(self, workbook, report, report_index):
815
805
816
806
group_row_indices = []
817
807
for group in report .group_ids :
818
-
819
808
if report .groupby_field_ids :
820
809
group_row_indices .append (rows_emitted )
821
810
rows_emitted += self ._emit_group_header (
0 commit comments