QRCode
v2.101.0
The QRCode widget is used to display QR codes from text or numeric values. It can be used with fields of type char, text, integer, or many2one.
<field name="code" widget="qrcode" />Widget props
You can customize the appearance of the QR code using the widget_props attribute:
Width
Control the size of the QR code:
<field name="code" widget="qrcode" widget_props="{'width': 300}" />Border
Control whether to show a border around the QR code:
<field name="code" widget="qrcode" widget_props="{'border': false}" />Show value
Display the value below the QR code:
<field name="code" widget="qrcode" widget_props="{'showValue': true}" />https://gisce.net
Many2one fields
When used with many2one fields, the QR code will encode the ID of the related record, and if showValue is enabled, it will display the name of the record:
<field name="partner_id" widget="qrcode" widget_props="{'showValue': true}" />Partner Name
API
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
name | Name of the field to get the value for the QR code | string | - | - |
widget_props | Extra properties for the widget | object | - | - |
Widget props
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
width | Size of the QR code in pixels | number | 200 | - |
border | Show border around the QR code | boolean | true | - |
showValue | Display the encoded value below the QR code | boolean | false | - |