Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][MIG] payment_redsys: Migration to version 15.0 #2968

Merged
merged 39 commits into from
Apr 1, 2023

Conversation

sergio-teruel
Copy link
Contributor

@sergio-teruel sergio-teruel commented Apr 1, 2023

cc @Tecnativa

ping @chienandalu @CarlosRoca13 @luisplanes

superseded #2149 and last changes

@luisplanes Te he añadido como autor y contrubuidor por los cambios de tu PR. Gracias.

@pedrobaeza
Copy link
Member

/ocabot migration payment_redsys

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Apr 1, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request Apr 1, 2023
48 tasks
@OCA-git-bot
Copy link
Contributor

The migration issue (#1866) has been updated to reference the current pull request.
however, a previous pull request was referenced : #2149.
Perhaps you should check that there is no duplicate work.
CC : @luisplanes

sergio-teruel and others added 25 commits April 1, 2023 11:28
* Corregido error en caso de que refence no este
  informado, al renderizar la plantilla del boton de pago.
* Corregido error que no permite pagar por transferencia al instalar
  el modulo payment_redsys
* Añadidas descripciones de los productos de la cesta a la clave 'DS_Merchant_ProductDescription'.
* Make quotation sending optional
  when a transaction ends without error website_sale module already sends an e-mail with the confirmed order, so it May not be necessary to send another e-mail with the same order unconfirmed.
* Add more Redsys frontend languages
* Remove options tab
* Send quotation e-mail invoking force_quotation_send() instead of action_quotation_send() + send_mail()

  * The function send_mail() does not respect the context language so the email is always sent in English.
  * It's not necessary to create the function send_mail() to sent an email when exists the method force_quotation_send().

* Add detailed error info
…r payment + Default values for urk_KO and url_OK + option to print print sale report. Delete url_ok and url_ko fields + Redondeo de merchant_amount
The discount is shown on the order summary if the current user is a member of sale.group_discount_per_so_line group

OCA Transbot updated translations from Transifex

OCA Transbot updated translations from Transifex

OCA Transbot updated translations from Transifex
[IMP] payment_redsys: Allow partial payment by percent
Includes to allow show order for unauthenticated users
When we have an order sequence of length six (SO123456), the signature process fails with the following message:

Server Error:
We are not able to redirect you to the payment form. 'str' object has no attribute 'decode'
Currently translated at 71.6% (48 of 67 strings)

Translation: l10n-spain-12.0/l10n-spain-12.0-payment_redsys
Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-12-0/l10n-spain-12-0-payment_redsys/es/

Translated using Weblate (Spanish)

Currently translated at 100.0% (67 of 67 strings)

Translation: l10n-spain-12.0/l10n-spain-12.0-payment_redsys
Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-12-0/l10n-spain-12-0-payment_redsys/es/

Translated using Weblate (Spanish)

Currently translated at 100.0% (67 of 67 strings)

Translation: l10n-spain-12.0/l10n-spain-12.0-payment_redsys
Translate-URL: https://translation.odoo-community.org/projects/l10n-spain-12-0/l10n-spain-12-0-payment_redsys/es/
pedrobaeza and others added 6 commits April 1, 2023 11:31
- JSON request: For a JSON request there's no website attribute. This is
  the case for payment links. We try to fallback to context if it has the
  `website_id` in it. Otherwise, `web.base.url` will be our last resource
  as usual.

  TT34154

- wrong reference

  TT34312
pycrypto is unmaintained since several ago, and in fact pycryptodome was
the library being used in previous version. The API we are using is
compatible between both libraries though.

There's no problem for already deployed systems, as the check on the
external dependencies is only done at install.

We took the occasion to remove the try mechanism that is not needed now,
although the linter emits a warning.
We're sending the string template without parameters to the method
_set_transcation_error() so no info is shown.

TT41589
@pedrobaeza pedrobaeza force-pushed the 15.0-mig-payment_redsys branch from 1f2f27f to e31ff41 Compare April 1, 2023 09:33
@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 15.0-ocabot-merge-pr-2968-by-pedrobaeza-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Apr 1, 2023
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 15.0-ocabot-merge-pr-2968-by-pedrobaeza-bump-nobump.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 15.0-ocabot-merge-pr-2968-by-pedrobaeza-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Apr 1, 2023
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 15.0-ocabot-merge-pr-2968-by-pedrobaeza-bump-nobump.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 15.0-ocabot-merge-pr-2968-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit f252bc0 into OCA:15.0 Apr 1, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 3cca688. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 15.0-mig-payment_redsys branch April 1, 2023 11:17
@Ranamiu
Copy link

Ranamiu commented Apr 3, 2023

Thanks @sergio-teruel @OCA-git-bot @pedrobaeza

Having a issue, cannot install on latest 15 - Odoo 15.0-20230331 (Versión Community).

Please, might you try installing, please, on your side ?

Appreciate

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 643, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 301, in _handle_exception
    raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /usr/lib/python3/dist-packages/odoo/.local/share/Odoo/addons/15.0/payment_redsys/data/payment_redsys.xml:38, somewhere inside
<record id="payment_method_redsys" model="account.payment.method">
        <field name="name">Redsys</field>
        <field name="code">redsys</field>
        <field name="payment_type">inbound</field>
    </record>

@pedrobaeza
Copy link
Member

The log entry is ripped and the significant part is missing, but anyway, that seems something on your side, as the module installs in a fresh DB like the runboat.

@Ranamiu
Copy link

Ranamiu commented Apr 3, 2023

Yes, you are 100% right.

Apologies.

Tried on a fresh DB and instalaltion OK.

Me, should have read carefully the detailed error log.

Our fault: we are on running database and probably issue is due to an older module previously installed:

psycopg2.IntegrityError: duplicate key value violates unique constraint "account_payment_method_name_code_unique"
DETAIL:  Key (code, payment_type)=(redsys, inbound) already exists.

Again, apologies !!

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.