Commit Graph
60 Commits
Author SHA1 Message Date
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 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
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
Goffin Simon f414b4227a [FIX] payment: Cannot add a new card from My Account portal
Steps to reproduce the bug:

Setup Authorize.net test account, then go to My Account from portal
and select "Manage your Payment Methods" and add a new card.

Bug:

It raised "Please fill all the inputs required."

opw:782716
2017-11-22 13:39:23 +01:00
Christophe Simonis c703a2a0c3 [MERGE] forward port branch 11.0 up to d279a3e6d5 2017-11-16 17:55:37 +01:00
jpr-odoo fb7e1ed238 [FIX] payment: correctly display additional payment icons when clicking on "and more" in payment form
Instead of being redirected to the top of the page. Which is probably not
good uzabilitiouaïze.
2017-11-14 17:00:42 +01:00
Christophe Simonis a54c60b45a [MERGE] forward port branch 11.0 up to e918271f76 2017-10-27 14:30:33 +02:00
tbe-odoo 7c639be4aa [FIX] payment_stripe: fix stripe payment form
- Before this patch, stripe doesn't get displayed.
    It was a bug related to the fact that stripe doesn't respect how the generic payment form works.
    So to make it work, we were relying on small hacks that got broke by changes on the payment form.
    To fix the bug we are no longer adding an event to the pay button of the payment form, instead
    we listen all the changes made to the DOM and detect if a form with an attribute 'provider' set to
    'stripe' is added.
    If so, we open up the Stripe payment form.
- Fix ACL issue when trying to pay with Stripe on eCommerce without being logged.

Closes #20202
opw-776200
2017-10-27 11:45:25 +02:00
Khoi Nguyen 3f962dbe63 [FIX] web,*: replace core.debug by config.debug 2017-10-18 16:52:41 +02:00
qsm-odoo 93bf26abc1 [FIX] web, *: review kanban record sizes
* account, maintenance, mrp, payment, point_of_sale, sales_team

Previous system was:
- `flex: 1 1 300px;` on kanban records
- If a specific record needs a different size, add custom style to
  either change the `flex` rule or set a `min-width` for >=SM screens

Now:
- `flex: 1 1 auto;` and `width: 300px;` on kanban records
- If a specific record needs a different size, add custom style to
  change the `width` rule.

This allows some standardization of the way to customize the suited
width and also allow lesser LESS code (as the previous version required
either the use of the flex mixin or the use of a media query).

Note:
- Also remove useless app record rule
- Also fix MRP Work Centers record width

Note2:
This system should be improved for version 12.0.
2017-09-20 16:57:50 +02:00
Thibault Delavallée 06fe263a15 [IMP] payment: add new explicit parameters to the payment widget
Purpose of this commit is to ease the use of the payment widget and
avoid having to perform too much custom code in the various routes used
when doing payments :

 * when instantiating the widget give him its parent element data so
   that parameters given when calling the payment form template are
   automatically present in the widget options;
 * support more parameters when calling the route for form-based acquirers
   including access_token, URLs and callback method;
 * when doing a form-based payment a call to a JSON route returning the
   rendered form is done. Payment widget now uses all data from that
   form including the URL of the acquirer website. This way form-based
   acquirers are really dynamic and values update is easier;
 * remove hidden display of form-based acquirers as all data come now
   from the called JSON route that returns the form;
 * add a warning about partner-id not being set as it is an issue some
   people may encounter;
2017-09-06 10:40:46 +02:00
Thibault Delavallée e986f0986e [CLN] payment: lint newly-introduced payment form
This commit performs just some linting in order to ease code reading and
prepare future updates.

 * extract duplicate variable computation;
 * link spaces and indentation;
 * light renaming to ease code understanding;
2017-09-04 14:09:58 +02:00
Thibault Delavallée dae6178a0a [FIX] payment: fix issue about required fields in payment form
It seems like even a correctly-filled field triggers an empty input
error because variable about empty error is always True.
2017-08-31 10:20:51 +02:00
tbe-odoo be650c5979 [IMP] Fixing the code to fit the reviews 2017-08-29 17:16:42 +02:00
tbe-odoo ad095e492f [IMP] payment,website_payment: Change payment.option model name to payment.icon 2017-08-29 17:16:42 +02:00
tbe-odoo 7419661247 [IMP] payment_stripe: Compatible with the new payment form
- Stripe checkout form is now compatible with the new payment form.
- Fixed a typo on a currency code.
2017-08-29 17:15:00 +02:00
tbe-odoo 83fdc63b68 [IMP] payment: Fix crash on install
- Fixed a crash when installing payment module.
- Set a more specific css selector to display error on payment form where required input are empty
2017-08-29 17:13:58 +02:00
tbe-odoo f74111f79f [IMP] payment: Display error when input are empty
- Required fields are now checked, if they are empty then we make their border red and display an error dialog.
2017-08-29 17:13:58 +02:00
tbe-odoo 6b38cd8b85 [IMP] payment: UI changes & Fix 500 errors
- Fixed 500 errors when trying to display payment form because of variables partner_id/acquirer_id missing.
- Accepted credit cards are now display next to the acquirer name on the payment form
2017-08-29 17:13:58 +02:00
tbe-odoo 5882cacb90 [FIX] payment: Some input were not set
- e-commerce and website_quote create a transaction with its reference when the user click on Pay.
So we need to render the inputs when the user click on pay and submit the form with the values
2017-08-29 17:13:15 +02:00
tbe-odoo 194d52e8fd [IMP] website_quote/sale,payment: Support of the new payment form
- Online quotation and e-commerce now use the new payment form.
- Added the ability to chose on an acquirer if it uses only form/s2s or both.
(Still need some code cleaning)
2017-08-29 17:11:23 +02:00
tbe-odoo 3c062d9345 [IMP] website_sale: Added S2S payment with new payment form
- Added the support of form payment.
- Fixed payment form's errors not being displayed.
- Fixed a crash when paying on e-commerce with a saved token.
(dev commit, need to clean the code)
2017-08-29 17:11:23 +02:00
tbe-odoo 80edbe5dff [ADD] payment: Added data for payment options
- Added the most used payment option (credit cards) in the world and assigned which payment acquirers can use them.
- Added the form templates for each payment acquirer.
2017-08-29 17:11:23 +02:00