Commit Graph
177 Commits
Author SHA1 Message Date
Brieuc-brdandElisabeth Dickinson 21d87a3da5 [REF] *: milk graphical assets
- apps icons
- base: replace demo avatars Mitchell, Marc and Joel
- mail: replace odoobot avatar

Part-of: odoo/odoo#116641
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-05-12 22:59:14 +02:00
Antoine Vandevenne (anv) 328f64ab51 [IMP] payment(_adyen): support multiple payment forms on the same page
This commit addresses an issue with the checkout form displayed on the
portal page of the Subscriptions app: when only one payment provider was
available for checkout, and it required an inline form to be displayed,
the latter would not be shown, and customers were able to hit the "Pay"
button, resulting in a client error. The problem was that Subscriptions
now simultaneously displays two payment forms on the same page, one for
checkout and one for managing payment methods, which was not supported
by the payment engine.

closes odoo/odoo#120482

X-original-commit: 91d701e34a25d2ceada1679f36a9cdbb96c6c019
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-05-03 22:09:42 +02:00
Pulinckx Pierre (PIPU) 126da95642 [FIX] *: replace %d by %s when using sprintf
*: web, web_editor, payment
Before this commit, templates with %d was given to sprintf but it was not interpreted by the function
After the commit, %d are replaced by %s in templates for sprintf
Also this commit converts a last _.str.sprintf into sprintf

PR#120143

closes odoo/odoo#120143

Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2023-05-02 15:59:04 +02:00
Thomas Lefebvre (thle) 56ddfdaa6a [FIX] payment: initialize txContext before await
Steps to reproduce:
- install website_sale;
- install website_sale_picking;
- enable just "Pay in store when picking the product" provider;
- pusblish just "[On Site Pick] My Shop 1" shipping method;
- go to ecommerce and make the purchase flow.

Issue:
A traceback appears on the "/shop/payment" page.

Cause:
We use the `txContext` field in the `_setPaymentFlow`
method before it is initialized.
Indeed during the `start` method, we have to wait for the end
of the super before `txContext` is initialized.
Since the `start` method is asynchronous, this will not block
the `_setPaymentFlow` method call which will use the uninitialized field.

opw-3257641

closes odoo/odoo#119351

X-original-commit: 18b629bfc26ab69e5e3bdc8aac090de66cf13f36
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-04-22 05:52:19 +02:00
Pulinckx Pierre (PIPU) 608e90e998 [REF] *: Replace underscore functions by native JS
Replace _.map(), _.flatten(), _.delay(), _.contains(), _.pluck(), _.isUndefined(), _.isEmpty(), _.isString(), _.isEqual(), _.isBoolean(), _.memoize(), _.invoke(), _.bind(), _.escape(), _.debounce(),
_.str.sprintf(), _.str.repeat(), _.str.startswith(), _.str.trim(),
_.str.escapeHTML(), _.str.escapeRegExp(), _.str.startsWith(), _.str.include()

closes odoo/odoo#118012

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-04-20 11:57:29 +02:00
Michael (mcm) 8ec2e8cf80 [REF] *: convert last odoo modules to esm
This commit converts odoo modules that haven't been converted with
commit https://github.com/odoo/odoo/pull/117305/commits/e10b45c69e72f09128e49eb46e42834b1ef515d7.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.

task id: 3162300

closes odoo/odoo#118812

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-19 21:58:39 +02:00
Michael (mcm) ff0d6dd580 [REF] *: replace odoo module by native one
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.

task id: 3162300

closes odoo/odoo#117305

Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-03 17:07:24 +02:00
Horacio Tellez 9e997c7f07 [FIX] payment: stop using the term "payment" when tokenizing
All the messages on the "Payment Status" page were using the term
"payment". This could cause confusion in users when saving payment
methods, as a "payment" related message will appear even that no
payment related transaction is ocurring.

After this commit messages will use the more generic term "operation",
aiding in consistency and as a bonus avoiding confusion in users.

Task - 3050181

closes odoo/odoo#111868

X-original-commit: 14b5bc63a27ead3df882e5f9ebe15c0387c90844
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Horacio Tellez Perez (hote) <hote@odoo.com>
2023-02-03 16:32:30 +01:00
Valentin Chevalier 3079ea09db [IMP] payment(_stripe),website_sale_delivery: change express checkout shipping heuristic
Before this commit, when using express checkout, the shipping address
was requested only if the technical module 'delivery' was installed.

Now, over express checkout, the shipping address will be requested if
the sale order contains products that aren't services.

task-3149536

closes odoo/odoo#111796

X-original-commit: 9c16e83336b042ab77c267607ac43e0ef0db9997
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-02-03 09:28:49 +01:00
Anita (anko) 5cc86c3bb1 [IMP] payment: Rename Payment Icon to Payment Method.
Payment Icon sounds confusig comparing to what it really is,
payment method name makes it clearer for user to understand
what it is.

task-2882564

closes odoo/odoo#105678

Related: odoo/enterprise#33908
Related: odoo/upgrade#4029
Related: odoo/documentation#2955
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-20 18:54:44 +01:00
Valentin Vallaeys (vava) 34f2b5c1d7 [IMP] payment: function to build confirmation dialog allowing overrides
The confirmation dialog to delete a token from a portal user is the
same whatever the linked records. This part of the code is now moved to
a separate function `_buildConfirmationDialog` in order to allow
overrides of the method in particular cases (e.g. Subscriptions).

task-3048269

closes odoo/odoo#105289

X-original-commit: 51d6b724f061af44bc07c342dfa9a34b4d1a2101
Related: odoo/enterprise#33741
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2022-11-08 12:42:58 +01:00
Valentin Chevalier 754570b1d8 [REF] payment(_stripe): cleanup express checkout implementation
Fine-tuning of c624ed5603.

task-3004118

closes odoo/odoo#103125

X-original-commit: 158bc7ef9e20c46a5e9870e70d76e866147662b0
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-10-12 04:35:48 +02:00
Antoine Vandevenne (anv) 4aebe16d56 [CLN] payment: update docstrings for Sphinx's autodoc
task-2804999

closes odoo/odoo#102716

X-original-commit: 5800c773184dce836a0fc3b67189ec6a14124178
Related: odoo/documentation#2797
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-10-09 09:11:43 +02:00
Younn Olivier 35789f9ab4 [FIX] payment: open redirection in top window
When [1] was merged, it did not adapt correctly external providers
redirections. As now the /shop pages can be viewed inside an iframe, the
external redirections must be opened in the top window.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-2687506

closes odoo/odoo#102723

X-original-commit: 3a32b9e1efa6277b345dc9239334680651690df7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-08 18:57:08 +02:00
Christophe Monniez 9d7c2bc391 [FIX] payment: fix payment processing payment_redirect
Steps to reproduce:
- create and send a quotation
- make a failed payment (through cutomer preview)
- create and send a second quotation to the same customer
- make a succesful payment this time
- redirect takes to the wrong quotation (failed one)

Bug:
polling the processed payments initially returns both transaction
but the following polls only returns the rejected payment
(introduced in [1] processed transactions are filtered out)
since there's only a single transaction, redirect takes to it

Fix:
if there's only a single succesful transaction (regardless of the rest)
it means the current payment was successfull so we redirect to it

opw-2954162

[1]:https://github.com/odoo/odoo/pull/31741/commits/7612659565ee24f1c878b81e6c86b5780fbd5a3d

closes odoo/odoo#101252

X-original-commit: 6ea920d2573cf68c6a5cbaf1f6af31fd7de155ff
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-09-27 13:48:44 +02:00
Gorash 39ea7a1fab [IMP] web/all: XML templates are now declared into the python manifest.
Adapt all manifest, split some XML file and update JavaScript files.

Part-of: odoo/odoo#95500
2022-09-14 20:25:01 +02:00
Horacio Tellez f7b8f07501 [IMP] payment: rename of acquirer to provider
Changing the name of model payment.acquirer to payment.provider
and everything that it touches. It is technically incorrect to
use the term "acquirer" for systems that only provide a service
of payment.
After this commit the model payment.acquirer and all related to
it will be renamed to payment.provider.

Task - 2842088

closes odoo/odoo#90899

Related: odoo/upgrade#3542
Related: odoo/documentation#1981
Related: odoo/enterprise#27131
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-09-09 13:38:08 +02:00
Victor Feyens 61b8c0c1a2 [REF] (account_)payment: extract accounting logic from payment 2022-09-06 13:31:00 +02:00
Horacio Tellez 24f33c0282 [IMP] payment: rework the kanban view of acquirers
The present kanban view of acquirers is not the most appealing
one. It is full of useless information (e.g. "online payment") and the
combination of provider logos makes it look "old".

After this commit, the kanban view will hopefully have a "cool" and
concise look simular to the "Apps"'s kanban view.

Task - 284171

closes odoo/odoo#98345

Related: odoo/enterprise#30585
Related: odoo/upgrade#3803
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-09-05 14:50:11 +02:00
Valentin Chevalier c624ed5603 [IMP] payment(_stripe), website_sale(_delivery): support express checkout
This commit enables eCommerce customers to pay with the express payment
methods Apple Pay and Google Pay from the cart page.

For the moment, only Stripe supports this additional feature but it
was designed to make it easy to implement with a new provider.

task-2754209

closes odoo/odoo#88374

Related: odoo/enterprise#29915
Related: odoo/documentation#2392
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-09-05 14:49:33 +02:00
08a7c779cb [ADD] payment_razorpay: integrate with Razorpay's "Payment" gateway
See README for technical details.

task-2800823

Part-of: odoo/odoo#92848
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Prakash Prajapati <ppr@odoo.com>
2022-09-01 19:16:27 +02:00
Horacio TellezandAntoine Vandevenne 15058b6739 [ADD] payment_mercado_pago: integrate with Mercado Pago
Mercado Pago is the largest online payment platform in Latin America,
supports more countries, currencies and payment methods in the region
than other PSPs, and is more accessible to small businesses.

This commit integrates Odoo with a combination of the Checkout Pro and
Checkout API solutions of Mercado Pago to implement payments with
redirection to the provider's payment page.

Task - 2704764

Part-of: odoo/odoo#83957
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-08-30 20:21:54 +02:00
Valentin Chevalier 7612de7227 [FIX] payment(_transfer): only leave the status page when state is final
Before this commit, customers never waited on the status page for their
payment to be confirmed. Instead, they were redirected to the landing
route before that the transaction reaches a final state.

Although this bug is present since version 15.0, it not considered as a
problem worth fixing in stable since redirecting customers in advance is
already supported. It is fixed in master to lay ground for further work
that will require customers to wait for the payment confirmation.

After this commit, customers will remain on the status page until their
transaction state is updated to a final state ('authorized', 'done',
'error'). An exception is made for Wire Transfer's payments that are
never confirmed and should not block the customer on the status page.

task-2908493

closes odoo/odoo#95933

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-08-27 03:33:03 +02:00
Laura Schauer 5ac27efc72 [ADD] payment_aps: add Amazon Payment Services
See README for technical details.

task-2802678

Part-of: odoo/odoo#95860
2022-08-17 17:20:49 +02:00
Victor Feyens d3c935ff27 [CLN] payment: unnecessary csrf token
The csrf token given to the assignTokenRoute is not necessary
and will trigger warnings in the logs.

closes odoo/odoo#94020

Related: odoo/enterprise#28595
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-07-28 10:27:55 +02:00
Victor Feyens 5e2d675149 [IMP] payment: provide the access token to the assign route
to be able to safely check the user is allowed to modify the specified
portal record.

Part-of: odoo/odoo#94020
2022-07-28 10:27:54 +02:00
Antoine Vandevenne (anv) b7181334a9 [REF] payment: reuse the transaction status template wherever possible
The alert block content and style for the transaction status after
payment were computed in two different places: In the dedicated
`payment.transaction_status` QWeb template, and in the
/payment/confirmation` route's controller which, for some reason, was
re-inventing the wheel instead of relying on the dedicated template.
This commit combines the slightly different behaviors in the template
and gets rid of the duplicated logic in the controller to:
- Handle the states 'draft' and 'error'.
- Always show the transaction's state message, and not only when the
  transaction was in a state for which there exists no pre-defined
  message (`draft` and `error`).

task-2924873

closes odoo/odoo#96348

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-07-26 15:48:53 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Aaron Bohy 4f984568e1 [REF] *: adapt code to new kanban view
This commit makes various adapations in addons with respect to
the introduction of the owl kanban view. Mainly, some selectors
in scss and in tests needed to be adapted. Moreover, in some tests
that we haven't adapted yet, we must ensure that legacy form and
list views are still used (useLegacyViews).

It also contains some adaptations in kanban templates, e.g. the
replacement of moment by luxon, the removal of underscore...

Part-of: odoo/odoo#92475
2022-06-30 09:29:45 +02:00
Antoine Vandevenne (anv) 94bddadf4e [ADD] payment_flutterwave: integrate with "Flutterwave standard" gateway
See README for technical details.

task-2759117

Part-of: odoo/odoo#85514
2022-05-31 16:02:08 +02:00
Fabien Pinckaers 10a5796d4b [IMP] speed up load_menus() by using SVG icons instead of png
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.

Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)

closes odoo/odoo#84280

Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-02-12 08:55:18 +00:00
stefanorigano (SRI) 4a5dbf6a57 [FIX] web, *: float utility-classes
'pull-[left/right]' classes are discontinued since Bootstrap v3 [1].
The reason why we never noticed is that we were unknowingly
relying on fontAwesome utility classes that are basically the same.

Since v3 we were supposed to use 'float-[left/right]' classes [2], but
these classes will be renamed again in v5 with 'float-[start/end]'[3].

This commit introduces "v5 ready" utility-classes and replaces v2 legacy
occurrences across the UI.
These classes definitions can be safely removed when v5 migration will
be completed.

Notes:
- this commit will *not* adapt frontend occurrences since its CSS
  already relies on a "migration table" [4]. 
- this commit will *not* adapt the few v3 'float-[left/right]'
  occurrences since are supposed to be handled in the v5 migration
  task (task-2704984).

This commit is part of v16 overall restyle (task-2704984).

enterprise: https://github.com/odoo/enterprise/pull/23848
task-2745275

[1] https://getbootstrap.com/docs/4.3/migration/#utilities
[2] https://getbootstrap.com/docs/4.3/utilities/float/#classes
[3] https://getbootstrap.com/docs/5.1/utilities/float/#overview
[4] https://github.com/odoo/odoo/blob/15.0/addons/website/static/src/scss/compatibility/bs3_for_12_0.scss#L49

Part-of: odoo/odoo#83501
2022-02-08 12:05:53 +00:00
pedrambiria 19a079df4c [FIX] payment: preserve type of all-digits transaction references
Before this commit, it was impossible to make a payment if the
transaction reference exclusively contained digits. This is because the
reference is extracted from the data-* attribute of the <form/> element
of the payment form and wrongly cast into an integer by jQuery before
being passed to the server. Indeed, as of jQuery 1.4.3, HTML5's
data-* attributes are automatically pulled into a jQuery's data object.

To reproduce the issue, remove the prefix from the sequence of the sales
orders and attempt to pay a quotation from a payment link.

This commit forces the reference to be cast into a string as it is the
variable type that the server expects, and it crashes if the reference
is an integer.

opw-2732448

closes odoo/odoo#83753

X-original-commit: 57d9997fa59c82e03c46b149daece5ce32395c5c
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-01 18:07:06 +00:00
Nasreddin Boulif (bon) 3298164393 [FIX] website_sale,payment[adyen,authorize]: Block UI only on click pay
Step to reproduce:

  - Install website_sale module
  - Go to the shop
  - Add a product to the cart and proceed to checkout
  - Click on Customize and activate `Accept Terms & Conditions`
  - Deactivate the `Accept Terms & Conditions` or click on a
    payment method.

Issue:

  UI freeze.

Solution:

  Freeze ui only when clicking on pay button.
  Unfreeze only if payment process fails (or when displaying an error).
  Revert of https://github.com/odoo/odoo/commit/41b91e12eb80cee08e3a25bcc6546ef34937d8cf and adapt it correctly

opw-2702798

closes odoo/odoo#83155

X-original-commit: b6ae8a0a91c58ce503c98ca2a66a4d125907dac1
Related: odoo/enterprise#23639
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-01-22 13:25:44 +00:00
thcl-odoo d826b0ac7a [FIX] payment: allow the user to archive the tokens he sees
Expected behavior :
User should be able to archive the tokens he sees

Current behavior :
User sees his tokens but cannot archive a token from another company

Steps to reproduce :
- Install Sales & Contacts
- Create a 2nd Company
- Enable `Online Payments`
- Setup a Payment Acquirer (Test Mode for current company) *Be sure to have `Allow Saving Payment Methods` checked*
- Create a new contact and grant him portal access

*With new contact*
- Get the link and set a password
- Create a new payment method in `Manage payment methods`

*With admin again*
- Replace `Allowed Companies` and `Default Company` for the new contact by the company created before

*With new contact*
- Go back in `Manage payment methods` and try to delete the token

Reason :
Before, the `write` method from the model was called but returned an AccessError because the token was linked to another company.
Now a custom route is called, it checks if the token is linked to the user and archives it with the necessary rights

OPW-2660186

closes odoo/odoo#82405

X-original-commit: 19f8c4e26291740edecd0c101c3d331deef2758d
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-01-14 15:44:48 +00:00
Antoine Vandevenne (anv) 5394f9702b [FIX] payment: hide toaster notification for token deletion error
Before this commit, a toaster notification would be shown in addition to
the dedicated error div in the inline payment form when an exception is
raised while trying to archive a payment token.

closes odoo/odoo#82420

X-original-commit: ff7368a4d140a5fe7cf995d61847e81c6a7fd65e
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-01-10 08:46:27 +00:00
thcl-odoo f09482c57f [FIX] payment: use correct target on onclick event
Current behavior :
If we click on the icon rather than the label we got a crash

Steps to reproduce :
- Enable Online Payment and configure an acquirer and add the possibility to save the card
- Go to the Website and Log in (e.g. as `Marc Demo`)
- Go to your account (from dropdown menu > `My Account`)
- Manage you payment methods and add a new one
- Try to delete the newly added payment method by clicking on the trash icon in the button

Reason :
Currently, we rely on the `target` property of the event (triggered after clicking on the button).
The problem is that, as in this case, if a button has an HTML element as a child and we click on this child, `target` property will target the child whereas in this case we want to retrieve the button and not the child.

Using `currentTarget` property instead of `target` allows us to retrieve the button no matter what since `currentTarget` always refers to the element to which the event handler has been attached.

OPW-2660186

closes odoo/odoo#80253

X-original-commit: e8ec4fb6aa9ee4796d486a3d32e6a9a5e1382548
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
2021-11-23 13:55:05 +00:00
Parth GajjarandKishan Gajjar 6e67c17538 [ADD] payment_mollie: added mollie payment acquirer
closes odoo/odoo#74136

Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
Co-authored-by: Kishan Gajjar <kig@droggol.com>
2021-09-01 11:05:44 +00:00
Antoine Vandevenne (anv) dbefe34af5 [IMP] payment(_authorize): rework validation transactions refund flow
Before this commit, the validation flow with verification (payment of a
small amount with immediate refund) was performed with the use of
validation routes: after payment, the customer was redirected to the
validation route stored on the transaction to trigger the refund. This
implementation had an issue: if the customer never reached the
validation route, they were not refunded their validation amount. This
could happen if the customer closed the tab after paying with an
acquirer offering payments with redirection, or if the validation
payment was asynchronously confirmed through a webhook notification.

This commit gets rid of validation routes and requires acquirers to
immediately refund the validation amount when the payment is confirmed.
This way, a payment confirmation coming from a webhook can trigger the
refund too.

As the only acquirer that implements the validation with verification
flow, Authorize.net now voids validation transactions as soon as they
are authorized.

While we're at it, the logging of processing values is adapted to only
log specific rendering values if a redirect form is rendered.

task-2612977

closes odoo/odoo#74707

Related: odoo/enterprise#20060
Related: odoo/upgrade#2710
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-08-04 13:03:27 +00:00
Xavier Morel 492fcca54c [FIX] payment: de-traw-ify
Mark `display_message` (feedback from payment provider) as markup-safe.
2021-07-20 05:41:36 +00:00
Xavier Morel 67e7190611 [IMP] *: convert dialog title to t-out
Need to check and mark legit uses of HTML as Markup. Also fix some
title formattings which are not great (mostly around translations) and
de-escape titles which don't need to be escaped anymore.
2021-07-20 05:41:30 +00:00
Victor Feyens 21b5101319 [FIX] payment: accept invoice ids in payment links
This commit brings back the possibility to pass invoice ids in payment
links, a feature that was lost with commit 573ed74c. If such an id is
present in the payment link URL, the transaction that is created must
have a reference starting with the name of the invoice, and must be
linked to it.

task-2494916

closes odoo/odoo#72992

X-original-commit: 6c13a361400332955cdf5ac5a14bd1970b4f66ef
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-06-30 11:42:43 +00:00
Nasreddin (bon) 8e0a75ba15 [FIX] payment: enable pay button when clicking back button
Issue

    Use Safari (or equivalent) browser

    - Install e-commerce
    - Go to Website -> Configuration -> Payment Acquirers
    - Activate Ingenico in test mode
        (write aaa in required fields)
    - Go to shop, and add product to card
    - Go to checkout
    - Select Ingenico payment mode
    - Click on Pay button
    - When on the ingenico page, press back

    The page is blocked and the button is disabled.

Cause

    When clicking on Pay button, the page is locked and
    the button is disabled.
    With Chrome, when coming back to previous page,
    this one is regenerated and therefore adapt the button.
    In Safari, it is not the case.

Solution

    On `pageshow` event, if event have `persisted` attribute set to
    to true, meaning using cache, then reload page.

Fixes https://github.com/odoo/odoo/issues/69453

opw-2510281

closes odoo/odoo#70906

X-original-commit: c89224940bcc59aab4bddefa95b2b0ef7713e02f
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-05-17 16:50:53 +00:00
Xavier Morel 79a4d11e24 [FIX] *: bunch of mismarked translation specifiers
`_(xyz)` will wrap them in an underscore.js object, which when used in
a string context will just return the string. So it's basically a
no-op, but it certainly doesn't translate the terms.

closes odoo/odoo#70476

X-original-commit: 92352ed2b5524c97b0aeeba3193c6a8d93ed82a1
Related: odoo/enterprise#18172
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-06 12:06:22 +00:00
Simon Genin (ges) ecfe85db84 [REF] web: static/src/(img|fonts) => static/(img|fonts) 2021-04-29 07:34:40 +00:00
Antoine Vandevenne (anv)andVictor Feyens 573ed74c12 [REF] payment, *: refactor online payments API
This commit replaces the old online payments API of the `payment`
module with the new one and adapts to it all the implementing modules.

See the merge commit for more details.

task-2085989
task-2119838
task-2165982
task-2289255

Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-03-30 09:25:51 +02:00
Petar Najman f73c7b72be [IMP] payment: allow overriding the redirect form HTTP method
closes odoo/odoo#68256

X-original-commit: 923eaae31b0993d8a7e653b334471f7b6289450f
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-03-23 16:07:11 +00:00
nie 3a7db03295 [FIX] payment: link transaction to invoice with payment link
Steps:
- Install account,payment
- Go to Invoicing
- Create an invoice
- Click Actions > Generate a Payment Link
- Follow the generated link
- Pay

Bug:
The transaction is not linked to the sale order in the link table
`account_invoice_transaction_rel`

Explanation:
This fix is broadly mimicking the behavior of the sales module regarding
the link of an order to a transaction, adding `invoice_id`s where they
are needed throughout the payment process in order to link the
transaction to the invoice.

opw:2451534

closes odoo/odoo#67296

X-original-commit: 7c6d06fa5858f79f3b22cdeaf74cdc26a642742f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-03-04 19:28:25 +00:00
Benoit Socias 317266d4e3 [IMP] payment, payment_test: missing payment token identifier
Before this commit payment tokens had no name for Test Payment Acquirer

After this commit tokens generated by Test Payment Acquirer have a name
that combines the last 4 digits of the card number and the card account
holder name

https://github.com/odoo/odoo/issues/50965

closes odoo/odoo#61848

X-original-commit: e20f0650acbd1a7a918375a70ec5c89606523a7b
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-17 12:08:11 +00:00
IELandRomain Derie 64f1017491 [FIX] payment: prevent changing checkout options
STEPS:

* install website_sale
* setup few delivery options
* setup online payment (e.g. paypal)
* at website add products to cart and proceed to checkout page
* slow down internet speed
* click "Pay now"

BEFORE: while it's loading, you can change delivery option. So, you have SO
changed, while in payment page you see old total amount

AFTER: it's not possible to change delivery options through UI

Note that it is not possible to pay less that what you should at anyway.

opw-2324543

closes odoo/odoo#61723

X-original-commit: eb3ed89f8440050fc32f9a7b29fb2b6ab8fd6b59
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Co-authored-by: Romain Derie <rde@odoo.com>
2020-11-13 14:38:18 +00:00