Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Redner Odoo Module
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo modules
Redner Odoo Module
Merge requests
!87
redner: sprint 2
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
redner: sprint 2
topic/18.0/RED-549
into
branch/18.0
Overview
1
Commits
8
Pipelines
0
Changes
1
1 unresolved thread
Hide all comments
Open
Axel Prel
requested to merge
topic/18.0/RED-549
into
branch/18.0
2 weeks ago
Overview
1
Commits
8
Pipelines
0
Changes
1
1 unresolved thread
Hide all comments
Expand
see NEWS for more details
0
0
Merge request reports
Viewing commit
b9af52c7
Prev
Next
Show latest version
1 file
+
8
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
b9af52c7
add qr code converter in substitutions
· b9af52c7
Axel Prel
authored
2 weeks ago
models/redner_substitution.py
+
8
−
0
Options
@@ -30,6 +30,8 @@
MAIL_TEMPLATE_DESERIALIZE
=
"
mail_template+deserialize
"
IMAGE_FILE
=
"
image-file
"
IMAGE_DATAURL
=
"
image-data-url
"
QR_CODE_FILE
=
"
qr-code-file
"
QR_CODE_DATAURL
=
"
qr-code-data-url
"
RELATION_2MANY
=
"
relation-to-many
"
RELATION_PATH
=
"
relation-path
"
@@ -39,6 +41,8 @@
(
FIELD
,
"
Field
"
),
(
IMAGE_FILE
,
"
Image file
"
),
(
IMAGE_DATAURL
,
"
Image data url
"
),
(
QR_CODE_FILE
,
"
QR Code file
"
),
(
QR_CODE_DATAURL
,
"
QR Code data url
"
),
(
RELATION_2MANY
,
"
Relation to many
"
),
(
RELATION_PATH
,
"
Relation Path
"
),
(
CONSTANT
,
"
Constant value
"
),
@@ -165,6 +169,10 @@
conv
=
converter
.
relation
(
path
.
replace
(
"
.
"
,
"
/
"
),
conv
)
elif
sub
.
converter
==
IMAGE_DATAURL
:
conv
=
converter
.
ImageDataURL
(
sub
.
value
)
elif
sub
.
converter
==
QR_CODE_FILE
:
conv
=
converter
.
QRCodeFile
(
sub
.
value
)
elif
sub
.
converter
==
QR_CODE_DATAURL
:
conv
=
converter
.
QRCodeDataURL
(
sub
.
value
)
elif
sub
.
converter
==
RELATION_2MANY
:
# Unpack the result of finding a field with its sort order into
# variable names.
Loading