Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
odoo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
odoo
Commits
f21e727e
Commit
f21e727e
authored
Feb 01, 2021
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modifications module coop_membership (shifts)
parent
73452856
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
shift_leave.py
intercoop_addons/coop_membership/models/shift_leave.py
+4
-2
shift_registration.py
...rcoop_addons/coop_membership/models/shift_registration.py
+6
-1
shift_template.py
intercoop_addons/coop_shift/model/shift_template.py
+1
-1
backend.js
lacagette_addons/cagette_product/static/src/js/backend.js
+0
-0
No files found.
intercoop_addons/coop_membership/models/shift_leave.py
View file @
f21e727e
...
...
@@ -76,8 +76,10 @@ class ShiftLeave(models.Model):
partner
.
get_next_shift_date
(
start_date
=
leave_stop_time_utc
)
if
not
next_shift_date
or
not
next_shift
:
next_shift_date
=
leave
.
guess_future_date_shift
(
leave
.
stop_date
,
is_all_team
=
True
)[
0
]
future_date_shift
=
leave
.
guess_future_date_shift
(
leave
.
stop_date
,
is_all_team
=
True
)
if
len
(
future_date_shift
)
>
0
:
next_shift_date
=
future_date_shift
[
0
]
if
next_shift_date
:
next_shift_date
=
fields
.
Date
.
to_string
(
next_shift_date
)
...
...
intercoop_addons/coop_membership/models/shift_registration.py
View file @
f21e727e
...
...
@@ -203,7 +203,12 @@ class ShiftRegistration(models.Model):
reason
=
_
(
'Attended'
)
counter_vals
[
'point_qty'
]
=
1
counter_vals
[
'name'
]
=
reason
elif
vals_state
in
[
'absent'
]:
counter_vals
[
'point_qty'
]
=
-
2
counter_vals
[
'name'
]
=
_
(
'Absent'
)
elif
vals_state
in
[
'excused'
]:
counter_vals
[
'point_qty'
]
=
-
1
counter_vals
[
'name'
]
=
_
(
'Excused'
)
# Create Point Counter
if
counter_vals
:
counter_vals
.
update
({
...
...
intercoop_addons/coop_shift/model/shift_template.py
View file @
f21e727e
...
...
@@ -60,7 +60,7 @@ class ShiftTemplate(models.Model):
'res.partner'
,
string
=
'Shift Leader'
)
user_ids
=
fields
.
Many2many
(
'res.partner'
,
'res_partner_shift_template_rel'
,
'shift_template_id'
,
'partner_id'
,
string
=
'Shift Leaders'
,
required
=
True
)
'partner_id'
,
string
=
'Shift Leaders'
)
company_id
=
fields
.
Many2one
(
'res.company'
,
string
=
'Company'
,
change_default
=
True
,
default
=
lambda
self
:
self
.
env
[
'res.company'
]
.
_company_default_get
(
...
...
lacagette_addons/cagette_product/static/src/js/backend.js
View file @
f21e727e
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