This commit will add the needed ESLint configurations on the JS files.
These configurations are added if the JS file uses a different
environment (serviceworker, node, etc) or if it uses a specific global
(google, ace, etc).
Co-authored-by: Samuel Degueldre <sad@odoo.com>
- The balance operation is performed automatically at the end of the
day but it doesn't print any receipt. We add the possibility to perform
the balance manually to get a receipt showing all the transactions of
the day.
- By default, DCC is set to true, but it requires a different
implementation. As we don't support it, Six asked us to changed the
variable to False, to make it clearer in case of debugging.
closesodoo/odoo#58360
X-original-commit: bc5ea7e3d3b694bbe88b14c10cd5cc80ca617e48
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
Some payments were 0.01€ lower on the payment terminal compared to the
amount showing in the POS.
closesodoo/odoo#57547
X-original-commit: 3fd0822f42c1a9dbe5b786a3a767da969431ddaa
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
The Six TIM API considers all round amounts to be in minor units while
decimal amounts are considered actual amounts.
In #df01c71, we changed all payments to minor units, but we still had
problems with floating point precision.
E.g. Starting a payment of 4.60€ was converted to 460 in minor units
but due to floating point precision, the actual amount sent to TIM
was 460.00000000005. The terminal then started a payment of 460€
instead of 4.60€.
closesodoo/odoo#56495
X-original-commit: 00cc3ce75dd2efa60ad93b6ad6535020fa517781
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
The timapi.wasm file was not loaded correctly in debug != assets
because the library tried to fetch /web/content/XXX-XXX/timapi.wasm,
which returned the full JS bundle.
We set the full path of the file in the library:
'/pos_six/static/lib/six_tim/timapi.wasm'
closesodoo/odoo#53739
X-original-commit: b21859a1550df08ac96719c16eb380cc71d81cee
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
Upgrade the TIM JavaScript SDK to the latest version (4.6.0).
The version Six gave us initially (3.8.1) didn't return any error
message. We now have some (ugly) error messages that could at least
help the cashier understand where the problem comes from (e.g.
"timCommunicationFailure", "cardholderStop", etc.).
closesodoo/odoo#52181
Taskid: 2267818
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit fixes two bugs with pos_six:
- When the cashier manually clicked on "Cancel" or switched order,
the payment was correctly canceled, but the POS still showed the
error popup saying that the transaction was not processed
correctly.
- The TIM API manages differently rounds amounts and amounts with
decimals. Sending an amount of 1 was considered as 0.01€, while an
amount of 1.01 was considered as 1.01€. To fix this, we always sent
the amount in minor units.
closesodoo/odoo#52102
X-original-commit: a5125b92c11bd9dbf1b536e1eb1b467be446718f
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Deprecate MPD integration for Six payment terminals and replace it
with TIM because:
- MPD broadcasts connection messages to the network so having
multiple terminals and MPD servers in the same network results
in connection issues
- TIM has a JS SDK so it doesn't require an IoT Box.
- MPD supports only Yomani and Yoximo terminals while TIM also
supports Ingenico.
closesodoo/odoo#46789
Taskid: 2188566
Related: odoo/upgrade#903
Related: odoo/enterprise#8994
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>