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
4fd64ff9
Commit
4fd64ff9
authored
Apr 20, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better time parameters to detect product prices change on POS
parent
acdb9244
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
screens.js
...ette_addons/lacagette_custom_pos/static/src/js/screens.js
+2
-1
No files found.
lacagette_addons/lacagette_custom_pos/static/src/js/screens.js
View file @
4fd64ff9
...
...
@@ -7,7 +7,7 @@ odoo.define("lacagette_custom_pos.screens", function (require) {
var
dataModel
=
require
(
'web.DataModel'
);
var
lacagette_products
=
new
dataModel
(
'lacagette.products'
);
var
_t
=
core
.
_t
;
const
interval
=
7
*
60
*
1000
;
// used for last_price_change call
const
interval
=
5
*
60
*
1000
;
// used for last_price_change call
var
reload_on_prices_change
=
false
;
models
.
load_fields
(
"pos.config"
,
[
'reload_on_prices_change'
]);
...
...
@@ -49,6 +49,7 @@ odoo.define("lacagette_custom_pos.screens", function (require) {
if
(
reload_on_prices_change
)
{
posmodel
.
pos_session
.
load_at
=
Date
.
now
();
posmodel
.
pos_session
.
needs_reload
=
false
;
update_last_price_change_data
();
// don't wait for timer for first time
const
confirmRefresh
=
event
=>
{
// Called when unload is unsafe
event
.
preventDefault
();
...
...
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