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
56ebb334
Commit
56ebb334
authored
Feb 01, 2022
by
Etienne Freiss
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modif. Pensez à mettre à jour le module
parent
7cd0bdea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
2 deletions
+39
-2
fr.po
lacagette_addons/pos_meal_voucher/i18n/fr.po
+20
-0
pos_config.py
lacagette_addons/pos_meal_voucher/models/pos_config.py
+4
-0
screens.js
lacagette_addons/pos_meal_voucher/static/src/js/screens.js
+14
-2
view_pos_config.xml
lacagette_addons/pos_meal_voucher/views/view_pos_config.xml
+1
-0
No files found.
lacagette_addons/pos_meal_voucher/i18n/fr.po
View file @
56ebb334
...
...
@@ -292,3 +292,23 @@ msgstr "En cliquant sur ce bouton, tous les produits de cette catégories auront
msgid "kg"
msgstr "kg"
#. module: pos_meal_voucher
#. openerp-web
#: code:addons/pos_meal_voucher/static/src/js/screens.js:159
#, python-format
msgid "Meal Voucher Amount incorrect"
msgstr "Titre restaurant incorrect"
#. module: pos_meal_voucher
#. openerp-web
#: code:addons/pos_meal_voucher/static/src/js/screens.js:160
#, python-format
msgid "Warning, the maximum amount of meal voucher accepted ( "
msgstr "Attention, le montant éligible au paiement par titre restaurant( "
#. module: pos_meal_voucher
#. openerp-web
#: code:addons/pos_meal_voucher/static/src/js/screens.js:160
#, python-format
msgid " ) is under the amount input ( "
msgstr " ) est inférieur à la valeur du/des ticket(s)( "
lacagette_addons/pos_meal_voucher/models/pos_config.py
View file @
56ebb334
...
...
@@ -16,3 +16,7 @@ class PosConfig(models.Model):
meal_voucher_display_product_screen
=
fields
.
Boolean
(
string
=
"Display icon before products on screen"
,
default
=
True
)
meal_voucher_change_accepted
=
fields
.
Boolean
(
string
=
"Give change on meal voucher"
,
default
=
True
)
lacagette_addons/pos_meal_voucher/static/src/js/screens.js
View file @
56ebb334
...
...
@@ -136,8 +136,8 @@ odoo.define("pos_meal_voucher.screens", function (require) {
current_max
=
Math
.
min
(
total_eligible
,
max_amount
);
}
// if the change is too large, it's probably an input error, make the user confirm.
if
(
!
force_validation
&&
(
total_received
>
current_max
))
{
// if the change is too large, it's probably an input error,
if giving change is accepted
make the user confirm.
if
(
!
force_validation
&&
(
total_received
>
current_max
)
&&
this
.
pos
.
config
.
meal_voucher_change_accepted
)
{
this
.
gui
.
show_popup
(
"confirm"
,
{
'title'
:
_t
(
"Please Confirm Meal Voucher Amount"
),
'body'
:
_t
(
"You are about to validate a meal voucher payment of "
)
+
...
...
@@ -153,6 +153,18 @@ odoo.define("pos_meal_voucher.screens", function (require) {
});
return
false
;
}
//else force user to correct
else
if
(
!
force_validation
&&
(
total_received
>
current_max
)
&&
!
this
.
pos
.
config
.
meal_voucher_change_accepted
)
{
this
.
gui
.
show_popup
(
"alert"
,
{
'title'
:
_t
(
"Meal Voucher Amount incorrect"
),
'body'
:
_t
(
"Warning, the maximum amount of meal voucher accepted ( "
)
+
this
.
format_currency
(
current_max
)
+
_t
(
" ) is under the amount input ( "
)
+
this
.
format_currency
(
total_received
)
+
_t
(
")"
),
});
return
false
;
}
return
this
.
_super
.
apply
(
this
,
arguments
);
},
});
...
...
lacagette_addons/pos_meal_voucher/views/view_pos_config.xml
View file @
56ebb334
...
...
@@ -14,6 +14,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<group
string=
"Meal Vouchers"
>
<field
name=
"max_meal_voucher_amount"
/>
<field
name=
"meal_voucher_display_product_screen"
/>
<field
name=
"meal_voucher_change_accepted"
/>
</group>
</field>
</field>
...
...
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