When you email a vendor a price request, the part number rarely means much to them. They want to see the thing. So you go and dig the photo out of the product’s Documents tab and attach it by hand, and again on the next request, and again on the purchase order that follows.
The files are already in Dolibarr. Getting them onto the email was the missing step, so I wrote a module for it.
This module is great for manufacturers that have to deliver design files or other digital documents alongside their RFQ/PO.
What it does
On a product’s Documents tab there’s a Vendor email images section: a switch, and a tick list of the product’s files. Turn the switch on and those files ride along whenever that product appears on a price request or purchase order you email. Attachments are named <product ref>_<file>, so two products that both have a front.jpg don’t collide.
If you’d rather not go product by product, nominate categories in the setup instead. Everything in them, including subcategories, is treated as flagged. The product’s own section still shows why it’s being sent, and any file you unticked there is still left out.
New uploads on a flagged product go out automatically. If you’d rather they stayed out until you tick them, there’s a switch for that.
The part that took the longest: files that aren’t public
Product files in Dolibarr aren’t reachable from outside unless you share them, and photo attachments get large fast.
So there’s a size limit. Under it, files are attached. Over it, the module creates Dolibarr’s own share links (document.php?hashp=) for exactly those files and puts them in the message instead. Nothing else in the product folder is touched.
Two things I was careful about, because this turns private files public:
- Links are only created at the moment you hit Send. Opening an email form, or looking at a product, never shares anything.
- Links can expire. Set a number of days and a daily job removes the links the module created, counted from the last email that included them. Links you shared by hand are never touched, and you can revoke any of them from the product’s Documents tab.
There’s also a resize setting. Attach jpg/png/gif shrunk to a maximum size, and the limit is measured on the shrunken copies, so a 4 MB photo goes out as an 80 KB attachment and you stay under the limit rather than falling back to links. Originals are never modified, and share links still point at the full-size file.
If you want both at once, put __RFQIMAGES_LINKS__ in your email template. Wherever it appears, it becomes the list of share links when the email is sent, and the files are still attached. It’s listed in the template editor alongside the other substitution keys.
Practical bits
No core changes. It works through hooks on the email form, the two vendor document cards and the product Documents tab. It reads the native product files and writes only its own two tables plus one product extrafield. Entity scoped, and it uses Dolibarr’s own permissions, so nobody sees files from a document they couldn’t open anyway.
Files are copied to your mail temp folder before being attached, so nothing you do in the email form can touch the originals. That one came out of testing: “Remove all” in Dolibarr’s email form deletes the attached paths.
Dolibarr 16+, PHP 7.1+. Built and tested against 22.0.4. Only the Products module is required; price requests and purchase orders are each switchable, so it’s fine if you only use one of them.
GPL-3.0. Grab the zip from Releases and install it through Home > Setup > Modules > Deploy external module.
Right now it covers price requests and supplier orders, since that’s where I needed it. Customer-side quotes would be the obvious next step if anyone would use it.




