多格式报价生成器

Odoo 销售 中的 PDF 报价生成器 提供了向客户发送完全定制的 PDF 报价文件的机会,展示公司和产品,包含各种信息和设计元素,而不仅仅是显示价格和总额。

PDF 报价生成器将页眉、产品描述、价格和页脚组合在一起,以创建详细的报价单。它还可以在 PDF 中插入动态文本或自定义备注,以便为客户提供个性化的报价。

在报价单中使用定制的 PDF 文件为客户提供了更高级的购物体验,并为公司增添了优雅的专业水平。

注解

建议使用 Adobe 软件编辑 PDF 表单。页眉和页脚 PDF 模板上的表单字段是获取 Odoo 动态值所必需的。

配置

要为报价单添加自定义 PDF 文件,必须配置 PDF 报价生成器 功能。

要执行此操作,请导航到 销售应用 ‣ 配置 ‣ 设置 。然后,在 设置 页面中,滚动到 报价单和订单 部分,并找到 PDF 报价生成器 功能。

Dynamic text in PDFs

While creating custom PDFs for quotes, use dynamic text for Odoo to auto-fill the PDF content with information related to the quote from the Odoo database, like names, prices, etc.

Dynamic text values are form components (text inputs) that can be added in a PDF file, and Odoo automatically fills those values in with information related to the quote.

Dynamic text values

Below are common dynamic text values used in custom PDFs that are already mapped to the correct fields, and what they represent.

For headers and footers PDF:

  • name: Sales Order Reference

  • partner_id__name: Customer Name

  • user_id__name: Salesperson Name

  • amount_untaxed: Untaxed Amount

  • amount_total: Total Amount

  • delivery_date: Delivery Date

  • validity_date: Expiration Date

  • client_order_ref: Customer Reference

For product PDF:

  • description: Product Description

  • quantity: Quantity

  • uom: Unit of Measure (UoM)

  • price_unit: Price Unit

  • discount: Discount

  • product_sale_price: Product List Price

  • taxes: Taxes name joined by a comma (,)

  • tax_excl_price: Tax Excluded Price

  • tax_incl_price: Tax Included Price

After uploading a PDF, you can then Configure dynamic fields. This will allow you to map any field name found in your PDF to the field you want to show by writing down any existing path. Headers and footers starts from the current sale_order model, whereas product document follows their path from their sale_order_line. Leaving that path empty allows you to fill a custom notes, directly from the specific quote that requires it.

Example

When a PDF is built, it’s best practice to use common dynamic text values (name and partner_id_name). When uploaded into the database, Odoo auto-populates those fields with the information from their respective fields.

In this case, Odoo would auto-populate the Sales Order Reference in the name dynamic text field, and the Customer Name in the partner_id_name field.

PDF quote being built using common dynamic placeholders.

Once the PDF file(s) are complete, save them to the computer’s hard drive, and proceed to upload them to Odoo via Sales app ‣ Configuration ‣ Headers/Footers.

Example

When uploading PDF containing the form field invoice_partner_country, which is an information available in the sales order, configure the path of the Form Field Name to: - partner_invoice_id.country_id.name for a header or footer document - order_id.partner_invoice_id.country_id.name for a product document fills the form with the invoice partner country’s name when the PDF is built.

Example

When uploading any PDF containing the form field custom_note, leaving the path empty allows the seller to write down any note where that form field is in that document and shown when the PDF is built.

将 PDF 添加到产品

在 Odoo 销售 应用程序中,您也可将自订 PDF 加入至产品表单。加入 PDF 至产品后,在报价单使用该产品时,该 PDF 也会插入至最终的 PDF 内。

要将自定义 PDF 加入至产品,请前往 销售应用程序 ‣ 产品 ‣ 产品 ,然后选择想要新增自定义 PDF 的产品。

注解

A document could also be added to a product variant, instead of a product. If there are documents on a product and on its variant, only the documents in the variant are shown.

To add a custom document to a product variant, navigate to Sales app ‣ Products ‣ Product Variants. Select the desired variant, click the Documents smart button, and proceed to upload the custom document to the specific product variant.

On the product page, click the Documents smart button at the top of the page to navigate to a Documents page for that product, where files related to that product can be uploaded. From this page, either click New or Upload.

The Documents smart button on a product form in Odoo Sales.

Clicking Upload opens the computer’s local file directory. An uploaded document can be further configured on the document card, or by clicking the (vertical ellipsis) icon in the top-right corner of the document card, and then clicking Edit.

Clicking New reveals a blank documents form, in which the desired PDF can be uploaded via the Upload your file button on the form, located in the File Content field.

PDF form configuration

A standard document form with various fields for a specific product in Odoo Sales.

The first field on the documents form is for the Name of the document, and it is grayed-out (not clickable) until a document is uploaded. Once a PDF has been uploaded, the Name field is auto-populated with the name of the PDF, and it can then be edited.

Prior to uploading a document, there’s the option to designate whether the document is a File or URL from the Type drop-down field menu.

A standard document form with an uploaded pdf in Odoo Sales.

注解

If a PDF is uploaded, the Type field is auto-populated to File, and it cannot be modified.

Then, in the Sales section, in the Visible at field, click the drop-down menu, and select either: On quotation, On confirmed order, or Inside quote pdf.

  • Quotation: the document is sent to (and accessible by) customers at any time.

  • Confirmed order: the document is sent to customers upon the confirmation of an order. This is best for user manuals and other supplemental documents.

  • Inside quote: the document is included in the PDF of the quotation, between the header pages and the Pricing section of the quote.

Example

When the Inside quote option for the Visible at field is chosen, and the custom PDF file, Corner Desk.pdf is uploaded, the PDF is visible on the quotation in the customer portal under the Documents field.

Sample of an uploaded pdf with the on quote option chosen in Odoo Sales.

Beside the File Content field, you have the possibility to Configure dynamic fields. When doing so, remember that the starting model is the sale_order_line, unlike for headers and footers that start from the sale_order.

Lastly, in the E-Commerce section, decide whether or not to Publish on Website so that the PDF appears on the product page in the online store.

Example

When the Publish on Website option is enabled, a link to the uploaded document, Corner Desk.pdf, appears on the product’s page in the online store.

It appears beneath a Documents heading, with a link showcasing the name of the uploaded document.

Showing a link to an uploaded document on a product page using Odoo Sales.

PDF quote

On a sales order, in the Quote Builder tab, select additional documents to be merged into the final PDF. If a selected document has custom fields, they appear as editable text boxes to be filled in.

Selectable quotation headers and footers under the Quote Builder section in a quotation.

Once a quote with a pre-configured PDF has been confirmed, Odoo provides the option to print the confirmed quote to check for errors, or to keep for records.

To print the PDF quote, navigate to the confirmed quote, and click the ⚙️ (gear) icon to reveal a drop-down menu. From this drop-down menu, select Print, then select PDF Quote.

Print pdf quote option on drop-down menu located on confirmed sales order in Odoo Sales.

Doing so instantly downloads the PDF quote. When opened, the PDF quote, along with the configured product PDF that was set to be visible inside the quote, can be viewed and printed.

注解

Download these PDF quote builder examples or download sample quotation for added reference.

更多内容