Commit Graph
13 Commits
Author SHA1 Message Date
Demesmaeker e0233a1010 [IMP] payment(_adyen): allow to refund confirmed transactions
Before this commit, it was not possible to refund a payment from Odoo.
Users had to go through the payment acquirer's backend and update the
payment accordingly in Odoo.

With this commit, refunds are made available in Odoo directly from the
payment form, for acquirers that support them. Acquirer can either only
support full refunds or also support partial refunds.

As of now, the only acquirer allowing refunds is Adyen, with partial
refund support.

task-2527891

closes odoo/odoo#70881

Related: odoo/upgrade#2689
Related: odoo/enterprise#19829
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-08-23 10:54:17 +00:00
Nicolas (vin) f7b45aa032 [FIX] payment: suitable payment token and acquirer fix
Fix two issues:

The search of suitable payment token was searching on the journal_id
field of the payment acquirer that is no longer stored.
Change it to now search on the acquirer_id directly, since we have
this information.

The _inverse_journal_id method on payment acquirers would create
new payment line with the manual payment method when no provider
are given to an acquirer, or no payment method is existing for
a given provider. This would cause issues with the creation of
multiple line with the same name on a same journal, which would
trigger the constrains blocking that.

closes odoo/odoo#74990

X-original-commit: a3a2fcb0b299fafbf359ec9015da5c85cdb57b3a
Related: odoo/enterprise#20193
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-08-12 07:56:16 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Demesmaeker 9612ede9ca [IMP] sale, payment: improve the UI
Small UI improvements for clarity/continuity:
1. In the "Sales' onboarding wizard > payment configuration >
documentatlion link", font roboto is now used.
2. In the sales order, the error message when 'there is nothing
to invoice' now also explains also what the user has to do to invoice
"Prepaid" services.
3. In the "Payment confirmation" section of the payment portal,
'Reference', 'From' & 'Amount' fields don't look like editable
fields anymore.
4. In the payment forms, tokens created with the Test acquirer
are now identified with a "Test Token" badge in place of the
verified token checkmark.

task-2505913

closes odoo/odoo#70076

Related: odoo/enterprise#18036
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-07-14 09:34:43 +00:00
Nicolas (vin) 04522f01e6 [IMP] account: allows multiple payment acquirers on a journal.
Users may want to be able to have transactions coming from multiple
payment acquirers to be registered in the same journal.

This will allows that.

Task id #2414749

closes odoo/odoo#67331

Related: odoo/upgrade#2500
Related: odoo/enterprise#17258
Signed-off-by: William André (wan) <wan@odoo.com>
2021-06-03 10:00:26 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02:00
Arnaud JosetandAntoine Vandevenne 71c5278d9a [REF] payment_test: migrate the Test acquirer to the new payment API
See the merge commit for more details.

task-2333042

Co-authored-by: Antoine Vandevenne <anv@odoo.com>
2021-03-30 09:25:51 +02:00
Arnaud Joset 36efe37064 [FIX] payment_test: payment creation with multiple names defined
The payment token name was fixed in two parallel PR that were merged the same day without conflict:

https://github.com/odoo/odoo/pull/61844 and https://github.com/odoo/odoo/pull/61888

This commit cleans up the dict of token creation.

closes odoo/odoo#65416

Taskid: 2409461
X-original-commit: 291b656e702498fe46e63dbdad84442615298b51
Related: odoo/enterprise#16086
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-02-02 13:51:19 +00:00
Arnaud Joset 1196605882 [FIX] payment_test: fix token name.
This commit fixes two bugs with payment_test:

First:
Before, payment test would create token without a name.

When you tried to pay your subscription on the portal with these, the following error would occurs:

```
Error to render compiling AST
AttributeError: 'bool' object has no attribute 'replace'
Template: sale_subscription.subscription
Path: /t/t[2]/div/t/t[2]/ul/li[1]/div[3]/t
Node: <t t-esc="account.payment_token_id.short_name"/>

The error occured while rendering the template sale_subscription.subscription and evaluating the following expression: <t t-esc="account.payment_token_id.short_name"/>
```

This commit add a distinct name for these token to avoid errors and confusion.

Secondly,

Before this commit when user tried to make a payment with the payment_test acquirer, the callback method was never called.
This had an impact on module where the callback method is used (mostly subscription).

closes odoo/odoo#61888

Taskid: 2367508
X-original-commit: a0e012f1578b6257816dfb1a508781d054b95198
Related: odoo/enterprise#14814
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-17 17:57:34 +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
Adrian Torres 1daf8eb127 [FIX] *: set ondelete policy of required Selection fields
With this commit, Selection fields with `required=True` which are
extended via `selection_add` are given proper ondelete policies to
ensure the cleanup of records containing these extended options during
uninstall of the extending module.

This commit also cleans up leftover uninstall hooks that were being used
to handle the same set of problems prior to the ondelete mechanism being
implemented for Selection fields.

closes odoo/odoo#46325

Related: odoo/enterprise#9117
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-30 13:42:04 +00:00
Damien Bouvy d69ded69cc [FIX] payment_test: allow to disable it
closes odoo/odoo#37621

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-30 15:11:18 +00:00
Aurélien Warnon e7c4761464 [ADD] payment_test: add a payment acquirer to be used for testing only
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

This new module implements a simple test payment acquirer in order to allow
testing successful payments behaviors, notably on eCommerce. Its usage is
prevented in other state then test to avoid any potential misuse.

LINKS

Task ID 1937768
2019-08-28 13:27:59 +00:00