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
7c540bc4
Commit
7c540bc4
authored
10 years ago
by
Xavier Morel
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] exception rendering with pretty printed XML
had not been migrated to lxml
parent
8472ee9f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
addons/website/views/website_templates.xml
+1
-1
1 addition, 1 deletion
addons/website/views/website_templates.xml
openerp/addons/base/ir/ir_qweb.py
+4
-0
4 additions, 0 deletions
openerp/addons/base/ir/ir_qweb.py
with
5 additions
and
1 deletion
addons/website/views/website_templates.xml
+
1
−
1
View file @
7c540bc4
...
@@ -507,7 +507,7 @@
...
@@ -507,7 +507,7 @@
<t
t-if=
"'expression' in qweb_exception.qweb"
>
and evaluating the following expression:
<code
t-esc=
"qweb_exception.qweb['expression']"
/></t>
<t
t-if=
"'expression' in qweb_exception.qweb"
>
and evaluating the following expression:
<code
t-esc=
"qweb_exception.qweb['expression']"
/></t>
</p>
</p>
<t
t-if=
"'node' in qweb_exception.qweb"
>
<t
t-if=
"'node' in qweb_exception.qweb"
>
<pre
id=
"exception_node"
t-esc=
"qweb_exception.
qweb['node'].to
xml()"
/>
<pre
id=
"exception_node"
t-esc=
"qweb_exception.
pretty_
xml()"
/>
</t>
</t>
</div>
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
openerp/addons/base/ir/ir_qweb.py
+
4
−
0
View file @
7c540bc4
...
@@ -40,6 +40,10 @@ class QWebException(Exception):
...
@@ -40,6 +40,10 @@ class QWebException(Exception):
def
__init__
(
self
,
message
,
**
kw
):
def
__init__
(
self
,
message
,
**
kw
):
Exception
.
__init__
(
self
,
message
)
Exception
.
__init__
(
self
,
message
)
self
.
qweb
=
dict
(
kw
)
self
.
qweb
=
dict
(
kw
)
def
pretty_xml
(
self
):
if
'
node
'
not
in
self
.
qweb
:
return
''
return
etree
.
tostring
(
self
.
qweb
[
'
node
'
],
pretty_print
=
True
)
class
QWebTemplateNotFound
(
QWebException
):
class
QWebTemplateNotFound
(
QWebException
):
pass
pass
...
...
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