Sale Order Lines¶
This page documents how to use the manager and record objects for sale order lines.
Details¶
| Name | Value | 
|---|---|
| Odoo Modules | Sales, OpenStack Integration | 
| Odoo Model Name | sale.order.line | 
| Manager | sale_order_lines | 
| Record Type | SaleOrderLine | 
Manager¶
The sale order line manager is available as the sale_order_lines
attribute on the Odoo client object.
>>> from openstack_odooclient import Client as OdooClient
>>> odoo_client = OdooClient(
...     hostname="localhost",
...     port=8069,
...     protocol="jsonrpc",
...     database="odoodb",
...     user="test-user",
...     password="<password>",
... )
>>> odoo_client.sale_order_lines.get(1234)
SaleOrderLine(record={'id': 1234, ...}, fields=None)
For more information on how to use managers, refer to Managers.
Record¶
The sale order line manager returns SaleOrderLine record objects.
To import the record class for type hinting purposes:
The record class currently implements the following fields and methods.
For more information on attributes and methods common to all record types, see Record Attributes and Methods.
company_id¶
The ID for the company this sale order line was generated for.
company_name¶
The name of the company this sale order line was generated for.
company¶
The company this sale order line was generated for.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
currency_id¶
The ID for the currency used in this sale order line.
currency_name¶
The name of the currency used in this sale order line.
currency¶
The currency used in this sale order line.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
discount¶
Discount percentage on the sale order line (0-100).
display_name¶
Display name for the sale order line in the sale order.
invoice_line_ids¶
A list of IDs for the account move (invoice) lines created from this sale order line.
invoice_lines¶
The account move (invoice) lines created from this sale order line.
This fetches the full records from Odoo once, and caches them for subsequent accesses.
invoice_status¶
The current invoicing status of this sale order line.
Values:
no- Nothing to invoiceto invoice- Has quantity that needs to be invoicedinvoiced- Fully invoicedupselling- Upselling opportunity
is_downpayment¶
Whether or not this sale order line is a downpayment.
is_expense¶
Whether or not this sale order line is an expense.
name¶
Name assigned to the the sale order line.
This is not the same as the product name. In the OpenStack Integration add-on, this is normally used to store the resource's name.
order_id¶
The ID for the sale order this line is linked to.
order_name¶
The name of the sale order this line is linked to.
order¶
The sale order this line is linked to.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
order_partner_id¶
The ID for the recipient partner for the sale order.
order_partner_name¶
The name of the recipient partner for the sale order.
order_partner¶
The recipient partner for the sale order.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
os_project_id¶
The ID for the the OpenStack project this sale order line was was generated for.
os_project_name¶
The name of the the OpenStack project this sale order line was was generated for.
os_project¶
The OpenStack project this sale order line was was generated for.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
os_region¶
The OpenStack region the sale order line was created from.
os_resource_id¶
The OpenStack resource ID for the resource that generated this sale order line.
os_resource_name¶
The name of the OpenStack resource tier or flavour, as used by services such as Distil for rating purposes.
For example, if this is the sale order line for a compute instance, this would be set to the instance's flavour name.
os_resource_type¶
A human-readable description of the type of resource captured by this sale order line.
price_reduce¶
Base unit price, less discount (see the discount field).
price_reduce_taxexcl¶
Actual unit price, excluding tax.
price_reduce_taxinc¶
Actual unit price, including tax.
price_subtotal¶
Subtotal price for the sale order line, excluding tax.
price_tax¶
Tax charged on the sale order line.
price_total¶
Total price for the sale order line, including tax.
price_unit¶
Base unit price, excluding tax, before any discounts.
product_id¶
The ID of the product charged on this sale order line.
product_name¶
The name of the product charged on this sale order line.
product¶
The product charged on this sale order line.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
product¶
The ID for the Unit of Measure for the product being charged in this sale order line.
product_uom_name¶
The name of the Unit of Measure for the product being charged in this sale order line.
product_uom¶
The Unit of Measure for the product being charged in this sale order line.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
product_uom_qty¶
The product quantity on the sale order line.
product_uom_readonly¶
Whether or not the product quantity can still be updated on this sale order line.
product_updatable¶
Whether or not the product can be edited on this sale order line.
qty_invoiced¶
The product quantity that has already been invoiced.
qty_to_invoice¶
The product quantity that still needs to be invoiced.
salesman_id¶
The ID for the salesperson partner assigned to this sale order line.
salesman_name¶
The name of the salesperson partner assigned to this sale order line.
salesman¶
The salesperson partner assigned to this sale order line.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
state¶
State of the sale order.
Values:
draft- Draft sale order (quotation), can still be modifiedsale- Finalised sale order, cannot be modifieddone- Finalised and settled sale order, cannot be modifiedcancel- Cancelled sale order, can be deleted
tax_id¶
The ID for the tax used on this sale order line.
tax_name¶
The name of the tax used on this sale order line.
tax¶
The tax used on this sale order line.
This fetches the full record from Odoo once, and caches it for subsequent accesses.
untaxed_amount_invoiced¶
The balance, excluding tax, on the sale order line that has already been invoiced.
untaxed_amount_to_invoice¶
The balance, excluding tax, on the sale order line that still needs to be invoiced.