OdooWiki OCA HUB

Purchase Order Line Import

purchase_order_line_import_sheet_file folder_open OCA/purchase-workflow open_in_new
Purchase Management License: AGPL-3

This module adds an Import Lines button to requests for quotation. It opens a wizard that reads a spreadsheet (XLSX, XLS, ODS or CSV) and adds one purchase order line per row to the current request for quotation.

The spreadsheet supports these columns:

| Column | Required | Purchase order line field | | ------------------ | -------- | ---------------------------------------------- | | Internal Reference | Yes | product_id, by the product internal reference | | Quantity | Yes | product_qty | | Description | No | name | | Unit Price | No | price_unit | | Analytic Account | No | analytic_distribution, 100% to the account |

An empty optional cell keeps the value Odoo computes for the line: the default description of the product and the vendor price. The analytic account is searched by code or by name.

All the rows are checked before any line is created: if any of them has an error, nothing is imported and every error is reported with its row number.

auto_awesome What this module does

AI-generated from the code · Odoo 17.0

Adds an "Import Lines" button to requests for quotation so users can upload a spreadsheet and create one purchase order line per row, instead of typing lines manually.

This module lets buyers fill a request for quotation from a spreadsheet. On the purchase order form, inside the order lines list, a new "Import Lines" button opens a small upload window.

In that window the user can: - Download a ready-made Excel template with the expected column headers and help notes. - Upload a file (XLSX, XLS, ODS or CSV) whose first row contains the column names.

The spreadsheet columns are: Internal Reference (required, used to find the product), Quantity (required), Description, Unit Price and Analytic Account. Each following row becomes one line on the request for quotation.

Business rules applied automatically: - Import is only allowed while the order is still a draft or sent request for quotation; otherwise an error is raised. - The product must be purchasable, belong to the order's company, and match the internal reference exactly; missing or ambiguous references stop the import. - Quantity must be a number greater than zero. - If a description, unit price or analytic account is left empty, Odoo keeps its normal computed value; a filled analytic account is assigned 100% to the line. - If any row has an error, nothing is imported and the errors are listed by row number. - Unknown or duplicated columns, or a missing required column, are reported before anything is created.

After a successful import, a note with the file name and number of lines is logged on the order. The module touches purchase.order, purchase.order.line and the new import wizard purchase.order.line.import.

Depends on

purchasebase_import
Models and fields (3)
  • purchase.order · extends an existing model
  • purchase.order.line · extends an existing model
  • purchase.order.line.import · new modelfile, order_id, file_name, template_file

Text generated by AI (DeepSeek) from reading the Odoo 17.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 17.0

Confirmed on 2026-11-03 in branch 17.0 of OCA/purchase-workflow.

terminal Installation and usage

OCA documentation · Odoo 17.0
  • Open a request for quotation in the RFQ or RFQ Sent state.
  • Click Import Lines.
  • Click Download Template to get an empty spreadsheet with the supported columns. The required columns are highlighted, and each header has a comment that describes it.
  • Fill in one row per line, upload the file and click Import.

The first row of the file must hold the column names. A column is recognized by its name in the language of the user, in English, or by its technical key (default_code, product_qty, name, price_unit, analytic_account), regardless of the case. The order of the columns does not matter.

The imported lines are added after the existing ones, and a message on the order records the file they come from.

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.