[ADD] Allows applying patches to installed modules
This commit is contained in:
parent
832f30a586
commit
aa1815438b
@ -71,3 +71,9 @@ git pull --recurse-submodules
|
||||
sudo ./install_all.sh
|
||||
```
|
||||
|
||||
### To apply patches to installed modules:
|
||||
|
||||
```sh
|
||||
sudo ./apply_patches.sh
|
||||
```
|
||||
|
||||
|
||||
21
apply_patches.sh
Executable file
21
apply_patches.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Installs selected content from the downloaded repos into a production folder
|
||||
#
|
||||
|
||||
if [ $UID != 0 ]; then
|
||||
echo "You need administration privileges to run this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DESTDIR=/opt/odoo
|
||||
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo " Patch OCA modules"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
|
||||
DEST=$DESTDIR/community/auth_oauth_multi_token/
|
||||
OPTIONS="--directory=$DEST --strip=1"
|
||||
|
||||
patch $OPTIONS < patches/20210420_auth-oauth-multi-token_error-in-login.patch
|
||||
|
||||
17
patches/20210420_auth-oauth-multi-token_error-in-login.patch
Normal file
17
patches/20210420_auth-oauth-multi-token_error-in-login.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff -rupN auth_oauth_multi_token/models/res_users.py auth_oauth_multi_token.patch/models/res_users.py
|
||||
--- auth_oauth_multi_token/models/res_users.py 2021-04-15 03:35:47.362795561 +0000
|
||||
+++ auth_oauth_multi_token.patch/models/res_users.py 2021-04-20 22:54:51.992899568 +0000
|
||||
@@ -69,10 +69,10 @@ class ResUsers(models.Model):
|
||||
res.oauth_master_uuid = self._generate_oauth_master_uuid()
|
||||
|
||||
@api.model
|
||||
- def _check_credentials(self, password):
|
||||
+ def _check_credentials(self, password, env):
|
||||
"""Override to check credentials against multi tokens."""
|
||||
try:
|
||||
- return super()._check_credentials(password)
|
||||
+ return super()._check_credentials(password, env)
|
||||
except exceptions.AccessDenied:
|
||||
res = self.multi_token_model.sudo().search(
|
||||
[
|
||||
|
||||
Loading…
Reference in New Issue
Block a user