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
825848ba
Commit
825848ba
authored
11 years ago
by
Simon Lejeune
Browse files
Options
Downloads
Plain Diff
[MERGE] saas-4
bzr revid: sle@openerp.com-20140423160802-2kngtsa0zgkkegqx
parents
e3d7d2d7
156225f9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openerp/addons/base/ir/ir_ui_view.py
+12
-1
12 additions, 1 deletion
openerp/addons/base/ir/ir_ui_view.py
openerp/cli/server.py
+5
-2
5 additions, 2 deletions
openerp/cli/server.py
with
17 additions
and
3 deletions
openerp/addons/base/ir/ir_ui_view.py
+
12
−
1
View file @
825848ba
...
...
@@ -958,12 +958,23 @@ class view(osv.osv):
def
_validate_module_views
(
self
,
cr
,
uid
,
module
):
"""
Validate architecture of all the views of a given module
"""
assert
not
self
.
pool
.
_init
or
module
in
self
.
pool
.
_init_modules
xmlid_filter
=
''
params
=
(
module
,)
if
self
.
pool
.
_init
:
# only validate the views that are still existing...
xmlid_filter
=
"
AND md.name IN %s
"
names
=
tuple
(
name
for
(
xmod
,
name
),
(
model
,
res_id
)
in
self
.
pool
.
model_data_reference_ids
.
items
()
if
xmod
==
module
and
model
==
self
.
_name
)
if
not
names
:
# no views for this module, nothing to validate
return
params
+=
(
names
,)
cr
.
execute
(
"""
SELECT max(v.id)
FROM ir_ui_view v
LEFT JOIN ir_model_data md ON (md.model =
'
ir.ui.view
'
AND md.res_id = v.id)
WHERE md.module = %s
{0}
GROUP BY coalesce(v.inherit_id, v.id)
"""
,
(
module
,)
)
"""
.
format
(
xmlid_filter
),
params
)
for
vid
,
in
cr
.
fetchall
():
if
not
self
.
_check_xml
(
cr
,
uid
,
[
vid
]):
...
...
This diff is collapsed.
Click to expand it.
openerp/cli/server.py
+
5
−
2
View file @
825848ba
...
...
@@ -81,8 +81,11 @@ def report_configuration():
def
rm_pid_file
():
config
=
openerp
.
tools
.
config
if
not
openerp
.
evented
and
os
.
path
.
exists
(
config
[
'
pidfile
'
]):
os
.
unlink
(
config
[
'
pidfile
'
])
if
not
openerp
.
evented
and
config
[
'
pidfile
'
]:
try
:
os
.
unlink
(
config
[
'
pidfile
'
])
except
OSError
:
pass
def
setup_pid_file
():
"""
Create a file with the process id written in it.
...
...
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