create_invoice
Create draft customer invoices or vendor bills with line items, quantities, and prices. Supports multiple move types and leaves posting for later.
Instructions
Create a DRAFT customer invoice or vendor bill.
move_type: "out_invoice" (customer invoice), "out_refund" (credit note), "in_invoice" (vendor bill), "in_refund" (vendor credit note). lines: list of dicts, each with at least "name" (description), "quantity", "price_unit". Optional per line: "product_id", "account_id", "tax_ids" (list of tax ids), "analytic_distribution" (e.g. {"": 100.0}). Always created in draft -- call post_invoice() to post it once you're satisfied.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| lines | Yes | ||
| move_type | No | out_invoice | |
| company_id | No | ||
| journal_id | No | ||
| partner_id | Yes | ||
| currency_id | No | ||
| invoice_date | No |