Purchase Order Line Import
purchase_order_line_import_sheet_file · OCA/purchase-workflow
-
Security25/25No findings
-
Activity25/25Human commit this month
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 17.0
Heuristic over the facts below, not an audit · How it's computed
Description
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.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 2
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
purchase_order_form |
purchase.order.form - purchase_order_line_import_sheet_file | purchase.order | form | Inherits purchase.purchase_order_form |
purchase_order_line_import_view_form |
purchase.order.line.import.form | purchase.order.line.import | form | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
No new fields.
Public methods (1)-
action_open_line_import(self)
No new fields.
Public methods (1)-
action_open_line_import(self)
-
fileBinaryattachment=False -
file_nameChar -
order_idMany2one → purchase.ordercomodel_name='purchase.order'ondelete='cascade'required=True -
template_fileBinaryattachment=Falsereadonly=True
-
action_download_template(self) -
action_import(self)
Loading…