Account_ar: Argentine localization


We need a module with the data and functionalities necessary to fulfill Argentina’s fiscal obligations:

  • Standard chart of accounts
  • Taxes
  • Tax identification of parties
  • Points of sale
  • Types of invoices
  • Reports for tax declaration


VAT Regime

Every party, whether it is a natural person or a legal person, has a category according to the VAT treatment.

Those currently used are:

  • Responsable Inscripto
  • Sujeto Exento
  • Consumidor Final
  • Responsable Monotributo
  • Sujeto No Categorizado
  • Proveedor del Exterior
  • Cliente del Exterior

The issuing company can only be one of these:

  • Responsable Inscripto
  • Sujeto Exento
  • Responsable Monotributo

Fiscal identification

The fiscal identifier of the parties consists of a Document type and a Number.

The most used Document types are:

  • CUIT
  • CDI
  • DNI
  • LE
  • LC
  • CUIL
  • Pasaporte
  • CI Extranjera
  • Otro

Invoice types

The Invoice type is a combination of a Document and its Class.


The different fiscal documents that can be issued are:

  • Factura
  • Nota de Débito
  • Nota de Crédito
  • Recibo
  • Liquidación
  • Factura de Crédito Electrónica MiPyMEs (FCE)
  • Nota de Débito Electrónica MiPyMEs (FCE)
  • Nota de Crédito Electrónica MiPyMEs (FCE)
  • Ticket
  • Ticket Factura


The classes are:

  • A
  • B
  • C
  • M
  • E

The class of a document is obtained according to the following rules:

<issuer == "Responsable Inscripto">
    <receiver == "Responsable Inscripto">
        class = "A"
    <receiver == "Cliente del Exterior">
        class = "E"
        class = "B"
    class = "C"

That is to say:

  • The “Sujeto Exento” and “Responsable Monotributo” issuers always issue class C documents.
  • The “Responsable Inscripto” issuers issue A, B or E documents according to the customer’s VAT Regime.

Class M is a substitute for A for some companies that have just registered and are controlled by the AFIP for a period.

Point of sale

A fiscal point of sale is an invoice grouper.

The relevant data are:

  • Number
  • Type:
    • Electronic
    • Manual
    • Fiscal Printer
  • WS AFIP:
    • None
    • wsfe: Internal market
    • wsfex: Export
    • wsbfe: Fiscal Bond
  • Invoice types:
    • Invoice type (Ex: Factura A, Factura B, etc.)
    • Sequence (Exclusive or Shared Numbering)

Invoice type example

Gathering the previous concepts we have for example: Factura A 0001-00001234

  • Document: Factura
  • Class: A
  • Point of sale: 1
  • Document number: 1234


It is important to distinguish between two types of taxes, since they are reported separately in sales:

  • VAT
  • Other tributes (National, Provincial, Municipal, Internal, Others)


The different VATs are:

  • [1] No Gravado (Fixed 0)
  • [2] Exento (Fixed 0)
  • [3] 0%
  • [9] 2,50%
  • [8] 5%
  • [4] 10,50%
  • [5] 21%
  • [6] 27%

Which at the same time are classified as:

  • No Gravado: 1
  • Exento: 2
  • Gravado: 3, 4, 5, 6, 8, 9

The VAT is a tax associated with the product or service sold/purchased. The VAT rate of a product/service is always the same, that is, there are no changes in the application rules or exemption per customer.

Other tributes

In this category are the perceptions and internal taxes.

It is necessary to classify these tributes as:

  • [1] Nacional
  • [2] Provincial
  • [3] Municipal
  • [4] Interno
  • [99] Otro

Examples of common Perceptions are:

  • Percepción de Impuesto a las Ganancias
  • Percepción de IVA
  • Percepción de Ingresos Brutos

For some perceptions there may be application/exemption rules or different rates per customer.

It would be useful to indicate, when the jurisdiction of the tax is Provincial or Municipal, to which Province or City it belongs. This could make it easier to automate application rules. Although it may already be possible to handle it manually with tax rules.

Tax identification

To request the authorization of an invoice or to report it in the VAT books, it is necessary to obtain different subtotals from the taxes involved. For this it is necessary to classify and identify taxes accurately.

Some of the required subtotals are:

  • Not Taxed Net Amount: sum of the total amount of the lines whose VAT is “No Gravado”
  • Exempt Amount: sum of the total amount of the lines whose VAT is “Exento”
  • Taxed Net Amount: sum of the net amount of the lines whose VAT is “Gravado” (0% - 2.5% - 5% - 10.5% - 21% - 27%)
  • VAT: sum of the tax of the lines whose VAT is “Gravado”
  • Other tributes (National, Provincial, Municipal, Internal, Others): all taxes other than VAT
  • Amount of National Tax Perceptions
  • Amount of Provincial Tax Perceptions
  • Amount of Municipal Tax Perceptions
  • Internal tax amount

Other data


Each currency has an AFIP Code


Each country has an AFIP Code

Units of measure

Each unit of measure has an AFIP Code


Libro IVA Digital (Digital VAT Book)

Libro IVA Ventas (Sales VAT Book)

Libro IVA Compras (Purchase VAT Book)

Sales per Document type and VAT Regime


  • AFIP: Administración Federal de Ingresos Públicos
  • IVA: Impuesto al Valor Agregado (VAT)
  • Perception: anticipated “collection” of a provincial or national tax on the invoice.


  1. Add a Standard chart of accounts Template

  2. Add field to model (and

ar_afip_code = fields.Char('AFIP Code')
  1. Add Tax codes Template
   - IVA
     - Neto no Gravado
     - Exento
     - Neto Gravado
       - Neto 0%
       - Neto 2,5%
       - Neto 5%
       - Neto 10,5%
       - Neto 21%
       - Neto 27%
     - IVA
       - IVA 0%
       - IVA 2,5%
       - IVA 5%
       - IVA 10,5%
       - IVA 21%
       - IVA 27%
   - Otros tributos
     - Nacionales
       - Percepción de IVA
       - Percepción de Ganancias
     - Provinciales
       - Percepción de Ingresos Brutos
     - Municipales
     - Internos
     - Otros

   - IVA
     - Neto no Gravado
     - Exento
     - Neto Gravado
       - Neto 0%
       - Neto 2,5%
       - Neto 5%
       - Neto 10,5%
       - Neto 21%
       - Neto 27%
     - IVA
       - IVA 0%
       - IVA 2,5%
       - IVA 5%
       - IVA 10,5%
       - IVA 21%
       - IVA 27%
   - Otros tributos
     - Nacionales
       - Percepción de IVA
       - Percepción de Ganancias
     - Provinciales
       - Percepción de Ingresos Brutos
     - Municipales
     - Internos
     - Otros
  1. Add field to model:
ar_vat_regime = fields.Selection([
    ('RI', 'Responsable Inscripto'),
    ('EX', 'Sujeto Exento'),
    ('CF', 'Consumidor Final'),
    ('MO', 'Responsable Monotributo'),
    ('NC', 'Sujeto No Categorizado'),
    ('PE', 'Proveedor del Exterior'),
    ('CE', 'Cliente del Exterior'),
    ], 'VAT Regime')
  1. Add options to the type field in party.identifier model:
('ar_cuit', 'CUIT'),
('ar_foreign', 'CUIT País'),
('ar_dni', 'DNI'),
  1. New model “Invoice type” account.invoice.type (this could be partially in a more generic module)
code = fields.Char('Code')
name = fields.Char('Name')
ar_kind = fields.Selection([
    ('A', 'A'),
    ('B', 'B'),
    ('C', 'C'),
    ('M', 'M'),
    ('E', 'E'),
    ], 'Kind')
  1. Add fields to account.journal model (this could be partially in a more generic module)
invoice_types = fields.One2Many('account.journal.invoice_type', 'journal',
    'Invoice types')
ar_pos_number = fields.Char('POS Number',
    states={'invisible': Eval('type') != 'revenue'})
ar_pos_type = fields.Selection([
    ('manual', 'Manual'),
    ('electronic', 'Electronic'),
    ('fiscal_printer', 'Fiscal Printer'),
    ], 'POS Type'
    states={'invisible': Eval('type') != 'revenue'})
  1. New model “Journal Invoice type” account.journal.invoice_type (this could be in a more generic module)
journal = fields.Many2One('account.journal', 'Journal')
invoice_type = fields.Many2One('account.invoice.type', 'Invoice type')
sequence = fields.Many2One('ir.sequence', 'Sequence')
  1. Add fields to account.invoice model (this could be partially in a more generic module)
invoice_type = fields.Many2One('account.invoice.type', 'Invoice type',
    domain=[('ar_kind', '=', Eval('ar_invoice_type_kind'))])
ar_party_vat_regime = fields.Selection()  # get from party.ar_vat_regime
ar_invoice_type_kind = fields.Function(fields.Selection()):
    if self.company_party.ar_vat_regime == 'Responsable Inscripto':
        if == 'Responsable Inscripto':
            return 'A'
        elif == 'Cliente del Exterior':
            return 'E'
            return 'B'
        return 'C'
  1. Add logic in account.invoice:
  • if the journal has invoice types, then the invoice_type field is required (or could be always required in sales)
  • according to the customer’s VAT regime (ar_party_vat_regime) we will obtain the correct invoice class (A, B, E, etc.)
  • according to the invoice class, the types of invoices in the journal are filtered (ar_kind)
  • once we have the invoice_type we can search the journal for the sequence to use (account.journal.invoice_type)


Among the proposals we mention a new model for Invoice Types associated with the Journals. We think that can be part of a more generic module.

I have a lot of questions and comments about that but as the text is not here I can not properly quote. Could you please put the text here.
Also it will have more chance to succeed if the subject is not divided in much smaller subjects.

I edited the post and added the text of the wiki pages to discuss.

Did you have any links to the oficial documentation of such chart?

Why is needed?

Why not using tax rules? We normally use tax rules to set the customer/supplier vat regime and update the taxes acordingly in the documents (invoices, sales, purchases,etc.)

Should be added to python-stdnum first.

Why is required?

I did not comment at all, but I see you are proposing a lot of solutions but not explaining the problems you are trying to solve.

I completly agree here. Please create several topics. For example:

  • One for the chart of accounts
  • One for taxes
  • Another for invoice numbering


What is the purpose of this combination? What does it imply?

What is the point? Why should the invoice be grouped?

But how does it work when selling to or buy from another country?

What is the purpose of this classification?

This is a not clear what are those tributes nor how they apply.

What is a request of authorization of an invoice?

I think the journal is enough to distinct invoices.