Commit Graph
77 Commits
Author SHA1 Message Date
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
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 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
Christophe Simonis 4eff0af02e [MERGE] forward port branch saas-12.1 up to 6878c9f342 2019-03-21 13:58:37 +01: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
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
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
qsm-odoo 02dcef80c9 [FIX] portal, *: stop breaking behaviors on dblclick
* payment, website_sale

This commit solves the problem described in the issues mentioned below
by using the new system introduced by the parent commit.

That new system is even more integrated with website "animations" but
the mentioned issues' features are not yet converted to use those (this
will be a master task to make "Website Widget" be defined in portal to
use all of those integrated features). This commit however converts an
already protected behavior of website_sale using that "animation"
integration.

Closes https://github.com/odoo/odoo/issues/27976
Closes https://github.com/odoo/odoo/issues/28704
2018-11-28 16:11:24 +00:00
Nikunj Ladava 293dbe267a [FIX] payment: fix invalid param on rpc fail
This commit is related to Task ID 1891721

closes odoo/odoo#27555
2018-10-09 05:42:29 +00:00
Demaret Rivarola Johan 1803571bdb [FIX] payment: always redirect when using wire transfer
The user should always be redirected when paying with wire transfer.
This is because the landing page displays useful data such as the communication.

Closes #27194
2018-09-26 14:50:17 +02:00
Géry Debongnie 30302bc116 [FIX] payment: remove ES6 specific construct
Using the arrow syntax from ES6 is nice, but it breaks the doc build
process.
2018-09-25 14:46:58 +02:00
Toufik Benjaa 6ed44181d0 [IMP] payment_*: payment acquirers error handling
This commit aims to improve the user experience when using payment acquirers. There currently are no error feedback with some acquirers, which leaves the user wondering what is going on and what is the real status of its payment.
In some cases, the user is currently being redirected to the home page even though the payment has failed. We want to make it more obvious to the user that something unexpected has happened by redirecting to an intermediate page that will provide good feedback on payments status.

Another goal of this commit is to order acquirers by sequence instead of by flow and to select the first acquirer by default. This feature was already implmented in commit fe294fd43e521bd2d339e962f43acf46c3d4cb97, some UI adaptations were needed though.

Related to task #36680
Closes #26958
2018-09-19 18:25:32 +02:00
Priyanka Kakadiya 1c44e53741 [FIX] payment, *: BS4, adapt ui of shop/payment page in website.
* website_sale, payment_authorize, payment_ogone, payment_stripe,
  website_sale_delivery

(Many bugs were only revealed by BS4, not created)

- Align payment method (Ex.Stripe) form attributes in row.
- Fix align between radio button and payment method name.
- Removed header div from 'billing & shipping'.
- Set badges (Ex.free) and align between badges and delivery method
  name in choose delivery method.
- Border subtraction from delivery methods div as already card class
  has border.
2018-08-19 16:57:14 +02:00
Christophe Simonis 0ac7f8fbe6 [MERGE] forward port branch saas-11.4 up to dabe59df9c 2018-08-14 20:16:03 +02:00
Christophe Simonis dabe59df9c [MERGE] forward port branch saas-11.3 up to 27d8daf8a7 2018-08-14 19:43:32 +02:00
Christophe Simonis 27d8daf8a7 [MERGE] forward port branch 11.0 up to 51225c9b9f 2018-08-14 18:59:57 +02:00
Lucas Perais (lpe) 215754a7db [FIX] payment: display error on payment acquirer return
Before this commit, when authorize (for example) returned a business error
the error wasn't displayed to th ecustomer

After this commit, it is.

OPW 1866408

closes #26279
2018-08-10 09:27:09 +02:00
Nikunj Ladava 1978fc2bd0 [FIX] payment: forward port of 8be798375e
Parameters of the rpc.fail is changed because of this commit : https://github.com/odoo/odoo/commit/fc5d030ef2695f7d2daeb87db9697240be4b99d4#diff-c52e0c611c3001980c7a7be0f6395e60R80

This commit is related to Task ID: 1869500
Closes #26052
2018-07-31 17:12:58 +02:00
Nikunj Ladava 8be798375e [FIX] payment: fix rpc.fail in payment form
Parameters of the rpc.fail is changed because of this commit : https://github.com/odoo/odoo/commit/fc5d030ef2695f7d2daeb87db9697240be4b99d4#diff-c52e0c611c3001980c7a7be0f6395e60R80

This commit is related to Task ID: 1869500
Closes #26052
2018-07-31 16:45:03 +02:00
qsm-odoo 93b0001df6 [REF] *: BS4, adapt forms
The 'form-horizontal' class have been removed; the '.form-group'
elements must now use the 'row' class for an horizontal layout.

The 'control-label' class was renamed to 'col-form-label'.

The 'help-block' class was renamed to 'form-text'.

The 'has-error' and 'has-success' classes have been removed and
replaced by a new system using the :valid and :invalid pseudo-classes,
when a parent has the 'was-validated' class. While this system is great,
it is not straightforward to use it in Odoo. Fortunately, BS4 provides
the 'is-valid' and 'is-invalid' classes as fallback. This commit
replaces the 'has-error' and 'has-success' classes by 'o_has_error' and
'o_has_success' classes (for JS compatibility) and use the 'is-*'
fallback classes. (The 'has-warning' class has no equivalent but was
unused in Odoo anyway).
2018-07-27 12:36:54 +02:00
qsm-odoo 443735949e [REF] *: BS4, replace img-rounded/img-circle classes
'img-rounded' -> 'rounded'
'img-circle' -> 'rounded-circle'
2018-07-27 12:36:54 +02:00
qsm-odoo 7f10b55a50 [REF] *: BS4, adapt display classes
The system completely changed. I also had to adapt classes to new
screen breakpoints.

hidden/hide -> d-none
show -> d-block
hidden-xs -> d-none d-md-(block/inline/...)
hidden-sm -> d-md-none d-lg-(block/inline/...)
hidden-md -> d-lg-none d-xl-(block/inline/...)
hidden-lg -> d-xl-none
visible-xs-* -> d-* d-md-none
visible-sm-* -> d-none d-md-* d-lg-none
visible-md-* -> d-none d-lg-* d-xl-none
visible-lg-* -> d-none d-xl-*
hidden-print -> d-print-none
visible-print-* -> d-none d-print-*
...
and all possible combination of those had to be handled too.
2018-07-27 12:36:54 +02:00
kujiu 9de1bc0eef [IMP] Improve compatibility with screen readers (accessibility) (#24574)
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.

This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.


* [IMP] Labels must have a for attribute. Improve accessibility.
* [IMP] Better error message when trying to read a missing cached value
* [FIX] Add some aria-label and title attributes for screen readers.
* [FIX] Template name is not included in the error message in case of SyntaxError in QWeb
* [FIX] Improve the Tour failed at step error message to be more explicit.
* [IMP] Add aria-labels
* [FIX] Add missing aria-label on failing test
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views and many2many tags
* [IMP] Add some checks on views for accessibility.
* [IMP] Add `alt` attribute on `img` tags.
* [IMP] Add aria-label and title on non-described icons
* [IMP] Add button role to widgets with btn class
* [IMP] Translate aria and formatted attributes.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [IMP] Add aria attributes on progress bars
* [IMP] Improve accessibility of basic widgets
* [IMP] Change main layout to more semantic tags
* [IMP] Add menuitem role when missing
* [IMP] Remove wrong role='presentation'
* [IMP] Improve accessibility of tab panels
* [IMP] Add aria-invalid on invalid fields
* [IMP] Add aria-sort on ordered columns
* [IMP] Add role on alerts
* [IMP] Use dialog role, header, main and footer tags for modals
* [IMP] Add labels on o_status
* [IMP] Improve accessibility of kanban view with feeds and articles
* [IMP] Add alerts in case of new messages
* [IMP] Add widget, navigation or img role to aria-labelled items
2018-06-22 21:22:21 +02:00
qdp-odoo 01216345e2 [REF] account,payment(_*),sale*: downgrade transactions into debug items
It was very confusing for the user to distinct account.payment and payment.transaction. From now on, the transactions are
technical objects and, in the backend, we only refer to it in log messages (Front end will be adapted in the same fashion
later on). They are hidden in debug mode in accounting\configuration\payments as their purpose is now purely technical/log

This commit also aims to reduce the gap between the accounting app and the transactions: account.payment objects are
created/validated upon completion of transaction.

To ease the capture/voiding of pending transactions, the related buttons are now displayed directly on the SO/invoice
instead of the transactions.

Was task: https://www.odoo.com/web#id=35857&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
Was PR #24043

[FIX] add domain based on journal to payment tokens

Was opw: https://www.odoo.com/web?debug#id=1828206&view_type=form&model=project.task&menu_id=5200
2018-05-23 15:44:55 +02:00
qsm-odoo 97aa0a8dec [REF] *: convert less content to scss content
Convert content so that the assets compile on app installation. The
style is still broken after this as the variables/mixins/... are not
defined in the right order (as it did not matter in LESS but does in
SCSS).

This commit basically changes:
- Variables: @​var_hello -> $var-hello
- Mixins: .mixin_world() {} -> @​mixin mixin-world {}
- Classes used as mixin: .my_class() -> @​extend .my_class
    - Here there were no other solution than to convert the use of
      a mixin call by the use of an extend as a first approximation
- LESS functions -> SCSS functions (e.g. fade -> rgba)
- Move first variable definition before the variable is used
    - Still need to make sure last variable definition is at the
      right place
2018-04-18 15:59:16 +02:00
qsm-odoo b04dec4025 [REF] *: rename all LESS files to SCSS
This is a simple renaming without adaptation.
2018-04-18 15:59:15 +02:00
Christophe Simonis 5f2d080cf8 [MERGE] forward port branch 11.0 up to ad825b673b 2018-04-16 18:34:56 +02:00
Romain Derie 0879cb88fe [FIX] payment: make the error handler works for non s2s acquirer
Before this commit, error handling would not work for non s2s payment acquirer
since it would always check for `o_payment_add_token_acq_[id]` in the DOM but
this is only present for s2s acquirer.
Non s2s acquirer got `o_payment_form_acq_[id]` in the DOM.

Now, we retrieve the correct DOM element depending if s2s is enabled for this
payment acquirer or not.

task-1825701
2018-04-10 16:10:59 +02:00
Christophe Simonis e0345a4a3f [MERGE] forward port branch 11.0 up to 2835d29979 2018-03-20 11:45:11 +01:00
Goffin Simon 8df915da05 [FIX] payment: Payment integration with Authorized.net making double transactions
When making a payment with authorize.net by clicking on "Pay Now" in the shop, it was
possible to send several transactions for the same SO because the button "Pay Now"
was enabled before being redirected.

opw:1819588
2018-03-14 14:50:14 +01:00
Christophe Simonis 9a84ba5533 [MERGE] forward port branch saas-11.1 up to e750bb6e11 2018-02-22 10:39:15 +01:00
Christophe Simonis ae6a65753e [MERGE] forward port branch 11.0 up to dbb713c2f8 2018-02-21 20:19:26 +01:00
tbe-odoo 14081b848f [FIX] payment: Payment form not implemented on /website_payment/pay
The generic payment form introduced in 11.0 has changed the way we collect payment and so does the code.
The route /website_payment/pay hasn't been changed to support the new payment form.
This commit fixes this.

It also fixes a bug for when a customer tries to create two transactions with the same reference.
2018-02-20 15:36:56 +01:00
qsm-odoo b3c5392b6a [REF] *: convert sass content to less content
* note, payment, sales_team, website_forum, website_sale(_options)

(prepare for all less -> scss conversion)
2018-01-29 15:37:28 +01:00
qsm-odoo 6bdb979b39 [REF] *: rename sass files to less files
* note, payment, website_forum, website_sale(_options)

This is a simple renaming of sass files to less files. The real
convertion will be done in the commit that follows.
2018-01-29 15:37:28 +01:00
Christophe Simonis cb50970f3f [MERGE] forward port branch 11.0 up to eefe879a37 2018-01-25 15:41:45 +01:00
fda-odoo 9ba1cc46c5 [FIX] payment: save the token if the option is checked in the form mode of the related acquirer.
The function was searching for the wrong acquirer in the page, so check the option was without effect
2018-01-24 15:38:54 +01:00
fda-odoo 2a59f2804f [FIX] payment: display a better button for "add new card"
it removes the + while the rotating spin is showing and display the + icon after the loading
2018-01-24 15:38:02 +01:00
jpr-odoo 480eaf460a [FIX] payment: reduce margins to have same height then options without payment icons) and label align centered on the vertical axis 2018-01-24 15:33:19 +01:00
jpr-odoo 1f712532a3 [FIX] payment: fix card brand type icon position into s2s form if s2s form not in bootstrap_formatting
up the number of brand cards displayed by default too.
2018-01-24 15:31:51 +01:00
fda-odoo daf6ab1c87 [FIX] Payment, payment_authorize: show an error if customer doesn't have a complete profil on authorize.net payment.
If the user has no Zip code, country or city, authorize refuse the payment, but Odoo doens't show any error.
The commit invite the user to log in in this case or to fill his missing information
2018-01-24 15:28:53 +01:00
fda-odoo 50beec7fa0 [FIX] payment: improve invalid input management on payment form
The different fields weren't correctly checked on a payment form. This commit improve the error messages and display it for each field. It adds too a verification on the fields in the case of the field are filled automatically by Firefox on a refresh (F5).
2018-01-24 15:28:32 +01:00
Christophe Simonis 362f0489d0 [MERGE] forward port branch 11.0 up to fe22a0f9ca 2018-01-03 12:28:52 +01:00
qsm-odoo 506e45e73f [FIX] payment: consider the "Save my payment data" option
Before this commit, the option was ignored. Indeed "checked" is a
DOMElement property, not a jQueryElement's one.

See https://github.com/odoo/odoo/issues/21321
2017-12-19 10:46:22 +01:00
qsm-odoo 91b3a4fa8c [FIX] payment: properly allow PaymentForm extensions
Commit https://github.com/odoo/odoo/commit/be650c5979d6d427ad79bc23f0edc1d10290f881#diff-b448c1be5e302f4819079161e4fe3de9L369
added a `require` in the middle of a file, making the whole file
require the DOM to be ready.

This was not really a problem as the module did not return anything...
until https://github.com/odoo/odoo/commit/d2815c474d7ab24a06f5365d967a602119252b95

Proper way to fix this would be to split the module in two parts, one
requiring the DOM to be ready and not the other one. However, this
commit chose to do a fix as stable as possible.

See https://github.com/odoo/odoo/issues/21702
(and https://github.com/odoo/odoo/issues/21321)
2017-12-19 10:46:22 +01:00
Christophe Simonis 8ef7af6afe [MERGE] forward port branch 11.0 up to f96a797fe6 2017-12-06 12:02:58 +01:00
Géry Debongnie d2815c474d [FIX] payment: return widget reference
This file, like many others, does not return a reference to its main
widget, which implies that it cannot be modified/extended.  This may be
fine for Odoo itself, but some other may (and do) need to extend/include
this widget.
2017-12-04 09:18:04 +01:00
Atchuthan f03437ae00 [FIX] payment: display error message
The error message was not displayed as out of the paragraph block

Closes #21342
2017-12-01 15:33:08 +01:00
Christophe Simonis 29590a61cd [MERGE] forward port branch 11.0 up to 8fb25e185b 2017-11-28 16:57:58 +01:00