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
closesodoo/odoo#117305
Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#111796
X-original-commit: 9c16e83336b042ab77c267607ac43e0ef0db9997
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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
closesodoo/odoo#105289
X-original-commit: 51d6b724f061af44bc07c342dfa9a34b4d1a2101
Related: odoo/enterprise#33741
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
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
closesodoo/odoo#102723
X-original-commit: 3a32b9e1efa6277b345dc9239334680651690df7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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/7612659565ee24f1c878b81e6c86b5780fbd5a3dclosesodoo/odoo#101252
X-original-commit: 6ea920d2573cf68c6a5cbaf1f6af31fd7de155ff
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
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
closesodoo/odoo#90899
Related: odoo/upgrade#3542
Related: odoo/documentation#1981
Related: odoo/enterprise#27131
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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
closesodoo/odoo#98345
Related: odoo/enterprise#30585
Related: odoo/upgrade#3803
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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
closesodoo/odoo#88374
Related: odoo/enterprise#29915
Related: odoo/documentation#2392
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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
closesodoo/odoo#95933
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
The csrf token given to the assignTokenRoute is not necessary
and will trigger warnings in the logs.
closesodoo/odoo#94020
Related: odoo/enterprise#28595
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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
closesodoo/odoo#96348
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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
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
closesodoo/odoo#83753
X-original-commit: 57d9997fa59c82e03c46b149daece5ce32395c5c
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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
closesodoo/odoo#83155
X-original-commit: b6ae8a0a91c58ce503c98ca2a66a4d125907dac1
Related: odoo/enterprise#23639
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
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
closesodoo/odoo#82405
X-original-commit: 19f8c4e26291740edecd0c101c3d331deef2758d
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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.
closesodoo/odoo#82420
X-original-commit: ff7368a4d140a5fe7cf995d61847e81c6a7fd65e
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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
closesodoo/odoo#80253
X-original-commit: e8ec4fb6aa9ee4796d486a3d32e6a9a5e1382548
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
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
closesodoo/odoo#74707
Related: odoo/enterprise#20060
Related: odoo/upgrade#2710
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
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.
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
closesodoo/odoo#72992
X-original-commit: 6c13a361400332955cdf5ac5a14bd1970b4f66ef
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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
closesodoo/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>
`_(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.
closesodoo/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>
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>
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
closesodoo/odoo#67296
X-original-commit: 7c6d06fa5858f79f3b22cdeaf74cdc26a642742f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
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/50965closesodoo/odoo#61848
X-original-commit: e20f0650acbd1a7a918375a70ec5c89606523a7b
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
closesodoo/odoo#61723
X-original-commit: eb3ed89f8440050fc32f9a7b29fb2b6ab8fd6b59
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Issue
- Install "eCommerce" and "Inventoy"
- Activate "Fedex" delivery connector in settings
- Publish "Free Delivery" and "Fedex US" delivery method
- Put the "FedEx" one above the "Free Delivery"
- Go to shop and add an item to cart
- Set an adress with no ZIP code and checkout
- Select a payment methode and pay
Order is generated without selecting a delivery method
Same behavior happend when using only "Fedex" as delivery
method.
Cause
The flow make the `payment.payment_form` trigger start after
`website_sale_delivery.checkout` JS module.
In 'start' function of `payment.payment_form`, the `disabled`
attribut is removed from button if no checkbox_cgv is present
and therefore break the `disabling` managemet since
`disabledReasons` payButton data are not sync anymore.
Solution
Remove 'disabled' attribut only if has `disabledReasons` data on
payButton (checkbox_cgv feature alter `disabledReasons`).
opw-2355407
opw-2357605
closesodoo/odoo#60359
X-original-commit: 04e589e80b3ef48640f275cb20d31c17c2126c69
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Steps to reproduce:
- Go to the website shop
- Add a product in the cart
- Add your address and click on checkout
- On the checkout, enable Terms & conditions
Bug:
The button was always enabled even if the check box with the terms & conditions were not
checked.
opw:2313437
closesodoo/odoo#55821
X-original-commit: 0415da51960819ec9c989e15a9229bd6d583ba1b
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Issue
- Go to Accounting / Customers / Invoices
- Pick any invoice not paid
- Action: Generate a Payment Link
- Open the link
- Refresh the page having Javascript disabled
- Click the Pay Now button
Traceback
Cause
If JS is not loaded, the values in the form fields are
not bound as expected.
It can also happen with slow connections and fast click
on the button at the loading. Before the JS is entirely
loaded (as it is lazy-loaded).
Solution
Button disabled by default, wait the page to be loaded
and then activate the button
OPW-2255760
closesodoo/odoo#54128
X-original-commit: 0e7071f249e69c5cca519ec66120530eb0f97153
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
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.
closesodoo/odoo#42780
X-original-commit: 452676737dd657a5d31a88fa89cc136cbe69b96a
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
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
closesodoo/odoo#41910
X-original-commit: 76a0e4fea0d9a15b3d193e00dd473c4488d18640
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
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
closesodoo/odoo#39571
X-original-commit: e3644c6b59271c521abc151d3c533331836fdc90
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
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
closesodoo/odoo#38348
X-original-commit: c1fb136cc684eba0cdeec302f27268ccda7fa5d2
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
before this commit:
the icon was not there in proper position
after this commit:
the icon is at proper position
task- 2074108
closesodoo/odoo#37352
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>