Skip to Content

Sale Product Document Default

Every quotation should travel with the right documents: technical datasheets, certifications, safety instructions, warranty terms. Attaching them by hand, one line at a time, is exactly the step that gets skipped when the quotation is urgent — and it is never done at all when the quotation is generated automatically.

Who is it for

Companies whose products always come with the same paperwork: manufacturers quoting equipment with datasheets, distributors of certified goods, anyone whose commercial offer is expected to include documentation the customer will actually read before deciding.

How it works

  • Upload the document once on the product and choose to include it inside the quotation PDF.
  • Tick the new Add by default box: from that moment the document belongs to the product.
  • Every quotation line using that product picks up its documents on its own, with no extra click.
  • The salesperson keeps full control and can still add or remove documents on a single quotation.
  • Quotations created outside the interface are covered too: web shop, integrations, automations and quotation templates.

The result: the documents your customers expect are always in the offer they receive, because nobody has to remember to attach them.

0.00 € 0.00 €

 Per maggiori info sui nostri moduli non esitare a contattarci

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

WhereWhat happens
Product, Documents tab, document formNew Add By Default checkbox, visible when Sale : Visible at is Inside quote pdf
Quotation line, product set from the interfaceThe flagged documents of the product or variant are ticked in the Quote Builder tab
Quotation line created by codeSame selection, without any interface interaction
Product changed on an existing lineDocuments of the previous product are dropped, the new product's flagged documents are added
Manual selection already madePreserved, the automatic selection is additive and never destructive
Document not set to Inside quote pdfNever selected, the flag has no effect

Fields

ModelFieldTypeDescription
product.documentadd_by_defaultBooleanAdd this document by default to the quotation lines using this product. Restricted to the sales user group, like the standard sales visibility field.

Technical notes

  • Single entry point — the selection logic lives in one helper on the sale order line, reused by the product onchange and by the create and write overrides.
  • Bypass — pass skip_default_product_documents in the context to disable the automatic selection for a specific call.
  • Duplication — duplicating an order line re-applies the flagged documents, so a manual removal does not survive a duplication.
  • Tested — 8 automated tests cover the interface path, record creation, the product change and the bypass context.

Requirements

Odoo 19. Depends on the standard Sales PDF Quotation Builder application, which is installed automatically with Sales. Available in English and Italian.

Changelog

VersionNotes
19.0.1.0.0Add the Add By Default flag on product documents and the automatic selection of the flagged documents on the quotation lines, in the interface and on record creation.

Developed by STeSI Consulting — Francesco Moccia <moccia.f@stesi.consulting>