summaryrefslogtreecommitdiff
path: root/addons/note/data/note_data.xml
diff options
context:
space:
mode:
authorNasreddin (bon) <bon@odoo.com>2021-04-12 18:53:58 +0000
committerNasreddin (bon) <bon@odoo.com>2021-04-14 15:26:06 +0000
commit9b45e7f5749dc86e9fa3c0b4ebc7de700774923a (patch)
tree0ed96811baa70956a8e378f575c060ea26edcb0d /addons/note/data/note_data.xml
parentc8c68a07199124091e8d49946a63fb8c705c2417 (diff)
[FIX] portal: display discounts on quotation pdf for portal user
Issue - Install "Sale" app - Acivate "Discounts" feature in settings - Create a quotation to a portal user (ex: Joel Willis) - Add a product with a discount then send - Logout then login as 'Joel Willis' - Go to 'My account' then 'Quotations' - Select the quotation just created and print it Discount not display in pdf file. Cause The current env.user when rendering pdf is the portal user. To display discount, current env.user must have group 'product.group_discount_per_so_line' who is not the case even when using sudo() on report template. Solution Since Odoo 13.0, the sudo() function does not return the superuser by default but instead the current user with a bypass on access rights. Therefore, must add `.with_user(SUPERUSER_ID)` on report. opw-2501337 closes odoo/odoo#69265 X-original-commit: 5dde19c92ecee8ac0238bb5c8e71263840534c28 Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Diffstat (limited to 'addons/note/data/note_data.xml')
0 files changed, 0 insertions, 0 deletions