Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
bfda65d8
Commit
bfda65d8
authored
6 years ago
by
Christophe Simonis
Browse files
Options
Downloads
Plain Diff
[MERGE] forward port branch 9.0 up to
612fd33f
parents
c60b2233
612fd33f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
addons/l10n_fr_fec/wizard/account_fr_fec.py
+3
-1
3 additions, 1 deletion
addons/l10n_fr_fec/wizard/account_fr_fec.py
odoo/http.py
+1
-0
1 addition, 0 deletions
odoo/http.py
odoo/service/server.py
+7
-9
7 additions, 9 deletions
odoo/service/server.py
with
11 additions
and
10 deletions
addons/l10n_fr_fec/wizard/account_fr_fec.py
+
3
−
1
View file @
bfda65d8
...
...
@@ -289,7 +289,9 @@ class AccountFrFec(models.TransientModel):
END
AS PieceRef,
TO_CHAR(am.date,
'
YYYYMMDD
'
) AS PieceDate,
CASE WHEN aml.name IS NULL THEN
'
/
'
ELSE replace(aml.name,
'
|
'
,
'
/
'
) END AS EcritureLib,
CASE WHEN aml.name IS NULL THEN
'
/
'
WHEN aml.name SIMILAR TO
'
[
\t
|\s|
\n
]*
'
THEN
'
/
'
ELSE replace(aml.name,
'
|
'
,
'
/
'
) END AS EcritureLib,
replace(CASE WHEN aml.debit = 0 THEN
'
0,00
'
ELSE to_char(aml.debit,
'
000000000000000D99
'
) END,
'
.
'
,
'
,
'
) AS Debit,
replace(CASE WHEN aml.credit = 0 THEN
'
0,00
'
ELSE to_char(aml.credit,
'
000000000000000D99
'
) END,
'
.
'
,
'
,
'
) AS Credit,
CASE WHEN rec.name IS NULL THEN
''
ELSE rec.name END AS EcritureLet,
...
...
This diff is collapsed.
Click to expand it.
odoo/http.py
+
1
−
0
View file @
bfda65d8
...
...
@@ -163,6 +163,7 @@ def redirect_with_hash(url, code=303):
# See extensive test page at http://greenbytes.de/tech/tc/httpredirects/
if
request
.
httprequest
.
user_agent
.
browser
in
(
'
firefox
'
,):
return
werkzeug
.
utils
.
redirect
(
url
,
code
)
url
=
url
.
strip
()
if
urlparse
.
urlparse
(
url
,
scheme
=
'
http
'
).
scheme
not
in
(
'
http
'
,
'
https
'
):
url
=
'
http://
'
+
url
url
=
url
.
replace
(
"'"
,
"
%27
"
).
replace
(
"
<
"
,
"
%3C
"
)
...
...
This diff is collapsed.
Click to expand it.
odoo/service/server.py
+
7
−
9
View file @
bfda65d8
...
...
@@ -91,9 +91,6 @@ class RequestHandler(werkzeug.serving.WSGIRequestHandler):
me
=
threading
.
currentThread
()
me
.
name
=
'
odoo.service.http.request.%s
'
%
(
me
.
ident
,)
# _reexec() should set LISTEN_* to avoid connection refused during reload time. It
# should also work with systemd socket activation. This is currently untested
# and not yet used.
class
ThreadedWSGIServerReloadable
(
LoggingBaseWSGIServerMixIn
,
werkzeug
.
serving
.
ThreadedWSGIServer
):
"""
werkzeug Threaded WSGI Server patched to allow reusing a listen socket
...
...
@@ -105,14 +102,15 @@ class ThreadedWSGIServerReloadable(LoggingBaseWSGIServerMixIn, werkzeug.serving.
handler
=
RequestHandler
)
def
server_bind
(
self
):
envfd
=
os
.
environ
.
get
(
'
LISTEN_FDS
'
)
if
envfd
and
os
.
environ
.
get
(
'
LISTEN_PID
'
)
==
str
(
os
.
getpid
()):
SD_LISTEN_FDS_START
=
3
if
os
.
environ
.
get
(
'
LISTEN_FDS
'
)
==
'
1
'
and
os
.
environ
.
get
(
'
LISTEN_PID
'
)
==
str
(
os
.
getpid
()):
self
.
reload_socket
=
True
self
.
socket
=
socket
.
fromfd
(
int
(
envfd
)
,
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
# should we os.close(int(envfd)) ? it seem python duplicate the fd.
self
.
socket
=
socket
.
fromfd
(
SD_LISTEN_FDS_START
,
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
_logger
.
info
(
'
HTTP service (werkzeug) running through socket activation
'
)
else
:
self
.
reload_socket
=
False
super
(
ThreadedWSGIServerReloadable
,
self
).
server_bind
()
_logger
.
info
(
'
HTTP service (werkzeug) running on %s:%s
'
,
self
.
server_name
,
self
.
server_port
)
def
server_activate
(
self
):
if
not
self
.
reload_socket
:
...
...
@@ -251,7 +249,6 @@ class ThreadedServer(CommonServer):
t
=
threading
.
Thread
(
target
=
self
.
http_thread
,
name
=
"
odoo.service.httpd
"
)
t
.
setDaemon
(
True
)
t
.
start
()
_logger
.
info
(
'
HTTP service (werkzeug) running on %s:%s
'
,
self
.
interface
,
self
.
port
)
def
start
(
self
,
stop
=
False
):
_logger
.
debug
(
"
Setting signal handlers
"
)
...
...
@@ -867,7 +864,8 @@ def _reexec(updated_modules=None):
args
+=
[
"
-u
"
,
'
,
'
.
join
(
updated_modules
)]
if
not
args
or
args
[
0
]
!=
exe
:
args
.
insert
(
0
,
exe
)
os
.
execv
(
sys
.
executable
,
args
)
# We should keep the LISTEN_* environment variabled in order to support socket activation on reexec
os
.
execve
(
sys
.
executable
,
args
,
os
.
environ
)
def
load_test_file_yml
(
registry
,
test_file
):
with
registry
.
cursor
()
as
cr
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment