Skip to content
Snippets Groups Projects
user avatar
nie authored
Steps:
- Install sales,payment
- Go to Sales
- Create a quotation
- Click Actions > Generate a Payment Link
- Browse the link in a private window
- Pay

Bug:
The transaction is not linked to the sale order in the link table
`sale_order_transaction_rel`

Explanation:
When not connected, the user doesn't have the rights to read the order.
This leads `order_id` to be set to `None`:
https://github.com/odoo/odoo/blob/d2f3c9e7975188753fa17c06db3fc5c73c773944/addons/payment/controllers/portal.py#L177-L178
When paying without `order_id`, the app is not able to make a link
with the transactions:
https://github.com/odoo/odoo/blob/d2f3c9e7975188753fa17c06db3fc5c73c773944/addons/payment/controllers/portal.py#L276-L277
This raises problems such as not being able to capture an amount as seen
here:
https://github.com/odoo/odoo/blob/d2f3c9e7975188753fa17c06db3fc5c73c773944/addons/sale/views/sale_views.xml#L254-L257



If we ensure a `partner_id` is present, using `sudo` here shouldn't be a
problem as the data is protected by the token. Everything we get from
`order_id` should already be in the URL.

opw:2451564

closes odoo/odoo#66565

Signed-off-by: default avatarbackspac <backspac@users.noreply.github.com>
f1f73fd2
History
Name Last commit Last update