Files
odoo_source/addons/payment_test
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
..
…