Sale Product Document Default
Automatically include the product documents flagged by default in the quotation PDF.
The problem
The standard Sales PDF Quotation Builder can merge a product document into the quotation PDF when the document is configured with Sale : Visible at = Inside quote pdf. However the document is only a candidate: somebody has to open the Quote Builder tab of the quotation and tick it, line by line. Nothing is selected automatically, so a document meant to always travel with its product is silently left out of the PDF whenever the salesperson forgets the extra step, and it is always left out when the quotation is created by code: web services, AI agents, eCommerce or quotation templates.
Headers and footers coming from a quotation template are not affected: the standard module already propagates them.
The solution
An Add By Default flag on the product document, with the same semantics as the flag already available on quotation headers and footers. Documents carrying the flag are selected automatically on every order line using that product, both in the interface and on record creation, so the automation also covers web services, AI agent tools, eCommerce, lines generated from a quotation template and duplicated orders. The PDF composition itself is untouched: the standard module keeps merging the documents between the header pages and the quotation table.
Behaviour
| Where | What happens |
|---|---|
| Product, Documents tab, document form | New Add By Default checkbox, visible when Sale : Visible at is Inside quote pdf |
| Quotation line, product set from the interface | The flagged documents of the product or variant are ticked in the Quote Builder tab |
| Quotation line created by code | Same selection, without any interface interaction |
| Product changed on an existing line | Documents of the previous product are dropped, the new product's flagged documents are added |
| Manual selection already made | Preserved, the automatic selection is additive and never destructive |
| Document not set to Inside quote pdf | Never selected, the flag has no effect |
Fields
| Type | Description |
|---|---|
| Boolean | Add this document by default to the quotation lines using this product. Restricted to the sales user group, like the standard sales visibility field. |
Developed by STeSI Consulting — Francesco Moccia <moccia.f@stesi.consulting>