Repository
OCA/l10n-spain · module folder · Try on Runboat
Module version
1.0.3
Category
Accounting
Folder size
1.62 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/l10n-spain
Last tracking update
2026-08-07 09:06:22
Authors
Odoo Community Association (OCA), Tecnativa, PESOL
Maintainers
Odoo Community Association (OCA), Tecnativa, PESOL
Committers
Víctor Martínez, sygel, OCA-git-bot, oca-ci, adrip-s73, Pablo Cortés
Odoo dependencies
OCA/account-financial-reporting:
OCA/l10n-spain:
OCA/server-ux:
odoo/odoo:
- web
- bus
- uom
Python dependencies
unidecode
System dependencies
None
Required by
None
Description
(Declaración Anual de Operaciones con Terceros) Basado en la Orden
EHA/3012/2008, de 20 de Octubre, por el que se aprueban los diseños
físicos y lógicos del 347.

De acuerdo con la normativa de la Hacienda Española, están obligados a
presentar el modelo 347:

- Todas aquellas personas físicas o jurídicas que no esten acogidas al
  régimen de módulos en el IRPF, de naturaleza pública o privada que
  desarrollen actividades empresariales o profesionales, siempre y
  cuando hayan realizado operaciones que, en su conjunto, respecto de
  otra persona o Entidad, cualquiera que sea su naturaleza o carácter,
  hayan superado la cifra de 3.005,06 € durante el año natural al que se
  refiere la declaración. Para el cálculo de la cifra de 3.005,06 € se
  computan de forma separada las entregas de biene y servicios y las
  adquisiciones de los mismos.
- En el caso de Sociedades Irregulares, Sociedades Civiles y Comunidad
  de Bienes no acogidas el regimen de módulos en el IRPF, deben incluir
  las facturas sin incluir la cuantía del IRPF.
- En el caso de facturas de proveedor con IRPF, no deben ser presentadas
  en este modelo. Se presentan en el modelo 190. Desactivar en la ficha
  del proveedor la opción de "Incluir en el informe 347".

De acuerdo con la normativa, no están obligados a presentar el modelo
347:

- Quienes realicen en España actividades empresariales o profesionales
  sin tener en territorio español la sede de su actividad, un
  establecimiento permanente o su domicilio fiscal.
- Las personas físicas y entidades en régimen de atribución de rentas en
  el IRPF, por las actividades que tributen en dicho impuesto por el
  régimen de estimación objetiva y, simultáneamente, en el IVA por los
  régimenes especiales simplificados o de la agricultura, ganadería y
  pesca o recargo de equivalencia, salvo las operaciones que estén
  excluidas de la aplicación de los expresados regímenes.
- Los obligados tributarios que no hayan realizado operaciones que en su
  conjunto superen la cifra de 3.005,06 €.
- Los obligados tributarios que hayan realizado exclusivamente
  operaciones no declarables.
- Los obligados tributarios que deban informar sobre las operaciones
  incluidas en los libros registro de IVA (modelo 340) salvo que
  realicen operaciones que expresamente deban incluirse en el modelo
  347.

(<http://www.boe.es/boe/dias/2008/10/23/pdfs/A42154-42190.pdf>)

Code Analysis

Views touched (13)
XML IDNameModelTypeStatus
communication_failed 347 communication failed ir.ui.view qweb New
communication_success 347 communication success ir.ui.view qweb New
partner_record_search_view l10n.es.aeat.mod347.partner_record search New
report_347_partner report_347_partner ir.ui.view qweb New
report_347_partner_document report_347_partner_document ir.ui.view qweb New
view_l10n_es_aeat_mod347_partner_record_form l10n.es.aeat.mod347.partner_record form New
view_l10n_es_aeat_mod347_partner_record_tree l10n.es.aeat.mod347.partner_record list New
view_l10n_es_aeat_mod347_real_estate_record_form l10n.es.aeat.mod347.real_estate_record form New
view_l10n_es_aeat_mod347_real_estate_record_tree l10n.es.aeat.mod347.real_estate_record list New
view_l10n_es_aeat_mod347_report_form l10n.es.aeat.mod347.report form Inherits l10n_es_aeat.view_l10n_es_aeat_report_form
view_l10n_es_aeat_mod347_report_tree l10n.es.aeat.mod347.report tree Inherits l10n_es_aeat.view_l10n_es_aeat_report_tree
view_move_form_mod347 account.move.supplier.form.mod347 account.move form Inherits account.view_move_form
view_partner_form_mod347 Partners - Add 'include in 347' res.partner form Inherits l10n_es_aeat.view_partner_form
HTTP endpoints (2)
Route(s)HandlerAuthTypeMethodsFlags
/mod347/accept Mod347Controller.mod347_accept public http GET sudo website
/mod347/reject Mod347Controller.mod347_reject public http GET sudo website
Models touched (7)

New fields (1)
  • not_in_mod347 Boolean
    default=False help='If you mark this field, this invoice will not be included in any AEAT 347 model report.' args: 'Force not included in 347 report'
Public methods (0)

No public methods.

New fields (4)
  • amount Float
    readonly=True
  • date Date
    readonly=True related='move_id.date' store=True string='Date'
  • move_id Many2one → account.move
    comodel_name='account.move' ondelete='restrict' string='Invoice / Journal entry'
  • partner_record_id Many2one → l10n.es.aeat.mod347.partner_record
    comodel_name='l10n.es.aeat.mod347.partner_record' default=<expr> index=True ondelete='cascade' required=True string='Partner record'
Public methods (0)

No public methods.

New fields (33)
  • amount Float
    digits='Account' string='Operations amount' tracking=True
  • bdns_number Char
    help='Reference of Call of the subsidy or assistance in National Grands Database (BDNS).' string='BDNS Call Number'
  • bussiness_real_estate_rent Boolean
    help="Set to identify real estate rent operations aside from the rest. You'll need to fill in the real estate info only when you are the one that receives the money."
  • cash_amount Float
    digits='Account' string='Received cash amount'
  • cash_basis_operation Boolean
    help='Only for cash basis operations. Set to identify cash basis operations aside from the rest.'
  • cash_record_ids Many2many → account.move.line
    comodel_name='account.move.line' readonly=True string='Cash payments'
  • check_ok Boolean
    compute='_compute_check_ok' help='Checked if this record is OK' store=True string='Record is OK'
  • community_vat Char
    help='VAT number for professionals established in other state member without national VAT' size=17 string='Community vat number'
  • error_text Char
    compute='_compute_check_ok' store=True
  • first_quarter Float
    digits='Account' help='Total amount of first quarter in, out and refund invoices for this partner' string='First quarter operations' tracking=True
  • first_quarter_real_estate_transmission Float
    digits='Account' help='Total amount of first quarter real estate transmissions for this partner' string='First quarter real estate'
  • fourth_quarter Float
    digits='Account' help='Total amount of fourth quarter in, out and refund invoices for this partner' string='Fourth quarter operations' tracking=True
  • fourth_quarter_real_estate_transmission Float
    digits='Account' help='Total amount of fourth quarter real estate transmissions for this partner' string='Fourth quarter real estate'
  • insurance_operation Boolean
    help='Only for insurance companies. Set to identify insurance operations aside from the rest.'
  • move_record_ids One2many → l10n.es.aeat.mod347.move.record
    comodel_name='l10n.es.aeat.mod347.move.record' inverse_name='partner_record_id' string='Move records'
  • operation_key Selection
    selection=[('A', 'A - Adquisiciones de bienes y servicios superiores al límite (1)'), ('B', 'B - Entregas de bienes y servicios superiores al límite (1)'), ('C', 'C - Cobros por cuenta de terceros superiores al límite (3)'), ('D', 'D - Adquisiciones efectuadas por Entidades Públicas (...) superiores al límite (1)'), ('E', 'E - Subvenciones, auxilios y ayudas satisfechas por Ad. Públicas superiores al límite (1)'), ('F', 'F - Ventas agencia viaje'), ('G', 'G - Compras agencia viaje')]
  • origin_year Integer
    help='Origin cash operation year'
  • partner_country_code Char
    size=2 string='Country Code'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' required=True string='Partner'
  • partner_state_code Char
    size=2 string='State Code'
  • partner_vat Char
    size=9 string='VAT number'
  • real_estate_transmissions_amount Float
    digits='Account' string='Real Estate Transmisions amount'
  • related_goods_operation Boolean
    help='Only for related goods operations. Set to identify related goods operations aside from the rest.'
  • report_id Many2one → l10n.es.aeat.mod347.report
    comodel_name='l10n.es.aeat.mod347.report' default=<expr> ondelete='cascade' string='AEAT 347 Report'
  • representative_vat Char
    help='Legal Representative VAT number' size=9 string='L.R. VAT number'
  • second_quarter Float
    digits='Account' help='Total amount of second quarter in, out and refund invoices for this partner' string='Second quarter operations' tracking=True
  • second_quarter_real_estate_transmission Float
    digits='Account' help='Total amount of second quarter real estate transmissions for this partner' string='Second quarter real estate'
  • state Selection
    default='pending' selection=[('pending', 'Pending'), ('sent', 'Sent'), ('confirmed', 'Confirmed'), ('exception', 'Exception')] tracking=True
  • tax_person_operation Boolean
    help='Only for taxable person operations. Set to identify taxable person operations aside from the rest.'
  • third_quarter Float
    digits='Account' help='Total amount of third quarter in, out and refund invoices for this partner' string='Third quarter operations' tracking=True
  • third_quarter_real_estate_transmission Float
    digits='Account' help='Total amount of third quarter real estate transmissions for this partner' string='Third quarter real estate'
  • user_id Many2one → res.users
    comodel_name='res.users' copy=False default=<expr> string='Salesperson' tracking=True
  • visible_bdns_number Boolean
    compute='_compute_visible_bdns_number'
Public methods (10)
  • action_confirm(self)
  • action_exception(self)
  • action_pending(self)
  • action_send(self)
  • button_print(self)
  • button_recompute(self)
  • calculate_quarter_totals(self)
    @api.depends('move_record_ids.move_id.date', 'report_id.year')
  • get_confirm_url(self)
  • get_reject_url(self)
  • send_email_direct(self)

New fields (25)
  • address Char
    size=50
  • address_type Char
    size=5
  • amount Float
    digits='Account'
  • block Char
    size=3
  • check_ok Boolean
    compute='_compute_check_ok' help='Checked if this record is OK' store=True string='Record is OK'
  • city Char
    size=30
  • complement Char
    help='Complement (urbanization, industrial park...)' size=40
  • door Char
    size=3
  • error_text Char
    compute='_compute_check_ok' store=True string='Errors'
  • floor Char
    size=3
  • number Integer
  • number_calification Selection
    selection=[('BIS', 'Bis'), ('MOD', 'Mod'), ('DUP', 'Dup'), ('ANT', 'Ant')]
  • number_type Selection
    selection=[('NUM', 'Number'), ('KM.', 'Kilometer'), ('S/N', 'Without number')]
  • partner_id Many2one → res.partner
    comodel_name='res.partner' required=True string='Partner'
  • partner_vat Char
    size=32 string='VAT number'
  • portal Char
    size=3
  • postal_code Char
    size=5
  • reference Char
    size=25 string='Catastral Reference'
  • report_id Many2one → l10n.es.aeat.mod347.report
    comodel_name='l10n.es.aeat.mod347.report' default=<expr> index=1 ondelete='cascade' string='AEAT 347 Report'
  • representative_vat Char
    default=<expr> help='Legal Representative VAT number' size=32 string='L.R. VAT number'
  • situation Selection
    required=True selection=[('1', '1 - Spain but Basque Country and Navarra'), ('2', '2 - Basque Country and Navarra'), ('3', '3 - Spain, without catastral reference'), ('4', '4 - Foreign')] string='Real estate Situation'
  • stairway Char
    size=3
  • state_code Char
    size=2
  • township Char
    size=30
  • township_code Char
    size=5
Public methods (0)

No public methods.

New fields (11)
  • number Char
    default='347'
  • operations_limit Float
    default=3005.06 digits='Account' help='The declaration will include partners with the total of operations over this limit' string='Invoiced Limit (1)'
  • partner_record_ids One2many → l10n.es.aeat.mod347.partner_record
    comodel_name='l10n.es.aeat.mod347.partner_record' inverse_name='report_id' string='Partner Records'
  • real_estate_record_ids One2many → l10n.es.aeat.mod347.real_estate_record
    comodel_name='l10n.es.aeat.mod347.real_estate_record' inverse_name='report_id' string='Real Estate Records'
  • received_cash_limit Float
    default=6000.0 digits='Account' help='The declaration will show the total of cash operations over this limit' string='Received cash Limit (2)'
  • total_amount Float
    compute='_compute_totals' store=True string='Amount'
  • total_cash_amount Float
    compute='_compute_totals' store=True string='Cash Amount'
  • total_partner_records Integer
    compute='_compute_totals' store=True string='Partners records'
  • total_real_estate_amount Float
    compute='_compute_totals_real_estate' store=True string='Real Estate Amount'
  • total_real_estate_records Integer
    compute='_compute_totals_real_estate' store=True string='Real estate records'
  • total_real_estate_transmissions_amount Float
    compute='_compute_totals' store=True string='Real Estate Transmissions Amount'
Public methods (4)
  • btn_list_records(self)
  • button_confirm(self)
    Different check out in report
  • button_send_mails(self)
  • calculate(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • not_in_mod347 Boolean
    company_dependent=True default=False help='If you mark this field, this partner will not be included in any AEAT 347 model report, independently from the total amount of its operations.' args: 'Not included in 347 report'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…