Commit Graph
123 Commits
Author SHA1 Message Date
Victor Feyens d0bcf89c33 [IMP] *: remove 'remove me in master' 2020-01-21 14:43:29 +00:00
Damien Bouvy 34226a4fee [FIX] payment: authorized payment should redirect automatically
From the PoV of the customer, there is no difference between an
authorized payment and a captured payment; they should get redirected to
the confirmation page in both cases.

closes odoo/odoo#42780

X-original-commit: 452676737dd657a5d31a88fa89cc136cbe69b96a
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-01-06 15:15:38 +00:00
Jason Van Malder 238a28c515 [FIX] payment: fix ecommerce blinking "Pay now" button
Issue

    - Install e-commerce
    - Add stripe as payment acquirer
    - Go in website > shop
    - Add something in your cart and process checkout
    - In developer tools > network set online to slow 3g
    - Spam the pay now button
    - Go in Website > Configuration > Ecommerce > Payment Transactions

    Multiple transactions have been created for your order.

Cause

    The pay now button doesn't stay disabled during the payment process.

Solution

    Disable the button and enable it only when the process is done.

OPW-2148899

closes odoo/odoo#41910

X-original-commit: 76a0e4fea0d9a15b3d193e00dd473c4488d18640
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
2019-12-16 07:14:13 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Nikunj Ladava 8ef1be2e42 [FIX] payment: prevent rpc fail event
before this commit it shows error dialog when rpc fail

after this commit, error dialog will not be shown to user,
instead we have already shown error in payment form

task- 2045189

closes odoo/odoo#39571

X-original-commit: e3644c6b59271c521abc151d3c533331836fdc90
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-10-30 12:06:20 +00:00
Martin Trigaux 536b0b1523 [IMP] payment: uniform translatable messages
Avoid trailing space:
In translation content, these tends to be skipped during translation,
making the message inconsistent. There is already a translation for
the term without the space so can reuse it.

Merge "setup"
Use the same writing to avoid having two similar messages

Remove unnecessary comma

Merge PayPal and Paypal

Courtesy of Primesh on Transifex

closes odoo/odoo#38348

X-original-commit: c1fb136cc684eba0cdeec302f27268ccda7fa5d2
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-10 08:10:13 +00:00
Nikunj Ladava a408e37568 [FIX] payment: fix issue with s2s error icon position
before this commit:
the icon was not there in proper position

after this commit:
the icon is at proper position

task- 2074108

closes odoo/odoo#37352

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-24 10:25:43 +00:00
Christophe Simonis 58a83d1222 [MERGE] forward port branch saas-12.4 up to 4a1321bc99
closes odoo/odoo#37127

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-20 14:33:54 +00:00
Christophe Simonis 080f8b1f96 [MERGE] forward port branch saas-12.3 up to d8ce75466e 2019-09-17 17:49:09 +02:00
Damien Bouvy a2c5410622 [IMP] payment: sca-readyness
- allow acquirers to arbitrarily include info about the tx in the
processing page
- pending is now a valid state that could require customer action in the
payment processing page - don't blindly redirect to the return url of
another tx if a pending transaction is there

This latest change might mean that customers with many tx attempts might
have a sub-par experience as they may need to click manually on the
redirect url of a successful tx while before they were redirected
immediately.
2019-09-13 13:10:00 +00:00
Thibault Delavallée cab25b690c [FIX] payment: fix error management in payment form
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

Recent commit 5193f0d010 introduced a tool method to parse errors and ease
their management. A variable typo was done by mistake, fixed in this commit.

LINKS

Task ID 1937768

closes odoo/odoo#36085

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-26 13:33:26 +00:00
Damien Bouvy 5193f0d010 [IMP] payment*: better handling of error message
Sometimes there's a title + content, sometimes not; reading the message
itself usually yields a None somewhere which is fugly.
2019-08-16 15:52:40 +00:00
Damien Bouvy 45c2e06095 [IMP] payment: allow hiding the error messag in payment_form 2019-08-16 15:52:40 +00:00
Johan Demaret Rivarola e01d559f9d [IMP] payment: support SEPA Direct Debit acquirer
The purpose of this commit is to expose SEPA Direct Debit acquirer to
the Odoo community edition. The dedicated module, though, is restricted
to the enterprise edition.

Minor changes in following modules:

- base: added ir.module.module record

- payment:
  - added data to expose the new payment acquirer.
  - added 'to_buy' field to track whether the payment acquirer is
    restricted to enterprise users.
  - allow multi word payment acquirer name. It was breaking on the first
    underscore.

task-1870363
closes odoo/odoo#26427
2019-08-16 15:52:39 +00:00
Victor FeyensandWilliam Andre 9d23e8a097 [IMP] payment: ideal payment method support showed on acquirers.
Co-Authored-By: William Andre <wan@odoo.com>
2019-08-12 08:45:50 +00:00
Victor Feyens 611fde6c88 [IMP] payment: UI/flow 2019-08-12 08:44:25 +00:00
Martin Trigaux 258efff7e5 [REV] delivery,payment: revert 98a92dc1aa
The widget no longer exists, we can clean this

closes odoo/odoo#35496

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-06 13:01:53 +00:00
Christophe Simonis bfd34e14b1 [MERGE] forward port branch saas-12.3 up to 40e8b67179 2019-07-26 15:12:29 +02:00
Martin Trigaux a98427834e [MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c2
closes odoo/odoo#35119

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-24 10:32:23 +00:00
Martin Trigaux e266c7c98a [MERGE] Forward port of 12.0 to saas-12.2 up to 5e4c1b3701 2019-07-23 13:41:00 +02:00
Martin Trigaux 324d3fc93a [MERGE] Forward port of saas-11.3 to 12.0 up to 06f8f04699
closes odoo/odoo#35064

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-22 11:43:54 +00:00
Martin Trigaux 06f8f04699 [MERGE] Forward port of 11.0 to saas-11.3 up to eb4700f17f
closes odoo/odoo#35054

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-22 09:47:11 +00:00
Martin Trigaux 98a92dc1aa [FXI] delivery,payment: translate boolean button terms
The terminology of the boolean_button is translated with

_t(opt_terms.string_true)

which can work only if the variable content is already present in the
translation map.
This commit adds js files that do nothing but add the terms in the
translation map. This way it will be exported by babel js export and
the translation will be loaded by the web client

Closes odoo/odoo#34774

closes odoo/odoo#34954

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-18 08:58:20 +00:00
Christophe Simonis 71a50a2214 [MERGE] forward port branch saas-12.3 up to 409679866b 2019-06-06 11:54:35 +02:00
Christophe Simonis 43d133d504 [FIX] *: correct some javascript errors
Oversight of previous forward-port.
2019-06-03 19:06:03 +02:00
Christophe Simonis c8d7ad9a6b [MERGE] forward port branch saas-12.2 up to 995aa1685e 2019-06-03 15:49:31 +02:00
Christophe Simonis cfe0523714 [MERGE] forward port branch 12.0 up to 8f21148e1a 2019-05-31 14:37:38 +02:00
qsm-odoo 4f750e7056 [REF] *: handle inline scripts preparing for frontend JS lazy loading
* payment, im_livechat

Inline scripts using `odoo.define` cannot work anymore as the boot.js
file loading will be deferred.
Most of features which used an inline script should probably be entirely
refactored. This commit focuses on removing the inline scripts
with a minimal diff (or at least tried to).

Note: for the website livechat, the inline script was kept as it seems
to be a longer refactoring to get rid of it (even though it is clearly
possible). The inline script was however adapted to make sure it works
with lazy loaded JS in the frontend.

Part of https://github.com/odoo/odoo/pull/32181
task-1961045
2019-06-04 07:57:20 +00:00
Christophe Simonis d5e1fd16b4 [MERGE] forward port branch saas-12.4 up to cda4f3c308 2019-07-29 14:10:30 +02:00
Damien Bouvy ad5472b8c5 [IMP] payment_stripe: flow changes
The previous commit introduced some changes for SCA/PSD2 but some things
were missing; most notably, registering payment cards in a s2s flow used
the old Charge API that is not SCA-ready.

This commit uses the SetupIntent API instead, allowing to register the
card prior to payment. The global flow is described in the Stripe
documentation in more details: https://stripe.com/docs/payments/cards/saving-cards

Unfortunately, given the complete flow of payments, it is not possible
to use the PaymentIntents API since this would require having the
reference of the transaction before it gets created (the TX is created
after the form submission, but the token must already exist at that
point). Since this is meant to be backported, this changes are kept
minimal in this feature branch. The PaymentIntents API would have been
better since registering a card during a payment makes it more likely
that future off-session transactions will not require an authentication
step. We'll have to live with that for now; it's difficult to know
exactly how this will affect customers before PSD2 goes into effect on
september 14.

Another branch might completely change the flow soon-ish to a more
asynchroneous model, although it may miss the v13 freeze date -_-
2019-07-18 06:55:59 +00:00
Damien Bouvy 55548931fd [IMP] payment: small code improvements
- treat s2s transactions as such
- don't filter out tokens saved on acquirers that are not set for full
s2s mode, as tokens might get created through a form and still be usable
- detect the submit event as well as the click on the 'Pay Now' button
to avoid completely wrecking the payment flow by pressing the return key
- correct start override in JS should chain promises
2019-07-18 06:55:28 +00:00
Christophe Simonis 825fee2626 [MERGE] forward port branch 11.0 up to d01db48087 2019-05-08 18:29:32 +02:00
Joren Van Onder 41871bf562 [FIX] payment: prevent duplicate payments with payment tokens
When paying an eCommerce order with an acquirer which doesn't
redirect (payment_flow: s2s) the "Pay Now" button is correctly
disabled after clicking it. This prevents a user from clicking it
multiple times and being charged multiple times.

When paying with an existing payment token however the button was not
disabled and the user gets no feedback his request is being
processed. Charging an existing payment token takes a while (~5
seconds with Authorize) and so it's possible users will hit the button
multiple times.

This disables the button when reusing an existing payment
token. Additionally it now uses the correct font awesome icon (fa-lock
instead of fa-plus-circle).

opw-1981064

closes odoo/odoo#33196

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-07 17:42:33 +00:00
Christophe Simonis 60e71302a3 [MERGE] forward port branch saas-12.2 up to 243a4ae5cb 2019-05-13 11:02:27 +02:00
Christophe Simonis 243a4ae5cb [MERGE] forward port branch saas-12.1 up to 330b99f60c 2019-05-10 15:20:01 +02:00
Christophe Simonis f1d6a6108e [MERGE] forward port branch saas-11.3 up to 825fee2626 2019-05-09 11:12:22 +02:00
Adrien Dieudonne 3e1f2c7a0b [FIX] payment: update jquery.payment from 1.0.2 to 3.0.0
After deep comparison between majors versions, it seems that
there is no breaking changes and this fix a lot of issues in
mobile.

e.g.:
Before this update, the validity date wasn't correctly formated
and the end user had to enter the right format himself.
Some users were blocked at the payment process.

The root cause for this issue is the inconsistent list of native
events triggered by mobile devices.

Note that this library is only used for acquirer forms (S2S Form
Template) when "Redirection to the acquirer website" is checked
(payment_flow == 's2s') in the acquirer configuration.

We are aware that this library is deprecated and should be replaced
in the future.
See https://github.com/stripe/jquery.payment

opw-1986545

closes #33356

closes odoo/odoo#33376

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-05-15 07:19:18 +00:00
Christophe Simonis 8dd5a85267 [MERGE] forward port branch saas-12.3 up to 60e71302a3 2019-05-13 15:26:12 +02:00
Nikunj Ladava d0be25d277 [FIX] payment: fix error msg display
when we get an error while making the payment, it should be shown to the user.
But the message is not getting from proper dict, so it will break every time.

closes - https://github.com/odoo/odoo/pull/33231

closes odoo/odoo#33231

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-05-08 07:05:45 +00:00
Toufik Ben Jaa 3c305daded [FIX] payment: do not display postgres operational errors
- When processing payments on the payments processing page,
`psycopg2.OperationalError` can be raised.
We do not want those exceptions to be displayed to the customers,
instead we want the polling page to try to process the payments again.

This commit hides the display of psycopg2 operational errors.

- This commit also fixes the "processing your payments" message being
hidden after the first polling, no matter if the processing has succeeded or not.

closes odoo/odoo#33462

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-05-17 13:17:01 +00:00
Nikunj Ladava e335d235f6 [ADD] payment_alipay: added new Alipay payment acquirer
This commit introduces the Alipay payment provider, a popular acquirer
in the Chinese market.

There are 2 possible ways to use this acquirer:
- express checkout mode (only available for merchants located in CN)
- standard checkout mode (availabe for foreign merchants)

Note that this provider does not support server-to-server payments,
tokenization or any other bells and whistles besides fees. There are no
specific behaviours related to this acquirer, it behaves like most 'form
based' payment acquirers with a form submission, s2s notification from
the provider as well as redirect in case the s2s did not reach the
server in time.

closes odoo/odoo#21855

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-05-03 11:40:05 +00:00
Jinal Patel 91fd1cf202 [IMP] payment : make s2s card validation transaction optional
Currently, when some add token for s2s payment, dummy transaction of
1 unit was performed and it was frautrating for customer.

So added option on acquirer's settings that check if you want's
to validate the transaction or not.
If 'verify Card validity' is ticked on payment acquirer then and then
it will verify with dummy transaction otherwise it will not going to verify
the card details.

Task-1903170

closes odoo/odoo#29595

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-04-24 08:48:01 +00:00
Christophe Simonis 4eff0af02e [MERGE] forward port branch saas-12.1 up to 6878c9f342 2019-03-21 13:58:37 +01:00
Johan Demaret Rivarola 9d3fed6d3f [FIX] payment: wire transfer redirection
When sequentially paying multiple SO with wire transfer, the user was
always redirected to the first paid SO.

This commit fixes this issue by redirecting to the most recent one.

Technical choice:

payment_transaction rows are ordered by id desc so we can trust the
first one will be the most recent on the client side (in the scope of
this diff).

opw-1949629
Closes #31754

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-12 15:17:29 +00:00
Christophe Simonis 5df4746c9a [MERGE] forward port branch saas-12.2 up to 230ad8c381
closes odoo/odoo#32088

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-25 11:13:41 +00:00
9c90d21f2e [REF] payment: adapt code after jQuery update
Part of task 1896658

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-03-06 20:07:17 +01:00
Nikunj Ladava 0e71f91fa1 [ADD] payment_payulatam: Add new payment acquirer for Latin America
TaskID 1826303

closes odoo/odoo#24802
2019-02-11 11:36:14 +00:00
qsm-odoo 27fca749af [REF] *: use 'frontend' system in non-website apps
* account, auth_signup, payment, portal, project, sale, sale_management,
  web_unsplash, website, website_mail, website_rating, website_sale

This commit does probably not do what is stated for all non-website apps
but it is a first step. It also uses the system in apps which could have
already used it but did not.

Part of https://github.com/odoo/odoo/pull/29442
task-1932066
2019-02-26 17:09:22 +00:00
Darshil Trivedi 6a8f9f3570 [IMP] payment, website_sale_delivery : payment acquirer and delivery method whole part should be clickable and cursor pointer on mouse hover.
Purpose: user click anywhere from panel box to select delivery method and payment method.

Related task ID 1918459

closes odoo/odoo#29604
2019-01-09 12:11:42 +00:00