Module Ultimateqrcode EN: Difference between revisions

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
Tag: 2017 source edit
No edit summary
Tag: 2017 source edit
Line 3: Line 3:
     Links below are automatically managed by PolyglotBot
     Links below are automatically managed by PolyglotBot
     You can edit links on the English source page : Module_Ultimateqrcode_EN -->
     You can edit links on the English source page : Module_Ultimateqrcode_EN -->
[[en:Module_Ultimateqrcode_EN]]
[[fr:Module_Ultimateqrcode_FR]]
<!-- END interlang links -->
<!-- END interlang links -->


[[Category:Complementary_modules]]
[[Category:Complementary modules]]
[[Category:Ultimateqrcode]]
[[Category:Ultimateqrcode]]
{{TemplateDocDev}}
{{TemplateDocDev}}
{{TemplateDocUtil}}
{{TemplateDocUtil}}
=Informations=
=Information=
{{TemplateModuleInfo
{{TemplateModuleInfo
|modulename=Ultimateqrcode
|modulename=Ultimateqrcode
Line 18: Line 18:
|status=stable
|status=stable
|prerequisites=
|prerequisites=
|minversion=14.0.0
|minversion=17.0.0
|note=
|note=Compatible with Dolibarr v24
}}
}}


=Installation=
= Installation =


#Download the module and place it in the <code>htdocs/custom/ultimateqrcode/</code> directory
# Download the module and place it in the <code>htdocs/custom/ultimateqrcode/</code> directory
#In Dolibarr: go to '''Home → Setup → Modules/Applications'''
# From Dolibarr: '''Home → Setup → Modules/Applications'''
#Find '''UltimateQRcode''' in the ''Atoo-Net'' section and activate it
# Find the '''UltimateQRcode''' module in the ''Atoo-Net'' section and activate it
#Configure permissions per user group (see [[#Rights_and_permissions|Rights and permissions]])
# Permissions must be configured per user group (see [[#Rights_and_permissions|Rights and permissions]])


----
----


=Module Configuration=
= Module configuration =


Access configuration via '''Home → Setup → Modules/Applications → UltimateQRcode''' (wrench icon), or directly through the administration menu.
Access the configuration via '''Home → Setup → Modules/Applications → UltimateQRcode''' (wrench icon) or directly through the administration menu.


The configuration page has three tabs.
The configuration page has three tabs.


==Tab "QR codes" (free generator)==
== "QR codes" tab (free generator) ==


[[File:Ultimateqrcode-admin-qrcodes-fr.png|center|900px|Free QR code generator]]
[[File:Ultimateqrcode-admin-qrcodes-fr.png|center|900px|Free QR code generator]]


This tab provides an '''on-demand QR code generator''':
This tab provides a '''on-demand QR code generator''':


{| class="wikitable"
{| class="wikitable"
!Field!!Description
! Field !! Description
|-
|-
|'''Data'''||Content to encode: URL, email address, free text, vCard, etc.
| '''Data''' || The content to encode: URL, email address, free text, vCard, etc.
|-
|-
|'''ECC'''||Error correction level:<br />• '''L''' (≈7% — smallest): minimal size<br />• '''M''' (≈15%): standard use<br />• '''Q''' (≈25%): good resistance<br />• '''H''' (≈30% — best): highly resistant (recommended with logo)
| '''ECC''' || Error correction level:<br/>• '''L''' (≈7% — smallest): minimum size<br/>• '''M''' (≈15%): common usage<br/>• '''Q''' (≈25%): good resilience<br/>• '''H''' (≈30% — best): very resilient (recommended with logo)
|-
|-
|'''Size'''||Point size (1 to 10 pixels per QR module)
| '''Size''' || Dot size (from 1 to 10 pixels per QR module)
|-
|-
|'''GENERATE''' button||Instantly generates and displays the QR code
| '''GENERATE''' button || Generates and immediately displays the QR code
|}
|}


Click '''Like that''' in the help text to see a generation example.
Click on '''Like this''' in the help text to see a generation example.


==Tab "QR with logo"==
== "QR with logo" tab ==


[[File:Ultimateqrcode-admin-qrwithlogo-fr.png|center|900px|QR code generator with embedded logo]]
[[File:Ultimateqrcode-admin-qrwithlogo-fr.png|center|900px|QR generator with embedded logo]]


This tab generates a '''QR code with a logo inserted in the center''':
This tab allows generating a '''QR code with a logo embedded in the center''':


{| class="wikitable"
{| class="wikitable"
!Field!!Description
! Field !! Description
|-
|-
|'''Data'''||URL or content to encode (default: https://www.atoo-net.com/)
| '''Data''' || URL or content to encode (default: https://www.atoo-net.com/)
|-
|-
|'''Size'''||1 to 10 — controls the resolution of the generated image
| '''Size''' || From 1 to 10 — controls the resolution of the generated image
|-
|-
|'''Choose a file'''||PNG logo to embed in the center of the QR code
| '''Choose a file''' || PNG logo to embed in the center of the QR code
|-
|-
|'''GENERATE''' button||Generates the QR code with the logo and saves it
| '''GENERATE''' button || Generates the QR code with the logo and saves it
|-
|-
|'''Select a QR code to display'''||Choose from previously generated QR codes to display
| '''Select a QR code to display''' || Choose from previously generated QR codes to display
|-
|-
|'''DISPLAY''' button||Displays the selected QR code
| '''DISPLAY''' button || Displays the selected QR code
|-
|-
|'''Trash icon'''||Deletes the selected QR file (with confirmation)
| '''Trash''' icon || Deletes the selected QR file (with confirmation)
|}
|}


The '''Uploaded Logos''' section lists all uploaded PNG files with their size and upload date. A delete button is available on each row.
The '''Uploaded logos''' section lists all uploaded PNG files, with their size and upload date. A delete button is available on each row.


{{Note|The recommended ECC level for a QR with logo is '''H''' (30%), as the logo covers part of the code — error correction compensates for this.}}
: '''Note:''' The recommended ECC level for a QR code with logo is '''H''' (30%), as the logo masks part of the code — error correction compensates.


==Tab "About"==
== "About" tab ==


Displays module version information, author details and documentation links.
Displays information about the module version, the author and the link to the documentation.


----
----


=Usage in Records=
= Usage in records =


The module adds a '''QR code''' tab to the following object records:
The module adds a '''QR code''' tab in the records of the following objects:


{| class="wikitable"
{| class="wikitable"
!Object!!Added tab(s)
! Object !! Added tab(s)
|-
|-
|Third party||QR code + QR-Url (two separate tabs)
| Third party || QR code + QR-Url (separate tabs)
|-
|-
|Contact||QR code
| Contact || QR code
|-
|-
|Product / Service||QR code
| Product / Service || QR code
|-
|-
|Lot / Serial number||QR code
| Lot / Serial number || QR code
|-
|-
|Warehouse||QR code
| Warehouse || QR code
|-
|-
|Proposal (Quote)||QR code
| Proposal (Quote) || QR code
|-
|-
|Customer order||QR code
| Customer order || QR code
|-
|-
|Supplier order||QR code
| Supplier order || QR code
|-
|-
|Customer invoice||QR code
| Customer invoice || QR code
|-
|-
|Supplier invoice||QR code
| Supplier invoice || QR code
|-
|-
|Contract||QR code
| Contract || QR code
|-
|-
|Intervention||QR code
| Intervention || QR code
|-
|-
|Project||QR code
| Project || QR code
|-
|-
|Member (foundation)||QR code
| Member (foundation) || QR code
|-
|-
|User group||QR code
| User group || QR code
|-
|-
|User||QR code
| User || QR code
|-
|-
|}
|}


==Common structure of the QR code tab==
== Common QR code tab structure ==


Each QR code tab is organized in '''two sections''':
'''[New in v24]''' Each QR code tab is now organized in '''five sections''':


===Top section — Configurable data QR code===
=== Section 1 — Settings bar ===


[[File:Ultimateqrcode-thirdparty-qrcode-top-fr.png|center|900px|QR code tab on a third party record — field selection]]
[[File:Ultimateqrcode-v24-settings-panel-fr.png|center|900px|Settings panel: size, ECC quality and logo selection]]


The user selects '''which fields to include in the QR code''' using checkboxes:
At the top of each QR code tab, a settings bar allows configuring:


*Left column: checkbox
{| class="wikitable"
*Center column: field label and current value (grayed out if unchecked)
! Setting !! Description
*Right column: the '''generated QR code''' (spanning the full height of the table)
|-
| '''Size''' || QR code resolution (from 2 to 10 pixels per module). The higher the value, the larger and more readable the QR code.
|-
| '''Quality (ECC)''' || Error correction level: Low (L ≈ 7%), Medium (M ≈ 15%), Quartile (Q ≈ 25%), High (H ≈ 30%).
|-
| '''Logo''' || PNG logo embedded in the center of the QR code, selectable from uploaded logos.
|}
 
: '''Note:''' When a logo is selected, the ECC quality is automatically '''forced to High (H)''' to ensure readability despite the logo. The mention ''(Forced to High with a logo)'' is displayed next to the selector.
 
These settings are saved '''independently per object type''' (invoice, quote, order, etc.) and apply to both displayed QR codes (data and URL).
 
=== Section 2 — Logo selection table ===
 
The table lists available logos in the <code>documents/mycompany/logos/</code> directory:
 
{| class="wikitable"
! Column !! Description
|-
| '''Radio''' || Radio button to select the logo (or "''No logo''")
|-
| '''Logo''' || PNG file name with preview icon
|-
| '''Size''' || File size in bytes
|-
| '''Date''' || Last upload date
|-
| '''Preview''' || Magnifying glass icon to preview the logo
|-
| '''Actions''' || Rename and delete icons
|}


Available fields depend on the object type:
An upload form at the bottom of the page allows adding new PNG logos.
 
: '''Security:''' If the logo is too large relative to the QR code capacity, the module automatically switches to no-logo mode to prevent an error. A message is logged in the Dolibarr logs.
 
=== Section 3 — Configurable data QR code ===
 
[[File:Ultimateqrcode-thirdparty-qrcode-top-fr.png|center|900px|QR code tab of a third party — field selection]]
 
The user selects the '''fields to include in the QR code''' via checkboxes:
 
* The left column contains the checkbox
* The center column shows the field label and its current value (grayed out if unchecked)
* The right column displays the '''generated QR code''' (with or without logo depending on the selection)
 
Available fields depend on the object:


{| class="wikitable"
{| class="wikitable"
!Object!!Available fields
! Object !! Available fields
|-
| Third party || Company, Address, Zip code, City, Country, Phone, Email, URL + Extra fields
|-
|-
|Third party||Company name, Address, ZIP, Town, Country, Phone, Email, URL + Extra fields
| Product || Ref., Label, Description, Price excl. tax, Price incl. tax, Barcode, Weight, Volume, URL + Extra fields
|-
|-
|Product||Ref., Label, Description, Price excl. tax, Price incl. tax, Barcode, Weight, Volume, URL + Extra fields
| Warehouse || Label, Location short name, Description, Address, Zip code, City, Country, URL + Extra fields
|-
|-
|Warehouse||Label, Short location name, Description, Address, ZIP, Town, Country, URL + Extra fields
| User || Login, First name, Last name, Phone, Mobile, Email, Address, Zip code, City, Country, URL + Extra fields
|-
|-
|User||Login, First name, Last name, Phone, Mobile, Email, Address, ZIP, Town, Country, URL + Extra fields
| Contact || Title, First name, Last name, Company, Position, Phone, Mobile, Email, Address, etc.
|-
|-
|Contact||Title, First name, Last name, Company, Job, Phone, Mobile, Email, Address, etc.
| Invoice || Ref., Customer ref., Company, Email, Phone, Invoice date, Payment due date, Total excl. tax, Total incl. tax, Public note, URL
|-
|-
|(others)||Fields specific to each object type
| (others) || Fields specific to each object
|}
|}


{{Note|'''Extra fields''' (custom attributes) defined in Dolibarr are automatically appended to the list of available fields.}}
: '''Note:''' '''Extra fields''' (complementary attributes) defined in Dolibarr are automatically added to the list of available fields.


The displayed QR code is '''clickable''': clicking it opens the [[#Label_printing|label printing]] window.
The displayed QR code is '''clickable''': clicking opens the [[#Label_printing|label printing]] window.


===Bottom section — Record URL QR code===
=== Section 4 — Record URL QR code ===


[[File:Ultimateqrcode-thirdparty-qrcode-bottom-fr.png|center|900px|QR code tab — bottom section with URL QR and Save/Cancel buttons]]
[[File:Ultimateqrcode-thirdparty-qrcode-bottom-fr.png|center|900px|QR code tab — bottom part with URL QR and Save/Cancel buttons]]


The bottom section displays:
The bottom part displays:


*The label '''URL of the [object] record'''
* The label '''URL of the [object] record'''
*A clickable link to the Dolibarr record
* The clickable link to the Dolibarr record
*A second '''QR code encoding the direct URL''' to the record (also clickable for label printing)
* A second '''QR code encoding the direct URL''' to the record (also clickable for label printing)
*The '''SAVE''' and '''CANCEL''' buttons
* The '''SAVE''' and '''CANCEL''' buttons


===Automatic default field selection===
=== Section 5 — vCard QR code (Contact, User, Third party, Member) ===


On first display (no configuration saved), the module automatically selects fields whose value is non-empty. This ensures a relevant QR code right from the first opening.
[[File:Ultimateqrcode-v24-contact-vcard-fr.png|center|900px|vCard QR code on a contact record]]


===Saving configuration===
'''Contact''', '''User''', '''Third party''' (company) and '''Member''' records have an additional '''vCard QR code''' at the bottom of the page.


Check/uncheck the desired fields, then click '''SAVE'''. The selection is saved and applies to '''all objects of the same type''' (one global configuration per object type).
Scanning this QR code with a smartphone allows adding the contact directly to the phone directory. The encoded vCard content is displayed in plain text below the QR code.
 
=== Live Preview ===
 
'''[New in v24]''' QR codes update '''in real time''' when the user changes:
* the QR code size
* the ECC quality level
* the selected logo
* the checked fields (data QR)
 
'''No page reload is required.''' The preview uses an AJAX request with a 300 ms delay to prevent excessive calls. This feature is available on all '''16 QR pages''' of the module.
 
=== Automatic default field selection ===
 
On first display (no saved configuration), the module automatically selects fields whose value is not empty. This ensures a relevant QR code from the first opening.
 
=== Saving the configuration ===
 
Check/uncheck the desired fields then click '''SAVE'''. The selection is saved and applies to '''all objects of the same type''' (one configuration per object type, global).


----
----


=QR code tab — Examples by object=
= QR code tab — Examples by object =
 
== Customer invoice ==
 
'''[New in v24]'''
 
[[File:Ultimateqrcode-v24-invoice-qr-complete-fr.png|center|900px|QR code tab of an invoice with embedded logo]]


==Product==
Example configuration for a customer invoice: '''Ref.''', '''Company''', '''Email''', '''Phone''', '''Invoice date''', '''Payment due date''', '''Total excl. tax''' and '''Total incl. tax''' checked. The ''expert_dolibarr.png'' logo is selected and embedded in the center of the QR code. The ECC quality is automatically forced to High (H).


[[File:Ultimateqrcode-product-qrcode-fr.png|center|900px|QR code tab on a product record]]
== Product ==


Example configuration for a product: '''Ref.''' and '''Label''' checked, plus extra fields '''Ecotax''' and '''ControlHistoryLink'''. The QR encodes these four values concatenated.
[[File:Ultimateqrcode-product-qrcode-fr.png|center|900px|QR code tab of a product]]


==Warehouse==
Example configuration for a product: '''Ref.''' and '''Label''' checked, along with the extra fields '''Ecotax''' and '''ControlHistoryLink'''. The QR encodes these four concatenated values.


[[File:Ultimateqrcode-stock-qrcode-fr.png|center|900px|QR code tab on a warehouse record]]
== Warehouse ==


Useful for physical identification of storage locations. The '''Short location name''' field (lieu) allows specifying the storage zone.
[[File:Ultimateqrcode-stock-qrcode-fr.png|center|900px|QR code tab of a warehouse]]


==User==
Useful for physical identification of storage locations. The '''Location short name''' field allows specifying the storage area.


[[File:Ultimateqrcode-user-qrcode-fr.png|center|900px|QR code tab on a user record]]
== User ==


The user QR code encodes contact information (login, first name, last name, phone, mobile, email, country...). Practical for badges or internal business cards.
[[File:Ultimateqrcode-user-qrcode-fr.png|center|900px|QR code tab of a user]]


{{Note|The QR code tab on a user record is only visible to the user themselves or to users who have the right to read user records.}}
The user QR code encodes contact information (login, first name, last name, phone, mobile, email, country...). Handy for badges or internal business cards.
 
: '''Note:''' The user QR code tab is only visible to the user themselves or to users with permission to read user records.


----
----


=QR-Url Tab (Third parties only)=
= QR-Url tab (Third parties only) =


[[File:Ultimateqrcode-thirdparty-qrurl-fr.png|center|900px|QR-Url tab on a third party — QR with logo]]
[[File:Ultimateqrcode-thirdparty-qrurl-fr.png|center|900px|QR-Url tab of a third party with logo]]


Third party records have a '''second QR tab''' called '''QR-Url''', specialized in generating QR codes '''with an embedded logo''' encoding the record URL.
Third party records have a '''second QR tab''' called '''QR-Url''', specialized in generating QR codes '''with an embedded logo''' encoding the record URL.
Line 222: Line 294:


{| class="wikitable"
{| class="wikitable"
!Element!!Function
! Element !! Function
|-
|-
|'''Size''' (1-10)||Resolution of the generated QR code
| '''Size''' (1-10) || Resolution of the generated QR code
|-
|-
|'''Choose file''' + '''UPLOAD LOGO'''||Upload a PNG logo to embed in the center
| '''Choose a file''' + '''UPLOAD LOGO''' || Upload a PNG logo to embed in the center
|-
|-
|'''Select a QR code to display'''||Choose from QR codes already generated for this third party
| '''Select a QR code to display''' || Choose from previously generated QR codes for this third party
|-
|-
|'''DISPLAY''' button||Displays the selected QR code
| '''DISPLAY''' button || Displays the selected QR code
|-
|-
|'''Uploaded Logos''' section||Lists available logos with download and delete options
| '''Uploaded logos''' section || List of available logos with download and delete options
|}
|}


Line 239: Line 311:
----
----


=Label Printing=
= Label printing =


[[File:Ultimateqrcode-label-print-fr.png|center|700px|Label printing window — 120×57mm format]]
[[File:Ultimateqrcode-label-print-fr.png|center|700px|Label printing window 120×57mm]]


Clicking any QR code in any tab opens a '''popup print window''' optimized for labels in '''120 × 57 mm''' format (compatible with standard label printers).
Clicking on a QR code in any tab opens a '''print popup window''' optimized for labels in '''120 × 57 mm''' format (compatible with standard label printers).


The label contains:
The label contains:
 
* '''Left''': the configurable data QR code
*'''Left''': the configurable data QR code
* '''Center''': key text information (reference, label, name, etc. depending on the object)
*'''Center''': key text information (reference, label, name, etc. depending on the object)
* '''Right''': the record URL QR code
*'''Right''': the record URL QR code


The window automatically triggers the browser's print dialog.
The window automatically triggers the browser's print dialog.


{{Note|For optimal printing on adhesive labels, configure the printer to 120×57mm format and disable margins in the browser's print options.}}
: '''Note:''' For optimal printing on adhesive labels, set the printer to the 120×57mm format and disable margins in the browser's print settings.


----
----


=Rights and Permissions=
= Rights and permissions =


[[File:Ultimateqrcode-permissions-fr.png|center|700px|UltimateQRcode module permissions]]
[[File:Ultimateqrcode-permissions-fr.png|center|700px|UltimateQRcode module permissions]]


The module defines two permission levels, to be assigned per user group in '''Setup → Groups and users''':
The module defines two permission levels, to be assigned per user group in '''Setup → Users & Groups''':
 
{| class="wikitable"
! Permission !! Description !! Effect
|-
| '''Read qrcode outcomes''' || Read QR codes || Allows viewing QR code tabs and displaying generated QR codes
|-
| '''Create/Modify qrcode outcomes''' || Create / Modify || Allows checking/unchecking fields and saving the configuration
|}
 
: '''Note:''' Without the '''Read''' permission, QR code tabs are not visible. Without the '''Write''' permission, the user can see QR codes but cannot modify the field selection.
 
----
 
= What's new and v24 compatibility =
 
'''[New in v24]''' UltimateQRcode module version 24 brings the following improvements:
 
== New features ==
 
{| class="wikitable"
! Feature !! Description
|-
| '''Per-page settings''' || Size, ECC quality and logo configurable directly on each QR code record page
|-
| '''Embedded logo''' || Ability to embed a PNG logo in the center of each QR code, on all pages
|-
| '''Live preview''' || Real-time QR code update when changing size, ECC, logo or checked fields (AJAX, no reload)
|-
| '''vCard QR code''' || vCard QR code for contacts, users, third parties and members allowing direct addition to the phone directory
|-
| '''Logo management''' || Upload, preview, rename and delete logos from each record interface
|}
 
== Dolibarr v24 compatibility ==


{| class="wikitable"
{| class="wikitable"
!Permission!!Description!!Effect
! Fix !! Detail
|-
| '''Module icon''' || Added the <code>.png</code> extension in the <code>$this->picto</code> property of the module descriptor, as per the Dolibarr v23+ warning.
|-
|-
|'''Read qrcode outcomes'''||Read QR codes||Allows viewing QR code tabs and displaying generated QR codes
| '''Currency''' || Replaced <code>$conf->currency</code> (deprecated) with <code>getDolCurrency()</code>.
|-
|-
|'''Create/Modify qrcode outcomes'''||Create / Modify||Allows checking/unchecking fields and saving the configuration
| '''Constants''' || Replaced direct assignment <code>$conf->global->XXX = value</code> (deprecated) with <code>dolibarr_set_const()</code>.
|}
|}


{{Note|Without the '''Read''' permission, QR code tabs are not visible. Without the '''Write''' permission, users can see QR codes but cannot modify the field selection.}}
== Bug fixes ==
 
{| class="wikitable"
! Bug !! Fix
|-
| Invoice tab not found || Fixed the tab key casing in the module descriptor.
|-
| Obsolete admin parameter || Removed the "QR code display size (in pixels)" parameter, now obsolete with the per-page size setting.
|-
| Logo overflow || Added a try/catch mechanism to handle capacity overflow when the logo is too large: automatic fallback to no-logo mode.
|}
 
== Translations ==
 
Added missing translation keys in '''5 language files''' (FR, EN, DE, ES, IT) for new features: ECC quality selection, logo management, and all object types.


----
----


=FAQ=
= FAQ =
 
; '''The QR code is empty or shows "No data"'''
: No field is checked, or all checked fields have an empty value in the record. Check at least one field with a value and click SAVE.
 
; '''The label does not print at the correct size'''
: Verify that the printer paper format is correctly set to 120×57mm. Disable margins in the browser's print settings.


;'''The QR code is empty or shows "No data"'''
; '''Extra fields do not appear'''
:No field is checked, or all checked fields have empty values in the record. Check at least one field with a value and click SAVE.
: Complementary attributes must be defined in '''Setup → Complementary attributes''' for the relevant object.


;'''The label does not print at the correct size'''
; '''The QR code with logo is not readable'''
:Verify that the printer paper format is set to 120×57mm. Disable margins in the browser's print options.
: The logo covers too much surface area. Use a smaller logo (ideally square, less than 100×100 pixels) or increase the ECC level to '''H''' to improve error correction. With module v24, the ECC quality is automatically forced to '''H''' when a logo is selected.


;'''Extra fields do not appear'''
; '''The QR code displays without logo even though I selected one'''
:Custom attributes must be defined in '''Setup → Extra attributes''' for the relevant object type.
: The logo is probably too large relative to the encoded content. The module automatically switches to no-logo mode to prevent an error. Try with a smaller logo or reduce the number of checked fields.


;'''The QR with logo is not readable'''
; '''QR codes do not update when I change settings'''
:The logo takes up too much space. Use a smaller logo or increase ECC to '''H''' to improve error correction.
: The live preview requires JavaScript to be enabled in the browser. Check that no script blocker is active. QR codes update automatically 300 ms after each change.


;'''The QR code tab does not appear on some records'''
; '''The QR code tab does not appear on some records'''
:Verify that the module is activated and that the user has the '''Read qrcode outcomes''' permission.
: Verify that the module is activated and that the user has the '''Read qrcode outcomes''' permission.


----
----


=See also=
= See also =


*[[Module_Ultimateqrcode_FR|Module UltimateQRcode — Documentation française]]
* [[Module_Ultimateqrcode_FR|Module UltimateQRcode — Documentation française]]
* [https://www.dolistore.com Dolistore]
* [https://www.atoo-net.com Atoo-Net]


[[Category:External module]]
[[Category:External module]]
[[Category:QR Code]]
[[Category:QR Code]]
[[Category:Atoo-Net]]
[[Category:Atoo-Net]]

Revision as of 18:26, 20 June 2026

Information


Module name Ultimateqrcode
Editor / Editeur Atoo.Net - https://www.atoo-net.com
Download or buy page / Page achat ou téléchargement External module - www.dolistore.com
Status / Statut / Estado Stable
Prerequisites / Prérequis

Dolibarr min version: See on Dolistore    Dolibarr max version: See on Dolistore

Last update date / Date mise à jour fiche / Fecha última actualización 2026-06-20
Note / Nota Compatible with Dolibarr v24

Installation

  1. Download the module and place it in the htdocs/custom/ultimateqrcode/ directory
  2. From Dolibarr: Home → Setup → Modules/Applications
  3. Find the UltimateQRcode module in the Atoo-Net section and activate it
  4. Permissions must be configured per user group (see Rights and permissions)

Module configuration

Access the configuration via Home → Setup → Modules/Applications → UltimateQRcode (wrench icon) or directly through the administration menu.

The configuration page has three tabs.

"QR codes" tab (free generator)

Free QR code generator

This tab provides a on-demand QR code generator:

Field Description
Data The content to encode: URL, email address, free text, vCard, etc.
ECC Error correction level:
• L (≈7% — smallest): minimum size
• M (≈15%): common usage
• Q (≈25%): good resilience
• H (≈30% — best): very resilient (recommended with logo)
Size Dot size (from 1 to 10 pixels per QR module)
GENERATE button Generates and immediately displays the QR code

Click on Like this in the help text to see a generation example.

"QR with logo" tab

QR generator with embedded logo

This tab allows generating a QR code with a logo embedded in the center:

Field Description
Data URL or content to encode (default: https://www.atoo-net.com/)
Size From 1 to 10 — controls the resolution of the generated image
Choose a file PNG logo to embed in the center of the QR code
GENERATE button Generates the QR code with the logo and saves it
Select a QR code to display Choose from previously generated QR codes to display
DISPLAY button Displays the selected QR code
Trash icon Deletes the selected QR file (with confirmation)

The Uploaded logos section lists all uploaded PNG files, with their size and upload date. A delete button is available on each row.

Note: The recommended ECC level for a QR code with logo is H (30%), as the logo masks part of the code — error correction compensates.

"About" tab

Displays information about the module version, the author and the link to the documentation.


Usage in records

The module adds a QR code tab in the records of the following objects:

Object Added tab(s)
Third party QR code + QR-Url (separate tabs)
Contact QR code
Product / Service QR code
Lot / Serial number QR code
Warehouse QR code
Proposal (Quote) QR code
Customer order QR code
Supplier order QR code
Customer invoice QR code
Supplier invoice QR code
Contract QR code
Intervention QR code
Project QR code
Member (foundation) QR code
User group QR code
User QR code

Common QR code tab structure

[New in v24] Each QR code tab is now organized in five sections:

Section 1 — Settings bar

At the top of each QR code tab, a settings bar allows configuring:

Setting Description
Size QR code resolution (from 2 to 10 pixels per module). The higher the value, the larger and more readable the QR code.
Quality (ECC) Error correction level: Low (L ≈ 7%), Medium (M ≈ 15%), Quartile (Q ≈ 25%), High (H ≈ 30%).
Logo PNG logo embedded in the center of the QR code, selectable from uploaded logos.
Note: When a logo is selected, the ECC quality is automatically forced to High (H) to ensure readability despite the logo. The mention (Forced to High with a logo) is displayed next to the selector.

These settings are saved independently per object type (invoice, quote, order, etc.) and apply to both displayed QR codes (data and URL).

Section 2 — Logo selection table

The table lists available logos in the documents/mycompany/logos/ directory:

Column Description
Radio Radio button to select the logo (or "No logo")
Logo PNG file name with preview icon
Size File size in bytes
Date Last upload date
Preview Magnifying glass icon to preview the logo
Actions Rename and delete icons

An upload form at the bottom of the page allows adding new PNG logos.

Security: If the logo is too large relative to the QR code capacity, the module automatically switches to no-logo mode to prevent an error. A message is logged in the Dolibarr logs.

Section 3 — Configurable data QR code

QR code tab of a third party — field selection

The user selects the fields to include in the QR code via checkboxes:

  • The left column contains the checkbox
  • The center column shows the field label and its current value (grayed out if unchecked)
  • The right column displays the generated QR code (with or without logo depending on the selection)

Available fields depend on the object:

Object Available fields
Third party Company, Address, Zip code, City, Country, Phone, Email, URL + Extra fields
Product Ref., Label, Description, Price excl. tax, Price incl. tax, Barcode, Weight, Volume, URL + Extra fields
Warehouse Label, Location short name, Description, Address, Zip code, City, Country, URL + Extra fields
User Login, First name, Last name, Phone, Mobile, Email, Address, Zip code, City, Country, URL + Extra fields
Contact Title, First name, Last name, Company, Position, Phone, Mobile, Email, Address, etc.
Invoice Ref., Customer ref., Company, Email, Phone, Invoice date, Payment due date, Total excl. tax, Total incl. tax, Public note, URL
(others) Fields specific to each object
Note: Extra fields (complementary attributes) defined in Dolibarr are automatically added to the list of available fields.

The displayed QR code is clickable: clicking opens the label printing window.

Section 4 — Record URL QR code

QR code tab — bottom part with URL QR and Save/Cancel buttons

The bottom part displays:

  • The label URL of the [object] record
  • The clickable link to the Dolibarr record
  • A second QR code encoding the direct URL to the record (also clickable for label printing)
  • The SAVE and CANCEL buttons

Section 5 — vCard QR code (Contact, User, Third party, Member)

vCard QR code on a contact record

Contact, User, Third party (company) and Member records have an additional vCard QR code at the bottom of the page.

Scanning this QR code with a smartphone allows adding the contact directly to the phone directory. The encoded vCard content is displayed in plain text below the QR code.

Live Preview

[New in v24] QR codes update in real time when the user changes:

  • the QR code size
  • the ECC quality level
  • the selected logo
  • the checked fields (data QR)

No page reload is required. The preview uses an AJAX request with a 300 ms delay to prevent excessive calls. This feature is available on all 16 QR pages of the module.

Automatic default field selection

On first display (no saved configuration), the module automatically selects fields whose value is not empty. This ensures a relevant QR code from the first opening.

Saving the configuration

Check/uncheck the desired fields then click SAVE. The selection is saved and applies to all objects of the same type (one configuration per object type, global).


QR code tab — Examples by object

Customer invoice

[New in v24]

QR code tab of an invoice with embedded logo

Example configuration for a customer invoice: Ref., Company, Email, Phone, Invoice date, Payment due date, Total excl. tax and Total incl. tax checked. The expert_dolibarr.png logo is selected and embedded in the center of the QR code. The ECC quality is automatically forced to High (H).

Product

QR code tab of a product

Example configuration for a product: Ref. and Label checked, along with the extra fields Ecotax and ControlHistoryLink. The QR encodes these four concatenated values.

Warehouse

QR code tab of a warehouse

Useful for physical identification of storage locations. The Location short name field allows specifying the storage area.

User

QR code tab of a user

The user QR code encodes contact information (login, first name, last name, phone, mobile, email, country...). Handy for badges or internal business cards.

Note: The user QR code tab is only visible to the user themselves or to users with permission to read user records.

QR-Url tab (Third parties only)

QR-Url tab of a third party with logo

Third party records have a second QR tab called QR-Url, specialized in generating QR codes with an embedded logo encoding the record URL.

Features:

Element Function
Size (1-10) Resolution of the generated QR code
Choose a file + UPLOAD LOGO Upload a PNG logo to embed in the center
Select a QR code to display Choose from previously generated QR codes for this third party
DISPLAY button Displays the selected QR code
Uploaded logos section List of available logos with download and delete options

The displayed QR encodes the URL of the third party record, with the chosen logo inserted in the center of the image.


Label printing

Label printing window 120×57mm

Clicking on a QR code in any tab opens a print popup window optimized for labels in 120 × 57 mm format (compatible with standard label printers).

The label contains:

  • Left: the configurable data QR code
  • Center: key text information (reference, label, name, etc. depending on the object)
  • Right: the record URL QR code

The window automatically triggers the browser's print dialog.

Note: For optimal printing on adhesive labels, set the printer to the 120×57mm format and disable margins in the browser's print settings.

Rights and permissions

UltimateQRcode module permissions

The module defines two permission levels, to be assigned per user group in Setup → Users & Groups:

Permission Description Effect
Read qrcode outcomes Read QR codes Allows viewing QR code tabs and displaying generated QR codes
Create/Modify qrcode outcomes Create / Modify Allows checking/unchecking fields and saving the configuration
Note: Without the Read permission, QR code tabs are not visible. Without the Write permission, the user can see QR codes but cannot modify the field selection.

What's new and v24 compatibility

[New in v24] UltimateQRcode module version 24 brings the following improvements:

New features

Feature Description
Per-page settings Size, ECC quality and logo configurable directly on each QR code record page
Embedded logo Ability to embed a PNG logo in the center of each QR code, on all pages
Live preview Real-time QR code update when changing size, ECC, logo or checked fields (AJAX, no reload)
vCard QR code vCard QR code for contacts, users, third parties and members allowing direct addition to the phone directory
Logo management Upload, preview, rename and delete logos from each record interface

Dolibarr v24 compatibility

Fix Detail
Module icon Added the .png extension in the $this->picto property of the module descriptor, as per the Dolibarr v23+ warning.
Currency Replaced $conf->currency (deprecated) with getDolCurrency().
Constants Replaced direct assignment $conf->global->XXX = value (deprecated) with dolibarr_set_const().

Bug fixes

Bug Fix
Invoice tab not found Fixed the tab key casing in the module descriptor.
Obsolete admin parameter Removed the "QR code display size (in pixels)" parameter, now obsolete with the per-page size setting.
Logo overflow Added a try/catch mechanism to handle capacity overflow when the logo is too large: automatic fallback to no-logo mode.

Translations

Added missing translation keys in 5 language files (FR, EN, DE, ES, IT) for new features: ECC quality selection, logo management, and all object types.


FAQ

The QR code is empty or shows "No data"
No field is checked, or all checked fields have an empty value in the record. Check at least one field with a value and click SAVE.
The label does not print at the correct size
Verify that the printer paper format is correctly set to 120×57mm. Disable margins in the browser's print settings.
Extra fields do not appear
Complementary attributes must be defined in Setup → Complementary attributes for the relevant object.
The QR code with logo is not readable
The logo covers too much surface area. Use a smaller logo (ideally square, less than 100×100 pixels) or increase the ECC level to H to improve error correction. With module v24, the ECC quality is automatically forced to H when a logo is selected.
The QR code displays without logo even though I selected one
The logo is probably too large relative to the encoded content. The module automatically switches to no-logo mode to prevent an error. Try with a smaller logo or reduce the number of checked fields.
QR codes do not update when I change settings
The live preview requires JavaScript to be enabled in the browser. Check that no script blocker is active. QR codes update automatically 300 ms after each change.
The QR code tab does not appear on some records
Verify that the module is activated and that the user has the Read qrcode outcomes permission.

See also