Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Aconcagua
hr_payroll_base_config
Commits
f1547a58
Commit
f1547a58
authored
Nov 02, 2021
by
Santiago Apel
💬
Browse files
[FIX] total_rule_max input parameter type only tuple
parent
3f0f0c53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
models/hr_payslip.py
models/hr_payslip.py
+6
-12
No files found.
models/hr_payslip.py
View file @
f1547a58
...
...
@@ -528,21 +528,15 @@ class HRPayslip(models.Model):
Get the max total of totals with a rule given from
date_to (by default payslip date_to or today) to the given months back
"""
if
type
(
rule_code
)
==
str
:
query
=
self
.
_build_rule_total_max_query
()
total_max
=
float
(
self
.
query_rule_result
(
query
,
rule_code
,
months_back
,
date_to
,
*
args
,
**
kwargs
))
else
:
aux_list
=
[]
for
rulecode
in
rule_code
:
query
=
self
.
_build_rule_total_max_query
()
total_max
=
float
(
self
.
query_rule_result
(
query
,
rulecode
,
months_back
,
query
=
self
.
_build_rule_total_max_query
()
total_max
=
float
(
self
.
query_rule_result
(
query
,
rule_code
,
months_back
,
date_to
,
*
args
,
**
kwargs
))
aux_list
.
append
(
total_max
)
total_max
=
max
(
aux_list
)
return
total_max
return
total_max
def
rule_month
(
self
,
rule_code
,
months_back
=
0
,
date_to
=
False
,
*
args
,
**
kwargs
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment