2,089
edits
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 --> | ||
[[ | [[fr:Module_Ultimateqrcode_FR]] | ||
<!-- END interlang links --> | <!-- END interlang links --> | ||
[[Category: | [[Category:Complementary modules]] | ||
[[Category:Ultimateqrcode]] | [[Category:Ultimateqrcode]] | ||
{{TemplateDocDev}} | {{TemplateDocDev}} | ||
{{TemplateDocUtil}} | {{TemplateDocUtil}} | ||
= | =Information= | ||
{{TemplateModuleInfo | {{TemplateModuleInfo | ||
|modulename=Ultimateqrcode | |modulename=Ultimateqrcode | ||
| Line 18: | Line 18: | ||
|status=stable | |status=stable | ||
|prerequisites= | |prerequisites= | ||
|minversion= | |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 | ||
# | # 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 | ||
# | # Permissions must be configured per user group (see [[#Rights_and_permissions|Rights and permissions]]) | ||
---- | ---- | ||
=Module | = Module configuration = | ||
Access configuration via '''Home → Setup → Modules/Applications → UltimateQRcode''' (wrench icon) | 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. | ||
== | == "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 | This tab provides a '''on-demand QR code generator''': | ||
{| class="wikitable" | {| class="wikitable" | ||
!Field!!Description | ! Field !! Description | ||
|- | |- | ||
|'''Data'''|| | | '''Data''' || The content to encode: URL, email address, free text, vCard, etc. | ||
|- | |- | ||
|'''ECC'''||Error correction level:<br />• '''L''' (≈7% — smallest): | | '''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'''|| | | '''Size''' || Dot size (from 1 to 10 pixels per QR module) | ||
|- | |- | ||
|'''GENERATE''' button|| | | '''GENERATE''' button || Generates and immediately displays the QR code | ||
|} | |} | ||
Click '''Like | Click on '''Like this''' in the help text to see a generation example. | ||
== | == "QR with logo" tab == | ||
[[File:Ultimateqrcode-admin-qrwithlogo-fr.png|center|900px|QR | [[File:Ultimateqrcode-admin-qrwithlogo-fr.png|center|900px|QR generator with embedded logo]] | ||
This tab | 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 | | '''Trash''' icon || Deletes the selected QR file (with confirmation) | ||
|} | |} | ||
The '''Uploaded | 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 module version | Displays information about the module version, the author and the link to the documentation. | ||
---- | ---- | ||
=Usage in | = Usage in records = | ||
The module adds a '''QR code''' tab | 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 ( | | 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 | == Common QR code tab structure == | ||
Each QR code tab is organized in ''' | '''[New in v24]''' Each QR code tab is now organized in '''five sections''': | ||
=== | === Section 1 — Settings bar === | ||
[[File:Ultimateqrcode- | [[File:Ultimateqrcode-v24-settings-panel-fr.png|center|900px|Settings panel: size, ECC quality and logo selection]] | ||
At the top of each QR code tab, a settings bar allows configuring: | |||
{| class="wikitable" | |||
! 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 <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 | 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 | |||
|- | |- | ||
| | | 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 | | (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 | The displayed QR code is '''clickable''': clicking opens the [[#Label_printing|label printing]] window. | ||
=== | === Section 4 — Record URL QR code === | ||
[[File:Ultimateqrcode-thirdparty-qrcode-bottom-fr.png|center|900px|QR code tab — bottom | [[File:Ultimateqrcode-thirdparty-qrcode-bottom-fr.png|center|900px|QR code tab — bottom part with URL QR and Save/Cancel buttons]] | ||
The bottom | The bottom part displays: | ||
*The label '''URL of the [object] record''' | * 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) | * 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 | ||
=== | === Section 5 — vCard QR code (Contact, User, Third party, Member) === | ||
[[File:Ultimateqrcode-v24-contact-vcard-fr.png|center|900px|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. | |||
Check/uncheck the desired fields | 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]] | |||
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 == | |||
[[File:Ultimateqrcode-product-qrcode-fr.png|center|900px|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 == | |||
[[File:Ultimateqrcode-stock-qrcode-fr.png|center|900px|QR code tab of a warehouse]] | |||
Useful for physical identification of storage locations. The '''Location short name''' field allows specifying the storage area. | |||
== User == | |||
[[File:Ultimateqrcode-user-qrcode-fr.png|center|900px|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 | = QR-Url tab (Third parties only) = | ||
[[File:Ultimateqrcode-thirdparty-qrurl-fr.png|center|900px|QR-Url tab | [[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 | | '''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 | | '''Uploaded logos''' section || List of available logos with download and delete options | ||
|} | |} | ||
| Line 239: | Line 311: | ||
---- | ---- | ||
=Label | = Label printing = | ||
[[File:Ultimateqrcode-label-print-fr.png|center|700px|Label printing window | [[File:Ultimateqrcode-label-print-fr.png|center|700px|Label printing window 120×57mm]] | ||
Clicking | 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, set the printer to the 120×57mm format and disable margins in the browser's print settings. | |||
---- | ---- | ||
=Rights and | = 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" | ||
! | ! 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. | |||
|- | |- | ||
|''' | | '''Currency''' || Replaced <code>$conf->currency</code> (deprecated) with <code>getDolCurrency()</code>. | ||
|- | |- | ||
|''' | | '''Constants''' || Replaced direct assignment <code>$conf->global->XXX = value</code> (deprecated) with <code>dolibarr_set_const()</code>. | ||
|} | |} | ||
{ | == 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. | |||
;''' | ; '''Extra fields do not appear''' | ||
: | : Complementary attributes must be defined in '''Setup → Complementary attributes''' for the relevant object. | ||
;'''The | ; '''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 | : 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]] | ||