Replace the use of 't-esc' with 't-field' for the payment icon image in
the icons list template. The latter, for an image field, provides two
options for rendering the payment icon image: use the PIL library to
obtain the image when given the option 'qweb_img_raw_data', or use a
URL. The former only considers the first option, allowing only image
formats compatible with the PIL library.
closesodoo/odoo#159586
X-original-commit: bc76cca37504b40eac73190363c452f89dca65ed
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
The following combinations of payment methods and providers are removed:
- Amazon Pay - Adyen: The payment method cannot be activated because it
requires saving a public key in Odoo, and no field was made available
for that. Also, a custom configuration is necessary and the public key
must be generated through a lengthy process that is too cumbersome for
the added value of the payment method anyway.
- BLIK - Stripe: The payment method is not supported by Stripe when the
PaymentIntent object is created after collecting the payment details.
See https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment#enable-payment-methods
opw-3736511
closesodoo/odoo#153481
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
If payment_custom or payment_demo is installed 'Secured by' element is
overriden and becomes hidden for all payment providers.
We removed xpath as it is more convenient for the users to see which
provider is behind a payment method. After this commit 'Secured by'
element is shown for all providers except for custom.
closesodoo/odoo#155014
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Description:
In a multi-company environment, `payment.provider` records are specific to each company. After activating Stripe on Company 1,
you can set a Website for the record if you wish. If you wish to activate Stripe for Company 2, Odoo will use `.copy()`
to create a new `payment.provider` record for Company 2. However, this will lead to differing incorrect behavior depending
on the version.
On 16, a new `payment.provider` record will be created, but will be connected to the Website set on Company 1's provider.
On 17, Odoo will throw an error after a `check_company` call reveals that the Website set on the new record is for the
wrong company, preventing the record from being created.
In both cases, the `.copy()` grabs the optional Website set on the existing `payment.provider` record to be used incorrectly
for the new record.
Desired behavior after PR is merged:
The Website relation is always neutralized when Odoo creates a new Stripe `payment.provider` record using the `.copy()` method
opw-3683338
closesodoo/odoo#154521
X-original-commit: 76cf4221b332c924c243e19f911131431c041bc6
Signed-off-by: Joel Bluemel (jobl) <jobl@odoo.com>
When a payment method was updated in a way that prevented creating
tokens with it, that is, by either disabling it, unchecking the
"Tokenization Supported" field, or unlinking it from providers, only the
latter would automatically archive the related tokens after showing a
warning to the user. The two first actions prevented the creation of
future tokens with that payment method, but existing tokens could still
be used.
This commit fixes that behavior by adding the warning and the automatic
archiving of related tokens where they were missing. Preventing further
tokenization with a payment method now consistently blocks payments
through existing tokens, too.
closesodoo/odoo#150120
Related: odoo/enterprise#54700
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
The keyword arguments of the callees were never forwarded to the
`payment.method::_get_compatible_payment_methods` method, preventing
overriding modules from controlling which payment method should be
available depending on the kwargs.
task-3640488
Part-of: odoo/odoo#150120
Since fd2fb212c5, the
sepa provider (enterprise module) behaves as a custom
provider but despite some adaptations, the removal
of providers on module uninstall was not properly
adapted.
The uninstall of the sepa provider failed as its
inline template was not unlinked from the provider
before the template deletion.
This commit makes sure that custom providers are
correctly considered in the uninstall util supposed
to restore a provider to its state before the
installation of its module.
opw-3734697
opw-3721846
closesodoo/odoo#153843
X-original-commit: e70dbbae56472b124a59c38a1fbfeea23c8ec28b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
For a first iteration, Russian translations were done using DeepL using
1 large .pot file of all the standard modules to translate (e.g. no
localizations, no test modules, etc). Unfortunately for some reason
doing a msgmerge with the existing ru.po files didn't seem to work, so
old "Translators" metadata at top of files were lost (maybe they will be
re-added during next Transifex sync?)
Part-of: odoo/odoo#152285
Some logic of the `payment.provider` and `provider.method` models was
not properly covered by unit tests.
closesodoo/odoo#149833
Related: odoo/enterprise#54930
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
When browsing a payment provider's payment methods, the "New" button was
disabled because the action did not allow Kanban views.
closesodoo/odoo#148865
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
When the payment provider was disabled, the "Enabled Payment Buttons"
was shown, although it was not possible to enable them yet. The button
is now hidden until the provider's state is set to either 'enabled' or
'test'.
Part-of: odoo/odoo#148865
When `test_display_name_for_empty_payment_details` was tested around
midnight, the test would fail because it compares the current date with
the token's create date, which would be the day before.
closesodoo/odoo#148781
X-original-commit: 87f94715a09b7681bcd92d1cba4f84d30918c502
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Sepa Direct Debit is deleted from Mollie data as it seems
to not support one time transactions and currently Odoo
doesn't support tokenization in Mollie.
closesodoo/odoo#145166
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Before this commit, the payment button was part of the checkout/manage
form widgets, which caused conflicts when other modules needed to
enable/disable the button depending on custom conditions.
After this commit, the payment button logic is extracted in a separate
widget that handles its enabling after checking if all conditions are
satisfied. Other modules can extend the widget and override
`isButtonReady` to add custom logic.
task-3568861
closesodoo/odoo#142265
X-original-commit: 496c22f67b840a72758640576546ba16b177aafc
Related: odoo/enterprise#50783
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Before this commit, an internal server error was shown when customers
tried to tokenize Boleto.
opw-3572673
closesodoo/odoo#142514
X-original-commit: fe9f937ce4f9bde327a7ea4f53346e2014908287
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
Payment acquirers don't have an `active` field, which makes users
confused when they try to delete an acquirer, and the error message
suggests archiving it instead.
opw-3579946
closesodoo/odoo#142000
X-original-commit: 69166117073f1bf255b62b81eaa744f81353f6b4
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
As of https://github.com/odoo/odoo/pull/114024, `display_name` is
implicit in every form view (see the use of addFieldDependencies in the
Form controller). Therefore, when you create a new record for this
model, it calls the first `onchange`, which will compute display_name
for a new record (id without origin). Some `_compute_display_name` don't
handle new records correctly and raise a traceback. These models are
sometimes directly accessible:
- Accounting > Account Group > New => Traceback
- Contact > Contact Tags > New => Traceback
Other models are inaccessible by default (no view to access or create a
new record), but if someone creates a view for them with studio (or
modifies an existing one to allow creation):
- `crm.iap.lead.role`
- `crm.iap.lead.seniority`
- `chatbot.script.answer`
- `payment.token`
Change the code of `_compute_display_name` on these models to be more
defensive and avoid (potential) tracebacks. Similarly, change the
`convert_to_display_name` of `fields.Datetime` to take into account
`None` value.
closesodoo/odoo#139592
Related: odoo/enterprise#49721
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Prior to this commit, the content of the payment summary did not include
line breaks when the text was too long, creating layout issue.
To fix that, this commit adapts the font size and forces the text to
break.
task-3576830
closesodoo/odoo#140423
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
The express checkout form template could not be rendered when no payment
provider supporting express checkout was passed.
closesodoo/odoo#140415
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>