Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cgscop_timesheet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hervé Silvant - CGScop
cgscop_timesheet
Commits
3a52ea9a
Commit
3a52ea9a
authored
4 years ago
by
Benjamin - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[cgscop #210] fix erreur comparaison date + modification fonction
parent
15398bd6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
models/hr_timesheet.py
+10
-3
10 additions, 3 deletions
models/hr_timesheet.py
with
10 additions
and
3 deletions
models/hr_timesheet.py
+
10
−
3
View file @
3a52ea9a
...
...
@@ -88,12 +88,19 @@ class ScopHrTimesheet(models.Model):
@api.onchange
(
'
partner_id
'
)
def
onchange_partner_id
(
self
):
# affiche le Dispositif Financier par défaut sur la LdT
# si il n'y a pas de date limite du dispositif
# ou si la date de la Ldt est inférieure à la date limite du dispositif
if
not
self
.
partner_id
.
ur_financial_system_date
or
\
fields
.
Datetime
.
now
()
>
self
.
partner_id
.
ur_financial_system_date
:
self
.
date
<=
self
.
partner_id
.
ur_financial_system_date
:
self
.
ur_financial_system_id
=
self
.
partner_id
.
ur_financial_system_id
# affiche la Convention par défaut sur la LdT
# si il n'y a pas de date limite de la convention
# ou si la date de la LdT est inférieure à la date limite de la convention
if
not
self
.
partner_id
.
ur_regional_convention_date
or
\
fields
.
Datetime
.
now
()
>
self
.
partner_id
.
ur_regional_convention_date
:
self
.
ur_regional_convention_id
=
self
.
partner_id
.
ur_regional_convention_id
self
.
date
<=
self
.
partner_id
.
ur_regional_convention_date
:
self
.
ur_regional_convention_id
=
self
.
partner_id
.
\
ur_regional_convention_id
# ------------------------------------------------------
# Contrains
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment