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
Le Filament
Confédération Générale des SCOP
cgscop_timesheet
Commits
51f5fd7f
Commit
51f5fd7f
authored
3 years ago
by
Benjamin - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[fix] check_hours constrain on date
parent
3a75e877
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
models/hr_timesheet.py
+1
-2
1 addition, 2 deletions
models/hr_timesheet.py
views/hr_timesheet.xml
+5
-1
5 additions, 1 deletion
views/hr_timesheet.xml
with
6 additions
and
3 deletions
models/hr_timesheet.py
+
1
−
2
View file @
51f5fd7f
...
...
@@ -121,7 +121,6 @@ class ScopHrTimesheet(models.Model):
result
.
append
((
ts
.
id
,
name
))
return
result
# ------------------------------------------------------
# OnChange Functions
# ------------------------------------------------------
...
...
@@ -148,7 +147,7 @@ class ScopHrTimesheet(models.Model):
# ------------------------------------------------------
# Contrains
# ------------------------------------------------------
@api.constrains
(
'
unit_amount
'
)
@api.constrains
(
'
unit_amount
'
,
'
date
'
)
def
_check_hours
(
self
):
for
record
in
self
:
lines
=
self
.
search
([
...
...
This diff is collapsed.
Click to expand it.
views/hr_timesheet.xml
+
5
−
1
View file @
51f5fd7f
...
...
@@ -163,7 +163,11 @@
<field
name=
"name"
>
account.analytic.line.timesheet.cgscop.calendar
</field>
<field
name=
"model"
>
account.analytic.line
</field>
<field
name=
"arch"
type=
"xml"
>
<calendar
string=
"Ligne de temps"
date_start=
"date"
mode=
"month"
quick_add=
"False"
color=
"project_id"
readonly_form_view_id=
"cgscop_timesheet.view_cgscop_hr_timesheet_line_form"
>
<calendar
string=
"Ligne de temps"
date_start=
"date"
mode=
"month"
quick_add=
"False"
color=
"project_id"
readonly_form_view_id=
"cgscop_timesheet.view_cgscop_hr_timesheet_line_form"
>
<field
name=
"calendar_l1"
/>
<field
name=
"calendar_l2"
/>
</calendar>
...
...
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