E-Invoice Line Item Additional Documentation¶
Overview¶
The E-Invoice Line Item Additional model (account.einvoice.line.item.additional) stores additional classification and origin information for e-invoice line items. It supports tariff codes and country of origin data for customs and compliance purposes.
Model Information¶
Model Name: account.einvoice.line.item.additional
Display Name: E-Invoice Line Item Additional
Key Fields: None (no unique constraint defined)
Features¶
- ❌ Audit logging enabled (
_audit_log) - ❌ Multi-company support (
company_id) - ❌ Full-text content search (
_content_search) - ✅ Cascade delete with invoice
Key Fields Reference¶
All Fields¶
| Field | Type | Required | Description |
|---|---|---|---|
invoice_id |
Many2One | ✅ | Parent invoice (cascade delete) |
number |
Integer | ❌ | Line number |
classification_code_id |
Many2One | ❌ | Product classification code |
description |
Text | ❌ | Item description |
product_tariff |
Decimal | ❌ | Product tariff rate |
country_origin_id |
Many2One | ❌ | Country of origin |
Related Models¶
| Model | Relationship | Description |
|---|---|---|
account.invoice |
Many2One (invoice_id) | Parent invoice |
product.classification.codes |
Many2One | Classification code |
region |
Many2One | Country of origin |
Common Use Cases¶
Use Case 1: Add Additional Line Info¶
# Add additional classification for a line
additional_id = get_model("account.einvoice.line.item.additional").create({
"invoice_id": invoice_id,
"number": 1,
"classification_code_id": class_code_id,
"description": "Electronic components",
"product_tariff": 5.0,
"country_origin_id": china_region_id,
})
Use Case 2: Get Line Additionals¶
# Get additional info for invoice
additionals = get_model("account.einvoice.line.item.additional").search_browse([
["invoice_id", "=", invoice_id]
])
for add in additionals:
origin = add.country_origin_id.name if add.country_origin_id else "N/A"
print(f"Line {add.number}: {add.description}")
print(f" Origin: {origin}, Tariff: {add.product_tariff}%")
Version History¶
Last Updated: December 2024 Model Version: account_einvoice_line_item_additional.py Framework: Netforce
This documentation is generated for developer onboarding and reference purposes.