Commit ce45622
committed
[FIX] website_sale: product mail action redirect to shop page
Issue:
Mail action redirects only to shop page, even though the user has
internal access to the product page.
To reproduce:
1- Create a db with website_sale installed.
2- Create a product and publish it.
3- In the product page chatter, send a message to an internal user
4- In received email, click on 'View Product' button
5- As you see the shop page opens
This is reproduced after odoo#202555
Inside `_get_access_action`, if the product is published, we are
returning `website_url`. We can add a check to do that only if
user is portal or public.
opw-5155281
closes odoo#233217
X-original-commit: c0f784f
Signed-off-by: Valeriya Chuprina (vchu) <vchu@odoo.com>
Signed-off-by: Mohammadmahdi Alijani (malj) <malj@odoo.com>1 parent 620b857 commit ce45622
File tree
2 files changed
+31
-3
lines changed- addons/website_sale
- models
- tests
2 files changed
+31
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
1070 | | - | |
| 1070 | + | |
1071 | 1071 | | |
1072 | 1072 | | |
1073 | 1073 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
55 | 83 | | |
56 | 84 | | |
57 | 85 | | |
| |||
0 commit comments