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
acdb9244
Commit
acdb9244
authored
Apr 19, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Odoo presence appearing when shift was moved and validating presence on Odoo interface
parent
4af17e98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
screens.js
...ette_addons/lacagette_custom_pos/static/src/js/screens.js
+2
-4
shift_shift.py
lacagette_addons/lacagette_membership/models/shift_shift.py
+19
-0
No files found.
lacagette_addons/lacagette_custom_pos/static/src/js/screens.js
View file @
acdb9244
...
@@ -7,7 +7,7 @@ odoo.define("lacagette_custom_pos.screens", function (require) {
...
@@ -7,7 +7,7 @@ odoo.define("lacagette_custom_pos.screens", function (require) {
var
dataModel
=
require
(
'web.DataModel'
);
var
dataModel
=
require
(
'web.DataModel'
);
var
lacagette_products
=
new
dataModel
(
'lacagette.products'
);
var
lacagette_products
=
new
dataModel
(
'lacagette.products'
);
var
_t
=
core
.
_t
;
var
_t
=
core
.
_t
;
const
interval
=
1
*
60
*
1000
;
// used for last_price_change call
const
interval
=
7
*
60
*
1000
;
// used for last_price_change call
var
reload_on_prices_change
=
false
;
var
reload_on_prices_change
=
false
;
models
.
load_fields
(
"pos.config"
,
[
'reload_on_prices_change'
]);
models
.
load_fields
(
"pos.config"
,
[
'reload_on_prices_change'
]);
...
@@ -41,7 +41,6 @@ odoo.define("lacagette_custom_pos.screens", function (require) {
...
@@ -41,7 +41,6 @@ odoo.define("lacagette_custom_pos.screens", function (require) {
})
})
}
}
screens
.
ClientListScreenWidget
.
include
({
screens
.
ClientListScreenWidget
.
include
({
init
:
function
(
parent
,
options
)
{
init
:
function
(
parent
,
options
)
{
this
.
_super
(
parent
,
options
);
this
.
_super
(
parent
,
options
);
...
@@ -130,4 +129,4 @@ odoo.define("lacagette_custom_pos.screens", function (require) {
...
@@ -130,4 +129,4 @@ odoo.define("lacagette_custom_pos.screens", function (require) {
}
}
});
});
});
});
\ No newline at end of file
lacagette_addons/lacagette_membership/models/shift_shift.py
View file @
acdb9244
...
@@ -8,6 +8,25 @@ _logger = logging.getLogger(__name__)
...
@@ -8,6 +8,25 @@ _logger = logging.getLogger(__name__)
class
ShiftShift
(
models
.
Model
):
class
ShiftShift
(
models
.
Model
):
_inherit
=
'shift.shift'
_inherit
=
'shift.shift'
@api.multi
def
button_makeupok
(
self
):
"""
@Function trigger to change the state from Confirm to Entry
"""
for
shift
in
self
:
shift
.
state
=
'entry'
# Automatically mark attendance as "Attended" for
# makeup (ABCD Member)
for
reg
in
shift
.
registration_ids
:
if
not
reg
.
partner_id
.
in_ftop_team
and
\
not
reg
.
tmpl_reg_line_id
and
\
reg
.
origin
!=
'memberspace'
and
\
reg
.
origin
!=
'bdm'
and
\
reg
.
state
!=
'replacing'
:
reg
.
button_reg_close
()
@api.model
@api.model
def
run_close_today_ftop_shifts
(
self
):
def
run_close_today_ftop_shifts
(
self
):
"""Method called by cron task"""
"""Method called by cron task"""
...
...
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