diff --git a/apply_patches.sh b/apply_patches.sh index ed74978..03701f9 100755 --- a/apply_patches.sh +++ b/apply_patches.sh @@ -27,17 +27,14 @@ pt_core () echo " Patch core Odoo modules" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - DEST=$DESTDIR/core/addons/auth_oauth/ - OPTIONS="--directory=$DEST --strip=1" - - patch $OPTIONS < patches/20210603_auth-oauth_redirect-to-root.patch - SRC=$PWD DEST=$DESTDIR/core/ OPTIONS="-p1 --verbose" 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/20220204_mail_re-enables-buttons-in-notifications.patch popd } diff --git a/patches/20210603_auth-oauth_redirects-to-root.patch b/patches/20210603_auth-oauth_redirects-to-root.patch new file mode 100644 index 0000000..434d85e --- /dev/null +++ b/patches/20210603_auth-oauth_redirects-to-root.patch @@ -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( diff --git a/patches/20220204_mail_re-enables-buttons-in-notifications.patch b/patches/20220204_mail_re-enables-buttons-in-notifications.patch new file mode 100644 index 0000000..59bf90b --- /dev/null +++ b/patches/20220204_mail_re-enables-buttons-in-notifications.patch @@ -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)