Skip to content

E-Invoice Fee/Charge Documentation

Overview

The E-Invoice Fee/Charge model (account.einvoice.fee.charge) stores document-level fees and charges for e-invoices. Each record represents an additional fee or charge that applies to the overall invoice.


Model Information

Model Name: account.einvoice.fee.charge Display Name: E-Invoice Fee/Charge 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 Fee/charge line number
amount Decimal Fee/charge amount
rate Decimal Fee/charge rate percentage
description Text Fee/charge description

Model Relationship Description
account.invoice Many2One (invoice_id) Parent invoice

Common Use Cases

Use Case 1: Add Service Fee

# Add document-level fee
fee_id = get_model("account.einvoice.fee.charge").create({
    "invoice_id": invoice_id,
    "number": 1,
    "amount": 50.00,
    "description": "Handling fee",
})

Use Case 2: Get Invoice Fees

# Get all fees for an invoice
fees = get_model("account.einvoice.fee.charge").search_browse([
    ["invoice_id", "=", invoice_id]
])

total_fees = sum(f.amount or 0 for f in fees)
print(f"Total fees: {total_fees}")

Version History

Last Updated: December 2024 Model Version: account_einvoice_feecharge.py Framework: Netforce


This documentation is generated for developer onboarding and reference purposes.