Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dwsproject
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dws
dwsproject
Commits
1f6dd5e8
Commit
1f6dd5e8
authored
Mar 21, 2025
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 玖姿功能
parent
8d522b8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
jzjx_project/models/inherit_ir_http.py
+3
-2
No files found.
jzjx_project/models/inherit_ir_http.py
View file @
1f6dd5e8
...
@@ -3,7 +3,7 @@ import hashlib
...
@@ -3,7 +3,7 @@ import hashlib
import
os
import
os
import
re
import
re
from
odoo
import
models
,
fields
,
api
,
_
from
odoo
import
models
,
fields
,
http
,
api
,
_
from
odoo.modules.module
import
get_resource_path
,
get_module_path
from
odoo.modules.module
import
get_resource_path
,
get_module_path
from
odoo.tools.mimetypes
import
guess_mimetype
from
odoo.tools.mimetypes
import
guess_mimetype
from
odoo.tools
import
consteq
,
pycompat
from
odoo.tools
import
consteq
,
pycompat
...
@@ -15,7 +15,8 @@ class InheritIrHttp(models.AbstractModel):
...
@@ -15,7 +15,8 @@ class InheritIrHttp(models.AbstractModel):
@classmethod
@classmethod
def
_binary_ir_attachment_redirect_content
(
cls
,
record
,
default_mimetype
=
'application/octet-stream'
):
def
_binary_ir_attachment_redirect_content
(
cls
,
record
,
default_mimetype
=
'application/octet-stream'
):
# mainly used for theme images attachemnts
# mainly used for theme images attachemnts
if
record
.
type
==
'url'
and
record
.
url
and
"http://121.37.69.162:9000"
in
record
.
url
:
base
=
http
.
request
.
env
[
'ir.config_parameter'
]
.
sudo
()
.
get_param
(
'web.base.url'
,
''
)
if
record
.
type
==
'url'
and
record
.
url
and
base
.
startswith
(
"https"
)
and
"http://121.37.69.162:9000"
in
record
.
url
:
filename
=
filehash
=
None
filename
=
filehash
=
None
mimetype
=
getattr
(
record
,
'mimetype'
,
False
)
mimetype
=
getattr
(
record
,
'mimetype'
,
False
)
url
=
record
.
url
.
replace
(
"http://121.37.69.162:9000"
,
"https://minio.xbg.rokeris.com"
)
url
=
record
.
url
.
replace
(
"http://121.37.69.162:9000"
,
"https://minio.xbg.rokeris.com"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment