[NEW] Reverts change that disabled View buttons in email
This commit is contained in:
parent
c1db3f82d7
commit
9afa35f1fb
@ -27,17 +27,14 @@ pt_core ()
|
|||||||
echo " Patch core Odoo modules"
|
echo " Patch core Odoo modules"
|
||||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||||
|
|
||||||
DEST=$DESTDIR/core/addons/auth_oauth/
|
|
||||||
OPTIONS="--directory=$DEST --strip=1"
|
|
||||||
|
|
||||||
patch $OPTIONS < patches/20210603_auth-oauth_redirect-to-root.patch
|
|
||||||
|
|
||||||
SRC=$PWD
|
SRC=$PWD
|
||||||
DEST=$DESTDIR/core/
|
DEST=$DESTDIR/core/
|
||||||
OPTIONS="-p1 --verbose"
|
OPTIONS="-p1 --verbose"
|
||||||
|
|
||||||
pushd $DEST
|
pushd $DEST
|
||||||
|
git apply $OPTIONS $SRC/patches/20210603_auth-oauth_redirects-to-root.patch
|
||||||
git apply $OPTIONS $SRC/patches/20220131_purchase-requisition_match-variant.patch
|
git apply $OPTIONS $SRC/patches/20220131_purchase-requisition_match-variant.patch
|
||||||
|
git apply $OPTIONS $SRC/patches/20220204_mail_re-enables-buttons-in-notifications.patch
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
13
patches/20210603_auth-oauth_redirects-to-root.patch
Normal file
13
patches/20210603_auth-oauth_redirects-to-root.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py
|
||||||
|
index 3d1a6b53..dd8006c6 100644
|
||||||
|
--- a/addons/auth_oauth/controllers/main.py
|
||||||
|
+++ b/addons/auth_oauth/controllers/main.py
|
||||||
|
@@ -70,7 +70,7 @@ class OAuthLogin(Home):
|
||||||
|
return providers
|
||||||
|
|
||||||
|
def get_state(self, provider):
|
||||||
|
- redirect = request.params.get('redirect') or 'web'
|
||||||
|
+ redirect = request.params.get('redirect') or '/'
|
||||||
|
if not redirect.startswith(('//', 'http://', 'https://')):
|
||||||
|
redirect = '%s%s' % (request.httprequest.url_root, redirect[1:] if redirect[0] == '/' else redirect)
|
||||||
|
state = dict(
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py
|
||||||
|
index 3be59000..dde6a1da 100644
|
||||||
|
--- a/addons/mail/models/mail_thread.py
|
||||||
|
+++ b/addons/mail/models/mail_thread.py
|
||||||
|
@@ -2611,11 +2611,7 @@ class MailThread(models.AbstractModel):
|
||||||
|
for group_name, group_func, group_data in groups:
|
||||||
|
group_data.setdefault('notification_group_name', group_name)
|
||||||
|
group_data.setdefault('notification_is_customer', False)
|
||||||
|
- is_thread_notification = msg_vals and (
|
||||||
|
- msg_vals.get('model', self._name) != 'mail.thread' and
|
||||||
|
- (msg_vals.get('res_id', self.ids[0] if self.ids else False) is not False)
|
||||||
|
- )
|
||||||
|
- group_data.setdefault('has_button_access', is_thread_notification)
|
||||||
|
+ group_data.setdefault('has_button_access', True)
|
||||||
|
group_button_access = group_data.setdefault('button_access', {})
|
||||||
|
group_button_access.setdefault('url', access_link)
|
||||||
|
group_button_access.setdefault('title', view_title)
|
||||||
Loading…
Reference in New Issue
Block a user