| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/l10n-brazil |
| GIT | |
| GIT | https://github.com/OCA/l10n-brazil.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/l10n-brazil/tree/16.0/l10n_br_cnab_structure |
| VERSION | |
| VERSION | 3.2.0 |
| CATEGORY | |
| CATEGORY | Uncategorized |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Escodoo, Engenere |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Escodoo, Engenere |
| COMMITTERS | |
| COMMITTERS | Raphaël Valyi, Weblate, OCA-git-bot, oca-ci, Antonio Neto, Antônio Neto, Kaynnan Lemes, CristianoMafraJunior, kaynnan |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/l10n-brazil |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 19:11:55 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
OCA/account-payment: - account_due_list - account_due_list_payment_mode OCA/bank-payment: - account_payment_order - account_payment_partner - account_payment_mode OCA/l10n-brazil: - l10n_br_account_payment_order - l10n_br_base - l10n_br_account_due_list - l10n_br_coa_generic - l10n_br_coa odoo/odoo: - base - base_setup - web - base_address_extended - account - product - bus - web_tour - uom - analytic - portal - web_editor - http_routing - auth_signup - digest - resource - base_iban |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES |
pyyaml unidecode erpbrasil.base email-validator num2words phonenumbers |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | This module adds functionality for implementing brazilian banking automation by CNAB file exchange. |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
cnab_batch_form_view |
l10n_br_cnab.batch | form | New | |
cnab_batch_tree_view |
l10n_br_cnab.batch | tree | New | |
cnab_import_wizard |
cnab.import.wizard.form | cnab.import.wizard | form | New |
cnab_line_field_form_view |
l10n_br_cnab.line.field | form | New | |
cnab_line_field_group_condition_form_view |
cnab.line.group.field.condition | form | New | |
cnab_line_field_group_form_view |
cnab.line.field.group | form | New | |
cnab_line_field_tree_view |
l10n_br_cnab.line.field | tree | New | |
cnab_line_fields_group_condition_tree_view |
cnab.line.group.field.condition | tree | New | |
cnab_line_fields_group_tree_view |
cnab.line.field.group | tree | New | |
cnab_line_form_view |
l10n_br_cnab.line | form | New | |
cnab_line_tree_view |
l10n_br_cnab.line | tree | New | |
cnab_operation_form |
cnab.data.management.form | cnab.data.management | form | New |
cnab_operation_kanban |
cnab.data.management.kanban | cnab.data.management | kanban | New |
cnab_operation_search |
cnab.data.management.search | cnab.data.management | search | New |
cnab_operation_tree |
cnab.data.management.tree | cnab.data.management | tree | New |
cnab_preview_wizard_form |
cnab.preview.wizard.form | cnab.preview.wizard | form | New |
cnab_structure_form_view |
l10n_br_cnab.structure | form | New | |
cnab_structure_payment_mode_form |
cnab_structure_payment_mode_form | account.payment.mode | group | Inherits l10n_br_account_payment_order.l10n_br_account_payment_mode_form |
cnab_structure_payment_order_form |
cnab_structure_payment_order_form | account.payment.order | field | Inherits account_payment_order.account_payment_order_form |
cnab_structure_tree_view |
l10n_br_cnab.structure | tree | New | |
field_select_wizard_form |
field.select.wizard.form | field.select.wizard | form | New |
journal_cnab_import_view_form |
journal.cnab.import.view.form | account.journal | xpath | Inherits account.view_account_journal_form |
l10n_br_cnab_return_event_form_view_structure |
l10n_br_cnab.return.event.form.view.structure | l10n_br_cnab.return.event | form | New |
l10n_br_cnab_return_log_form_view_structure |
l10n_br_cnab.return.log.form.view.structure | l10n_br_cnab.return.log | form | New |
l10n_br_cnab_return_log_tree_view_structure |
l10n_br_cnab.return.log.tree | l10n_br_cnab.return.log | tree | New |
default_outbound_cnab_processor
Selection
help='CNAB Processor to be used in a payment order when it is not defined in the payment mode'
selection=[('oca_processor', 'OCA Processor')]
string='CNAB Processor'
default_outbound_cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
help='CNAB Structure to be used in a payment order when it is not defined in the payment mode.'
string='CNAB Structure'
inbound_discount_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Discount Account for CNAB inbound payments.'
string='Inbound Discount Account'
tracking=True
inbound_interest_fee_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Interest and Fees Account for CNAB inbound payments.'
string='Inbound Interest and Fees Account'
tracking=True
inbound_rebate_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Rebate Account for CNAB inbound payments.'
string='Inbound Rebate Account'
tracking=True
outbound_discount_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Discount Account for CNAB outbound payments.'
string='Outbound Discount Account'
tracking=True
outbound_interest_fee_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Interest and Fees Account for CNAB outbound payments.'
string='Outbound Interest and Fees Account'
tracking=True
outbound_rebate_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Rebate Account for CNAB outbound payments.'
string='Outbound Rebate Account'
tracking=True
tariff_charge_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Default account for bank tariff.'
string='Tariff Account'
tracking=True
used_to_import_cnab
Boolean
string='Journal used for import CNAB'
No public methods.
batch_template_id
Many2one → l10n_br_cnab.batch
comodel_name='l10n_br_cnab.batch'
compute='_compute_batch_template_id'
cnab_beneficiary_name
Char
compute='_compute_cnab_beneficiary_name'
help='Name of the beneficiary (Nome do Favorecido) that will be informed in the CNAB.'
cnab_payment_way_id
Many2one → cnab.payment.way
comodel_name='cnab.payment.way'
compute='_compute_cnab_payment_way_id'
cnab_pix_transfer_type_id
Many2one → cnab.pix.transfer.type
comodel_name='cnab.pix.transfer.type'
compute='_compute_cnab_pix_transfer_type_id'
store=False
cnab_pix_type_id
Many2one → cnab.pix.key.type
comodel_name='cnab.pix.key.type'
compute='_compute_cnab_pix_type_id'
store=False
service_type
Selection
compute='_compute_cnab_payment_way_id'
selection=TIPO_SERVICO
store=True
No public methods.
cnab_payment_way_ids
Many2many → cnab.payment.way
comodel_name='cnab.payment.way'
domain="[('cnab_structure_id', '=', cnab_structure_id)]"
relation='payment_mode_cnab_payment_way_rel'
string='CNAB Payment Ways'
cnab_structure_id
Many2one → l10n_br_cnab.structure
cnab_structure_ok
Boolean
default=False
string='Allowed in CNAB (OCA Processor)'
No public methods.
cnab_processor
Selection
compute='_compute_cnab_processor'
selection='_selection_cnab_processor'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
compute='_compute_cnab_structure_id'
generate_payment_file(self)
generated2uploaded(self)
backup_file
Binary
attachment=True
copy=False
readonly=True
backup_filename
Char
copy=False
company_id
Many2one → res.company
default=<expr>
required=True
string='Company'
args: 'res.company'
csv_file
Binary
attachment=True
help='Upload the CSV file for restore operations.'
csv_filename
Char
detected_model
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_detected_model'
help='Model detected automatically from the uploaded CSV filename.'
store=True
is_complete_backup
Boolean
default=True
help='If checked, all CNAB models will be backed up.'
string='Complete Backup'
is_locked
Boolean
compute='_compute_is_locked'
help='Operation is locked when completed, in error, or manually locked.'
store=True
name
Char
default=<expr>
required=True
string='Operation Name'
tracking=True
operation_status
Selection
copy=False
default='draft'
required=True
selection=OPERATION_STATUS
string='Status'
tracking=True
operation_type
Selection
default='backup'
required=True
selection=OPERATION_TYPE
tracking=True
records_processed
Integer
copy=False
default=0
readonly=True
target_model
Selection
default='complete'
help="Select the model to backup or choose 'Complete Backup' for all."
selection=TARGET_MODELS_SELECTION
tracking=True
action_lock_operation(self)
action_process_operation(self)
action_reset_to_draft(self)
unlink(self)
write(self, vals)
bank_account_cnab_id
Many2one → account.account
comodel_name='account.account'
related='journal_id.default_account_id'
bank_id
Many2one → res.bank
comodel_name='res.bank'
related='journal_id.bank_id'
cnab_format
Char
related='cnab_structure_id.cnab_format'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
domain="[('bank_id', '=', bank_id),('payment_method_id', 'in', payment_method_ids),('state', '=', 'approved')]"
company_id
Many2one → res.company
comodel_name='res.company'
default=<expr>
required=True
string='Company'
filename
Char
journal_id
Many2one → account.journal
comodel_name='account.journal'
help='Only journals where the CNAB Import is allowed.'
required=True
payment_method_ids
Many2many → account.payment.method
comodel_name='account.payment.method'
compute='_compute_payment_method_ids'
return_file
Binary
type
Selection
import_cnab(self)
cnab_line_id
Many2one → l10n_br_cnab.line
ondelete='cascade'
required=True
states={'draft': [('readonly', False)]}
args: 'l10n_br_cnab.line'
condition_ids
One2many → cnab.line.group.field.condition
comodel_name='cnab.line.group.field.condition'
inverse_name='cnab_group_id'
readonly=True
states={'draft': [('readonly', False)]}
field_ids
One2many → l10n_br_cnab.line.field
comodel_name='l10n_br_cnab.line.field'
domain="[('cnab_line_id', '=', cnab_line_id)]"
inverse_name='cnab_group_id'
readonly=True
states={'draft': [('readonly', False)]}
name
Char
states={'draft': [('readonly', False)]}
state
Selection
readonly=True
related='cnab_line_id.state'
default_get(self, fields)
cnab_group_id
Many2one → cnab.line.field.group
comodel_name='cnab.line.field.group'
readonly=True
states={'draft': [('readonly', False)]}
cnab_line_id
Many2one → l10n_br_cnab.line
comodel_name='l10n_br_cnab.line'
related='cnab_group_id.cnab_line_id'
field_id
Many2one → l10n_br_cnab.line.field
comodel_name='l10n_br_cnab.line.field'
domain="[('cnab_line_id', '=', cnab_line_id)]"
readonly=True
states={'draft': [('readonly', False)]}
json_value
Char
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Value (JSON format)'
operator
Selection
default='in'
readonly=True
required=True
selection=[('in', 'in'), ('not in', 'not in')]
states={'draft': [('readonly', False)]}
state
Selection
readonly=True
related='cnab_group_id.state'
default_get(self, fields_list)
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
string='Cnab Structure'
code
Char
required=True
description
Char
gen_liquidation_move
Boolean
help='Mark this option if this occurrence corresponds to a liquidation move.'
string='Generate Liquidation Move'
name
Char
compute='_compute_name'
No public methods.
batch_id
Many2one → l10n_br_cnab.batch
comodel_name='l10n_br_cnab.batch'
string='Cnab Batch'
clearinghouse_code
Char
help='Centralizing Clearing House Code\n(Código da Câmara Centralizadora)'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
string='Cnab Structure'
code
Char
required=True
description
Char
name
Char
compute='_compute_name'
No public methods.
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
string='Cnab Structure'
code
Char
required=True
description
Char
key_type
Selection
required=True
selection=PartnerPix.KEY_TYPES
string='PIX Key Type'
name
Char
compute='_compute_name'
No public methods.
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
string='Cnab Structure'
code
Char
required=True
description
Char
name
Char
compute='_compute_name'
type_domain
Selection
selection=AccountPaymentLine.PIX_TRANSFER_TYPES
string='Transfer Type'
No public methods.
cnab_file
Binary
string='CNAB File'
cnab_file_name
Char
compute='_compute_cnab_file_name'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
output
Text
string='CNAB Text Output'
output_yaml
Text
compute='_compute_cnab_txt'
string='CNAB YAML Output'
payment_order_id
Many2one → account.payment.order
comodel_name='account.payment.order'
string='Payment Order'
load_file(self)
cnab_field_id
Many2one → l10n_br_cnab.line.field
comodel_name='l10n_br_cnab.line.field'
string='CNAB Field'
current_view
Char
model_id
Many2one → ir.model
string='Related Model'
args: 'ir.model'
new_field_id
Many2one → ir.model.fields
comodel_name='ir.model.fields'
domain="[('model_id', '=', parent_model_id)]"
notation_field
Char
notation_field_view
Char
compute='_compute_notation_field_view'
parent_model_id
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_parent_model_id'
string='Parent Model'
action_add_field(self)
action_confirm(self)
action_remove_last_field(self)
cnab_payment_way_ids
One2many → cnab.payment.way
comodel_name='cnab.payment.way'
domain="[('cnab_structure_id', '=', cnab_structure_id)]"
help='Payments ways that use the structure of this batch.'
inverse_name='batch_id'
readonly=True
states={'draft': [('readonly', False)]}
string='Payments Ways'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
domain="[('cnab_format', '=', '240')]"
help='Only structures with code equal to 240 is allowed.'
readonly=True
states={'draft': [('readonly', False)]}
line_ids
One2many → l10n_br_cnab.line
comodel_name='l10n_br_cnab.line'
domain="[('cnab_format', '=', '240')]"
help='Only structures with code equal to 240 is allowed.'
inverse_name='batch_id'
readonly=True
states={'draft': [('readonly', False)]}
name
Char
readonly=True
states={'draft': [('readonly', False)]}
state
Selection
default='draft'
readonly=True
selection=[('draft', 'Draft'), ('review', 'Review'), ('approved', 'Approved')]
check_batch(self)
get_header(self)
get_segments(self)
get_trailer(self)
output(self, bank_lines, seq_batch)
unlink(self)
batch_id
Many2one → l10n_br_cnab.batch
comodel_name='l10n_br_cnab.batch'
ondelete='cascade'
readonly=True
states={'draft': [('readonly', False)]}
cnab_format
Char
related='cnab_structure_id.cnab_format'
states={'draft': [('readonly', False)]}
cnab_payment_way_ids
Many2many → cnab.payment.way
comodel_name='cnab.payment.way'
domain="[('cnab_structure_id', '=', cnab_structure_id)]"
help='Payment Ways that must use this segment.'
readonly=True
states={'draft': [('readonly', False)]}
string='Payments Ways'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
readonly=True
required=True
states={'draft': [('readonly', False)]}
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
readonly=True
required=True
states={'draft': [('readonly', False)]}
communication_flow
Selection
required=True
states={'draft': [('readonly', False)]}
args: [('sending', 'Sending'), ('return', 'Return'), ('both', 'Sending and Return')]
content_dest_model_id
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_dest_source_model_id'
help='Related model that will provide the destination of the contents of return CNAB files.'
states={'draft': [('readonly', False)]}
string='Content Destination'
content_source_model_id
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_content_source_model_id'
help='Related model that will provide the origin of the contents of CNABfiles.'
states={'draft': [('readonly', False)]}
string='Content Source'
current_view
Selection
default='general'
required=True
states={'draft': [('readonly', False)]}
args: [('general', 'General'), ('sending', 'Sending'), ('return', 'Return')]
field_ids
One2many → l10n_br_cnab.line.field
comodel_name='l10n_br_cnab.line.field'
inverse_name='cnab_line_id'
readonly=True
states={'draft': [('readonly', False)]}
group_ids
One2many → cnab.line.field.group
comodel_name='cnab.line.field.group'
inverse_name='cnab_line_id'
readonly=True
states={'draft': [('readonly', False)]}
name
Char
compute='_compute_name'
store=True
requerid
Boolean
states={'draft': [('readonly', False)]}
resource_ref
Reference
selection='_selection_target_model'
states={'draft': [('readonly', False)]}
string='Reference'
segment_code
Char
states={'draft': [('readonly', False)]}
sequence
Integer
readonly=True
states={'draft': [('readonly', False)]}
state
Selection
default='draft'
readonly=True
selection=[('draft', 'Draft'), ('review', 'Review'), ('approved', 'Approved')]
type
Selection
readonly=True
states={'draft': [('readonly', False)]}
args: [('header', 'Header'), ('segment', 'Segment'), ('trailer', 'Trailer')]
action_general_view(self)
action_return_view(self)
action_sending_view(self)
check_line(self)
is_requerid(self, payment_way)
output(self, resource_ref, record_type, **kwargs)
unlink(self)
assumed_comma
Integer
help='indicates the position of the comma within a numeric field.'
readonly=True
states={'draft': [('readonly', False)]}
cnab_group_id
Many2one → cnab.line.field.group
readonly=True
states={'draft': [('readonly', False)]}
args: 'cnab.line.field.group'
cnab_line_id
Many2one → l10n_br_cnab.line
ondelete='cascade'
readonly=True
required=True
states={'draft': [('readonly', False)]}
args: 'l10n_br_cnab.line'
computed_name
Char
compute='_compute_name'
string='Field'
content_dest_field
Char
help='Inform the field with the origin of the content, expressed with dot notation.'
readonly=True
states={'draft': [('readonly', False)]}
string='Content Destination Field'
content_dest_model_id
Many2one → ir.model
comodel_name='ir.model'
related='cnab_line_id.content_dest_model_id'
content_source_field
Char
help='Inform the field with the origin of the content, expressed with dot notation.'
readonly=True
states={'draft': [('readonly', False)]}
content_source_model_id
Many2one → ir.model
comodel_name='ir.model'
related='cnab_line_id.content_source_model_id'
default_value
Char
readonly=True
states={'draft': [('readonly', False)]}
end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='End Position'
meaning
Char
readonly=True
states={'draft': [('readonly', False)]}
name
Char
readonly=True
states={'draft': [('readonly', False)]}
notes
Char
readonly=True
states={'draft': [('readonly', False)]}
preview_field
Char
compute='_compute_preview_field'
ref_name
Char
compute='_compute_ref_name'
help="Unique reference name to identify the cnab field, can be used to search the field content in python expressions in 'Dynamic Content'. It is generated automatically by aggregating the field name, starting position and ending position. ex:. 'field_name_001-015'"
string='Reference Name'
related_field_id
Many2one → ir.model.fields
readonly=True
states={'draft': [('readonly', False)]}
args: 'ir.model.fields'
resource_ref
Reference
related='cnab_line_id.resource_ref'
string='Reference'
return_dynamic_content
Char
readonly=True
states={'draft': [('readonly', False)]}
sending_dynamic_content
Char
help="Expression in Python to define the final value of the content,you can use the following predefined words:\n\n'content' returns the value of the mapped content source field.\n'time' class to handle date.\n'seq_batch' returns the batch sequence.\n'seq_record_detail' returns the sequence for detail record in the batch.\n'payment_way_code' return the batch payment way\n'payment_type_code' return the batch payment type\n'qty_batches' returns the number of batches\n'qty_records' returns the number of records\n'batch_detail_lines' returns a list of batch detail records.'segment_code' returns the code of the segment defined in the header of the line."
readonly=True
states={'draft': [('readonly', False)]}
size
Integer
compute='_compute_size'
start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Start Position'
state
Selection
default='draft'
readonly=True
selection=[('draft', 'Draft'), ('review', 'Review'), ('approved', 'Approved')]
type
Selection
readonly=True
states={'draft': [('readonly', False)]}
args: [('alpha', _('Alphanumeric')), ('num', _('Numeric'))]
action_approve(self)
action_change_field(self)
action_change_field_return(self)
action_change_field_sending(self)
action_draft(self)
action_review(self)
check_field(self)
eval_compute_value(self, content, python_expression, **kwargs)
format(self, size, value_type, value)
output(self, resource_ref, **kwargs)
unlink(self)
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
match_bank_type
Selection
default='any'
required=True
args: [('same', 'Same Bank'), ('other', 'Other Bank'), ('any', 'Any')]
match_partner_type
Selection
default='any'
required=True
args: [('employee', 'Employee'), ('supplier', 'Supplier'), ('any', 'Any')]
payment_way_id
Many2one → cnab.payment.way
comodel_name='cnab.payment.way'
domain="[('cnab_structure_id', '=', cnab_structure_id)]"
required=True
sequence
Integer
default=10
service_type
Selection
required=True
selection=TIPO_SERVICO
No public methods.
additional_info
Char
balance
Float
compute='_compute_balance'
help='Balance = Payment Value + Discount Value + Rebate Value - Fees'
bank_code
Char
batch_code
Char
centralizing_chamber_code
Char
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
related='cnab_return_log_id.cnab_structure_id'
doc_purpose
Char
expected_payment_date
Date
gen_liquidation_move
Boolean
help='If check, this CNAB Event will generate a liquidity move line.'
string='Generate Liquidation Move'
generated_move_id
Many2one → account.move
comodel_name='account.move'
journal_id
Many2one → account.journal
comodel_name='account.journal'
related='cnab_return_log_id.journal_id'
move_line_ids
Many2many → account.move.line
comodel_name='account.move.line'
ondelete='restrict'
move_type_code
Char
occurrence_code_1
Char
occurrence_code_2
Char
occurrence_code_3
Char
occurrence_code_4
Char
occurrence_code_5
Char
partner_bank_account
Char
partner_bank_account_dac
Char
partner_bank_branch
Char
partner_bank_code
Char
partner_document
Char
help="Partners's document number, it can be a CNPJ or CPF."
partner_name
Char
partner_notification
Char
record_type
Char
seq_number
Char
state
Selection
selection=[('error', 'Error'), ('ignored', 'Ignored'), ('ready', 'Ready to Genereta Move'), ('confirmed', 'Confirmed')]
ted_purpose
Char
action_ignore_event(self)
check_gen_liquidation_move(self)
confirm_event(self)
create(self, vals)
create_liq_move(self)
create_tariff_move(self)
get_description_occurrence(self, event_code)
load_bank_payment_line(self)
load_description_occurrences(self)
set_move_line_ids(self)
set_occurrence_date(self)
bank_acc_number
Char
compute='_compute_bank_acc_number'
inverse='_inverse_bank_acc_number'
bank_account_cnab_id
Many2one → account.account
comodel_name='account.account'
readonly=True
related='journal_id.default_account_id'
bank_id
Many2one → res.bank
comodel_name='res.bank'
related='journal_id.bank_id'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
cnpj_cpf
Char
company_id
Many2one → res.company
comodel_name='res.company'
string='Company'
header_file
Char
journal_id
Many2one → account.journal
comodel_name='account.journal'
return_file
Binary
state
Selection
selection=[('draft', 'Draft'), ('confirmed', 'Confirmed')]
type
Selection
action_confirm_return_log(self)
unlink(self)
seq_number
Char
No public methods.
bank_id
Many2one → res.bank
comodel_name='res.bank'
readonly=True
states={'draft': [('readonly', False)]}
batch_ids
One2many → l10n_br_cnab.batch
comodel_name='l10n_br_cnab.batch'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
cnab_format
Char
related='payment_method_id.code'
cnab_occurrence_ids
One2many → cnab.occurrence
comodel_name='cnab.occurrence'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
cnab_payment_rule_ids
One2many → l10n_br_cnab.payment.rule
comodel_name='l10n_br_cnab.payment.rule'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
string='Payment Rules'
cnab_payment_way_ids
One2many → cnab.payment.way
comodel_name='cnab.payment.way'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
cnab_pix_key_type_ids
One2many → cnab.pix.key.type
comodel_name='cnab.pix.key.type'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
cnab_pix_transfer_type_ids
One2many → cnab.pix.transfer.type
comodel_name='cnab.pix.transfer.type'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
conf_bank_end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Bank Last Position'
conf_bank_start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Bank Start Position'
conf_batch_end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Batch Last Position'
conf_batch_start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Batch Start Position'
conf_detail_end_pos
Integer
help='Last position of sequencial identification of Detail Records. Only for detail records.'
readonly=True
states={'draft': [('readonly', False)]}
conf_detail_start_pos
Integer
help='Position of sequencial identification of Detail Records. Only for detail records.'
readonly=True
states={'draft': [('readonly', False)]}
conf_payment_way_end_pos
Integer
help='Payment Way last position in Header Batch Records. Only for Header Batch Records.'
readonly=True
states={'draft': [('readonly', False)]}
conf_payment_way_start_pos
Integer
help='Payment Way start position in Header Batch Records. Only for Header Batch Records.'
readonly=True
states={'draft': [('readonly', False)]}
conf_record_type_end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Record Type Last Position'
conf_record_type_start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Record Type Start Position'
conf_segment_end_pos
Integer
help='Last position of segment of an detail record. Only for detail records.'
readonly=True
states={'draft': [('readonly', False)]}
conf_segment_start_pos
Integer
help='Start position of segment of an detail record. Only for detail records.'
readonly=True
states={'draft': [('readonly', False)]}
content_source_model_id
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_content_source_model_id'
help='Related model that will provide the origin of the contents of CNAB files.'
string='Content Source'
line_ids
One2many → l10n_br_cnab.line
comodel_name='l10n_br_cnab.line'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
name
Char
readonly=True
states={'draft': [('readonly', False)]}
payment_method_id
Many2one → account.payment.method
comodel_name='account.payment.method'
domain=[('code', 'in', CNAB_CODES)]
states={'draft': [('readonly', False)]}
payment_type
Selection
related='payment_method_id.payment_type'
record_type_batch_header_id
Integer
help='What`s the identification for header of batch type?'
readonly=True
states={'draft': [('readonly', False)]}
string='Batch Header Type ID'
record_type_batch_trailer_id
Integer
help='What`s the identification for trailer of batch type?'
readonly=True
states={'draft': [('readonly', False)]}
string='Batch Trailer Type ID'
record_type_detail_id
Integer
help='What`s the identification for detail type?'
readonly=True
states={'draft': [('readonly', False)]}
string='Detail Type ID'
record_type_file_header_id
Integer
help='What`s the identification for header of file type?'
readonly=True
states={'draft': [('readonly', False)]}
string='File Header Type ID'
record_type_file_trailer_id
Integer
help='What`s the identification for trailer of file type?'
readonly=True
states={'draft': [('readonly', False)]}
string='File Trailer Type ID'
state
Selection
default='draft'
readonly=True
selection=[('draft', 'Draft'), ('review', 'Review'), ('approved', 'Approved')]
unique_seq_per_segment
Boolean
default=False
help='Defines seq_record_detail behavior. If True, each physical segment gets a unique number (1,2,3...). If False, segments within the same bank line share the same number. Note: This differs from seq_batch (starts at 0001 per file).'
readonly=True
states={'draft': [('readonly', False)]}
string='Unique Sequence per Segment'
action_approve(self)
action_draft(self)
action_review(self)
check_structure(self)
get_header(self)
get_trailer(self)
output(self, pay_order)
output_dicts(self, pay_order)
output_yaml(self, pay_order)
unlink(self)
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/l10n-brazil |
| GIT | |
| GIT | https://github.com/OCA/l10n-brazil.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/l10n-brazil/tree/15.0/l10n_br_cnab_structure |
| VERSION | |
| VERSION | 1.0.0 |
| CATEGORY | |
| CATEGORY | Uncategorized |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Escodoo, Engenere |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Escodoo, Engenere |
| COMMITTERS | |
| COMMITTERS | Weblate, OCA-git-bot, oca-ci, Antônio Neto |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/l10n-brazil |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:46:31 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
OCA/account-payment: - account_due_list - account_due_list_payment_mode OCA/bank-payment: - account_payment_order - account_payment_partner - account_payment_mode OCA/l10n-brazil: - l10n_br_account_payment_order - l10n_br_base - l10n_br_account_due_list - l10n_br_coa_generic - l10n_br_coa odoo/odoo: - base - base_setup - web - base_address_city - base_address_extended - account - product - bus - web_tour - uom - analytic - portal - web_editor - http_routing - auth_signup - digest - resource - base_iban |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES |
pyyaml unidecode erpbrasil.base email-validator num2words phonenumbers lxml |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
cnab_batch_form_view |
l10n_br_cnab.batch | form | New | |
cnab_batch_tree_view |
l10n_br_cnab.batch | tree | New | |
cnab_import_wizard |
cnab.import.wizard.form | cnab.import.wizard | form | New |
cnab_line_field_form_view |
l10n_br_cnab.line.field | form | New | |
cnab_line_field_group_condition_form_view |
cnab.line.group.field.condition | form | New | |
cnab_line_field_group_form_view |
cnab.line.field.group | form | New | |
cnab_line_field_tree_view |
l10n_br_cnab.line.field | tree | New | |
cnab_line_fields_group_condition_tree_view |
cnab.line.group.field.condition | tree | New | |
cnab_line_fields_group_tree_view |
cnab.line.field.group | tree | New | |
cnab_line_form_view |
l10n_br_cnab.line | form | New | |
cnab_line_tree_view |
l10n_br_cnab.line | tree | New | |
cnab_preview_wizard_form |
cnab.preview.wizard.form | cnab.preview.wizard | form | New |
cnab_structure_form_view |
l10n_br_cnab.structure | form | New | |
cnab_structure_payment_mode_form |
cnab_structure_payment_mode_form | account.payment.mode | group | Inherits l10n_br_account_payment_order.l10n_br_account_payment_mode_form |
cnab_structure_payment_order_form |
cnab_structure_payment_order_form | account.payment.order | field | Inherits account_payment_order.account_payment_order_form |
cnab_structure_tree_view |
l10n_br_cnab.structure | tree | New | |
field_select_wizard_form |
field.select.wizard.form | field.select.wizard | form | New |
journal_cnab_import_view_form |
journal.cnab.import.view.form | account.journal | xpath | Inherits account.view_account_journal_form |
l10n_br_cnab_return_event_form_view_structure |
l10n_br_cnab.return.event.form.view.structure | l10n_br_cnab.return.event | form | New |
l10n_br_cnab_return_log_form_view_structure |
l10n_br_cnab.return.log.form.view.structure | l10n_br_cnab.return.log | form | New |
l10n_br_cnab_return_log_tree_view_structure |
l10n_br_cnab.return.log.tree | l10n_br_cnab.return.log | tree | New |
default_outbound_cnab_processor
Selection
help='CNAB Processor to be used in a payment order when it is not defined in the payment mode'
selection=[('oca_processor', 'OCA Processor')]
string='CNAB Processor'
default_outbound_cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
help='CNAB Structure to be used in a payment order when it is not defined in the payment mode.'
string='CNAB Structure'
inbound_discount_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Discount Account for CNAB inbound payments.'
string='Inbound Discount Account'
tracking=True
inbound_interest_fee_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Interest and Fees Account for CNAB inbound payments.'
string='Inbound Interest and Fees Account'
tracking=True
inbound_rebate_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Rebate Account for CNAB inbound payments.'
string='Inbound Rebate Account'
tracking=True
outbound_discount_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Discount Account for CNAB outbound payments.'
string='Outbound Discount Account'
tracking=True
outbound_interest_fee_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Interest and Fees Account for CNAB outbound payments.'
string='Outbound Interest and Fees Account'
tracking=True
outbound_rebate_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Rebate Account for CNAB outbound payments.'
string='Outbound Rebate Account'
tracking=True
tariff_charge_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Default account for bank tariff.'
string='Tariff Account'
tracking=True
used_to_import_cnab
Boolean
string='Journal used for import CNAB'
No public methods.
batch_template_id
Many2one → l10n_br_cnab.batch
comodel_name='l10n_br_cnab.batch'
compute='_compute_batch_template_id'
cnab_beneficiary_name
Char
compute='_compute_cnab_beneficiary_name'
help='Name of the beneficiary (Nome do Favorecido) that will be informed in the CNAB.'
cnab_payment_way_id
Many2one → cnab.payment.way
comodel_name='cnab.payment.way'
compute='_compute_cnab_payment_way_id'
cnab_pix_transfer_type_id
Many2one → cnab.pix.transfer.type
comodel_name='cnab.pix.transfer.type'
compute='_compute_cnab_pix_transfer_type_id'
store=False
cnab_pix_type_id
Many2one → cnab.pix.key.type
comodel_name='cnab.pix.key.type'
compute='_compute_cnab_pix_type_id'
store=False
No public methods.
cnab_payment_way_ids
Many2many → cnab.payment.way
comodel_name='cnab.payment.way'
relation='payment_mode_cnab_payment_way_rel'
string='CNAB Payment Ways'
cnab_structure_id
Many2one → l10n_br_cnab.structure
cnab_structure_ok
Boolean
default=False
string='Allowed in CNAB (OCA Processor)'
No public methods.
cnab_processor
Selection
compute='_compute_cnab_processor'
selection='_selection_cnab_processor'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
compute='_compute_cnab_structure_id'
generate_payment_file(self)
generated2uploaded(self)
bank_account_cnab_id
Many2one → account.account
comodel_name='account.account'
readonly=True
related='journal_id.default_account_id'
bank_id
Many2one → res.bank
comodel_name='res.bank'
related='journal_id.bank_id'
cnab_format
Char
related='cnab_structure_id.cnab_format'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
domain="[('bank_id', '=', bank_id),('payment_method_id', 'in', payment_method_ids),('state', '=', 'approved')]"
company_id
Many2one → res.company
comodel_name='res.company'
default=<expr>
required=True
string='Company'
filename
Char
journal_id
Many2one → account.journal
comodel_name='account.journal'
help='Only journals where the CNAB Import is allowed.'
required=True
payment_method_ids
Many2many → account.payment.method
comodel_name='account.payment.method'
compute='_compute_payment_method_ids'
return_file
Binary
type
Selection
import_cnab(self)
cnab_line_id
Many2one → l10n_br_cnab.line
ondelete='cascade'
required=True
states={'draft': [('readonly', False)]}
args: 'l10n_br_cnab.line'
condition_ids
One2many → cnab.line.group.field.condition
comodel_name='cnab.line.group.field.condition'
inverse_name='cnab_group_id'
readonly=True
states={'draft': [('readonly', False)]}
field_ids
One2many → l10n_br_cnab.line.field
comodel_name='l10n_br_cnab.line.field'
domain="[('cnab_line_id', '=', cnab_line_id)]"
inverse_name='cnab_group_id'
readonly=True
states={'draft': [('readonly', False)]}
name
Char
states={'draft': [('readonly', False)]}
state
Selection
readonly=True
related='cnab_line_id.state'
default_get(self, fields)
cnab_group_id
Many2one → cnab.line.field.group
comodel_name='cnab.line.field.group'
readonly=True
states={'draft': [('readonly', False)]}
cnab_line_id
Many2one → l10n_br_cnab.line
comodel_name='l10n_br_cnab.line'
related='cnab_group_id.cnab_line_id'
field_id
Many2one → l10n_br_cnab.line.field
comodel_name='l10n_br_cnab.line.field'
domain="[('cnab_line_id', '=', cnab_line_id)]"
readonly=True
states={'draft': [('readonly', False)]}
json_value
Char
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Value (JSON format)'
operator
Selection
default='in'
readonly=True
required=True
selection=[('in', 'in'), ('not in', 'not in')]
states={'draft': [('readonly', False)]}
state
Selection
readonly=True
related='cnab_group_id.state'
default_get(self, fields_list)
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
string='Cnab Structure'
code
Char
required=True
description
Char
gen_liquidation_move
Boolean
help='Mark this option if this occurrence corresponds to a liquidation move.'
string='Generate Liquidation Move'
name
Char
compute='_compute_name'
No public methods.
batch_id
Many2one → l10n_br_cnab.batch
comodel_name='l10n_br_cnab.batch'
string='Cnab Batch'
clearinghouse_code
Char
help='Centralizing Clearing House Code\n(Código da Câmara Centralizadora)'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
string='Cnab Structure'
code
Char
required=True
description
Char
name
Char
compute='_compute_name'
No public methods.
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
string='Cnab Structure'
code
Char
required=True
description
Char
key_type
Selection
required=True
selection=PartnerPix.KEY_TYPES
string='PIX Key Type'
name
Char
compute='_compute_name'
No public methods.
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
string='Cnab Structure'
code
Char
required=True
description
Char
name
Char
compute='_compute_name'
type_domain
Selection
selection=AccountPaymentLine.PIX_TRANSFER_TYPES
string='Transfer Type'
No public methods.
cnab_file
Binary
string='CNAB File'
cnab_file_name
Char
compute='_compute_cnab_file_name'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
output
Text
string='CNAB Text Output'
output_yaml
Text
compute='_compute_cnab_txt'
string='CNAB YAML Output'
payment_order_id
Many2one → account.payment.order
comodel_name='account.payment.order'
string='Payment Order'
load_file(self)
cnab_field_id
Many2one → l10n_br_cnab.line.field
comodel_name='l10n_br_cnab.line.field'
string='CNAB Field'
current_view
Char
model_id
Many2one → ir.model
string='Related Model'
args: 'ir.model'
new_field_id
Many2one → ir.model.fields
comodel_name='ir.model.fields'
domain="[('model_id', '=', parent_model_id)]"
notation_field
Char
notation_field_view
Char
compute='_compute_notation_field_view'
parent_model_id
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_parent_model_id'
string='Parent Model'
action_add_field(self)
action_confirm(self)
action_remove_last_field(self)
cnab_payment_way_ids
One2many → cnab.payment.way
comodel_name='cnab.payment.way'
domain="[('cnab_structure_id', '=', cnab_structure_id)]"
help='Payments ways that use the structure of this batch.'
inverse_name='batch_id'
readonly=True
states={'draft': [('readonly', False)]}
string='Payments Ways'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
domain="[('cnab_format', '=', '240')]"
help='Only structures with code equal to 240 is allowed.'
readonly=True
states={'draft': [('readonly', False)]}
line_ids
One2many → l10n_br_cnab.line
comodel_name='l10n_br_cnab.line'
domain="[('cnab_format', '=', '240')]"
help='Only structures with code equal to 240 is allowed.'
inverse_name='batch_id'
readonly=True
states={'draft': [('readonly', False)]}
name
Char
readonly=True
states={'draft': [('readonly', False)]}
state
Selection
default='draft'
readonly=True
selection=[('draft', 'Draft'), ('review', 'Review'), ('approved', 'Approved')]
check_batch(self)
get_header(self)
get_segments(self)
get_trailer(self)
output(self, bank_lines, seq_batch)
unlink(self)
batch_id
Many2one → l10n_br_cnab.batch
comodel_name='l10n_br_cnab.batch'
ondelete='cascade'
readonly=True
states={'draft': [('readonly', False)]}
cnab_format
Char
related='cnab_structure_id.cnab_format'
states={'draft': [('readonly', False)]}
cnab_payment_way_ids
Many2many → cnab.payment.way
comodel_name='cnab.payment.way'
domain="[('cnab_structure_id', '=', cnab_structure_id)]"
help='Payment Ways that must use this segment.'
readonly=True
states={'draft': [('readonly', False)]}
string='Payments Ways'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
readonly=True
required=True
states={'draft': [('readonly', False)]}
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
readonly=True
required=True
states={'draft': [('readonly', False)]}
communication_flow
Selection
required=True
states={'draft': [('readonly', False)]}
args: [('sending', 'Sending'), ('return', 'Return'), ('both', 'Sending and Return')]
content_dest_model_id
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_dest_source_model_id'
help='Related model that will provide the destination of the contents of return CNAB files.'
states={'draft': [('readonly', False)]}
string='Content Destination'
content_source_model_id
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_content_source_model_id'
help='Related model that will provide the origin of the contents of CNAB files.'
states={'draft': [('readonly', False)]}
string='Content Source'
current_view
Selection
default='general'
required=True
states={'draft': [('readonly', False)]}
args: [('general', 'General'), ('sending', 'Sending'), ('return', 'Return')]
field_ids
One2many → l10n_br_cnab.line.field
comodel_name='l10n_br_cnab.line.field'
inverse_name='cnab_line_id'
readonly=True
states={'draft': [('readonly', False)]}
group_ids
One2many → cnab.line.field.group
comodel_name='cnab.line.field.group'
inverse_name='cnab_line_id'
readonly=True
states={'draft': [('readonly', False)]}
name
Char
compute='_compute_name'
store=True
requerid
Boolean
states={'draft': [('readonly', False)]}
resource_ref
Reference
selection='_selection_target_model'
states={'draft': [('readonly', False)]}
string='Reference'
segment_code
Char
states={'draft': [('readonly', False)]}
sequence
Integer
readonly=True
states={'draft': [('readonly', False)]}
state
Selection
default='draft'
readonly=True
selection=[('draft', 'Draft'), ('review', 'Review'), ('approved', 'Approved')]
type
Selection
readonly=True
states={'draft': [('readonly', False)]}
args: [('header', 'Header'), ('segment', 'Segment'), ('trailer', 'Trailer')]
action_general_view(self)
action_return_view(self)
action_sending_view(self)
check_line(self)
is_requerid(self, payment_way)
output(self, resource_ref, record_type, **kwargs)
unlink(self)
assumed_comma
Integer
help='indicates the position of the comma within a numeric field.'
readonly=True
states={'draft': [('readonly', False)]}
cnab_group_id
Many2one → cnab.line.field.group
readonly=True
states={'draft': [('readonly', False)]}
args: 'cnab.line.field.group'
cnab_line_id
Many2one → l10n_br_cnab.line
ondelete='cascade'
readonly=True
required=True
states={'draft': [('readonly', False)]}
args: 'l10n_br_cnab.line'
computed_name
Char
compute='_compute_name'
string='Field'
content_dest_field
Char
help='Inform the field with the origin of the content, expressed with dot notation.'
readonly=True
states={'draft': [('readonly', False)]}
string='Content Destination Field'
content_dest_model_id
Many2one → ir.model
comodel_name='ir.model'
related='cnab_line_id.content_dest_model_id'
content_source_field
Char
help='Inform the field with the origin of the content, expressed with dot notation.'
readonly=True
states={'draft': [('readonly', False)]}
content_source_model_id
Many2one → ir.model
comodel_name='ir.model'
related='cnab_line_id.content_source_model_id'
default_value
Char
readonly=True
states={'draft': [('readonly', False)]}
end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='End Position'
meaning
Char
readonly=True
states={'draft': [('readonly', False)]}
name
Char
readonly=True
states={'draft': [('readonly', False)]}
notes
Char
readonly=True
states={'draft': [('readonly', False)]}
preview_field
Char
compute='_compute_preview_field'
ref_name
Char
compute='_compute_ref_name'
help="Unique reference name to identify the cnab field, can be used to search the field content in python expressions in 'Dynamic Content'. It is generated automatically by aggregating the field name, starting position and ending position. ex:. 'field_name_001-015'"
string='Reference Name'
related_field_id
Many2one → ir.model.fields
readonly=True
states={'draft': [('readonly', False)]}
args: 'ir.model.fields'
resource_ref
Reference
related='cnab_line_id.resource_ref'
string='Reference'
return_dynamic_content
Char
readonly=True
states={'draft': [('readonly', False)]}
sending_dynamic_content
Char
help="Expression in Python to define the final value of the content,you can use the following predefined words: \n\n'content' returns the value of the mapped content source field. \n'time' class to handle date. \n'seq_batch' returns the batch sequence. \n'seq_record_detail' returns the sequence for detail record in the batch. \n'payment_way_code' return the batch payment way \n'patment_type_code' return the batch payment type \n'qty_batches' returns the number of batches \n'qty_records' returns the number of records \n'batch_detail_lines' returns a list of batch detail records.'segment_code' returns the code of the segment defined in the header of the line."
readonly=True
states={'draft': [('readonly', False)]}
size
Integer
compute='_compute_size'
start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Start Position'
state
Selection
default='draft'
readonly=True
selection=[('draft', 'Draft'), ('review', 'Review'), ('approved', 'Approved')]
type
Selection
readonly=True
states={'draft': [('readonly', False)]}
args: [('alpha', _('Alphanumeric')), ('num', _('Numeric'))]
action_approve(self)
action_change_field(self)
action_change_field_return(self)
action_change_field_sending(self)
action_draft(self)
action_review(self)
check_field(self)
eval_compute_value(self, content, python_expression, **kwargs)
format(self, size, value_type, value)
output(self, resource_ref, **kwargs)
unlink(self)
additional_info
Char
balance
Float
compute='_compute_balance'
help='Balance = Payment Value + Discount Value + Rebate Value - Fees'
bank_code
Char
batch_code
Char
centralizing_chamber_code
Char
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
related='cnab_return_log_id.cnab_structure_id'
doc_purpose
Char
expected_payment_date
Date
gen_liquidation_move
Boolean
help='If check, this CNAB Event will generate a liquidity move line.'
string='Generate Liquidation Move'
generated_move_id
Many2one → account.move
comodel_name='account.move'
journal_id
Many2one → account.journal
comodel_name='account.journal'
related='cnab_return_log_id.journal_id'
move_line_ids
Many2many → account.move.line
comodel_name='account.move.line'
ondelete='restrict'
move_type_code
Char
occurrence_code_1
Char
occurrence_code_2
Char
occurrence_code_3
Char
occurrence_code_4
Char
occurrence_code_5
Char
partner_bank_account
Char
partner_bank_account_dac
Char
partner_bank_branch
Char
partner_bank_code
Char
partner_document
Char
help="Partners's document number, it can be a CNPJ or CPF."
partner_name
Char
partner_notification
Char
record_type
Char
seq_number
Char
state
Selection
selection=[('error', 'Error'), ('ignored', 'Ignored'), ('ready', 'Ready to Genereta Move'), ('confirmed', 'Confirmed')]
ted_purpose
Char
action_ignore_event(self)
check_gen_liquidation_move(self)
confirm_event(self)
create(self, vals)
create_liq_move(self)
create_tariff_move(self)
get_description_occurrence(self, event_code)
load_bank_payment_line(self)
load_description_occurrences(self)
set_move_line_ids(self)
set_occurrence_date(self)
bank_acc_number
Char
compute='_compute_bank_acc_number'
inverse='_inverse_bank_acc_number'
bank_account_cnab_id
Many2one → account.account
comodel_name='account.account'
readonly=True
related='journal_id.default_account_id'
bank_id
Many2one → res.bank
comodel_name='res.bank'
related='journal_id.bank_id'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
cnpj_cpf
Char
company_id
Many2one → res.company
comodel_name='res.company'
string='Company'
header_file
Char
journal_id
Many2one → account.journal
comodel_name='account.journal'
return_file
Binary
state
Selection
selection=[('draft', 'Draft'), ('confirmed', 'Confirmed')]
type
Selection
action_confirm_return_log(self)
unlink(self)
seq_number
Char
No public methods.
bank_id
Many2one → res.bank
comodel_name='res.bank'
readonly=True
states={'draft': [('readonly', False)]}
batch_ids
One2many → l10n_br_cnab.batch
comodel_name='l10n_br_cnab.batch'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
cnab_format
Char
related='payment_method_id.code'
cnab_occurrence_ids
One2many → cnab.occurrence
comodel_name='cnab.occurrence'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
cnab_payment_way_ids
One2many → cnab.payment.way
comodel_name='cnab.payment.way'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
cnab_pix_key_type_ids
One2many → cnab.pix.key.type
comodel_name='cnab.pix.key.type'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
cnab_pix_transfer_type_ids
One2many → cnab.pix.transfer.type
comodel_name='cnab.pix.transfer.type'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
conf_bank_end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Bank Last Position'
conf_bank_start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Bank Start Position'
conf_batch_end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Batch Last Position'
conf_batch_start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Batch Start Position'
conf_detail_end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Last position of sequencial identification of Detail Records. Only for detail records.'
conf_detail_start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Position of sequencial identification of Detail Records. Only for detail records.'
conf_payment_way_end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Payment Way last position in Header Batch Records. Only for Header Batch Records.'
conf_payment_way_start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Payment Way start position in Header Batch Records. Only for Header Batch Records.'
conf_record_type_end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Record Type Last Position'
conf_record_type_start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Record Type Start Position'
conf_segment_end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Last position of segment of an detail record. Only for detail records.'
conf_segment_start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Start position of segment of an detail record. Only for detail records.'
content_source_model_id
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_content_source_model_id'
help='Related model that will provide the origin of the contents of CNAB files.'
string='Content Source'
line_ids
One2many → l10n_br_cnab.line
comodel_name='l10n_br_cnab.line'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
name
Char
readonly=True
states={'draft': [('readonly', False)]}
payment_method_id
Many2one → account.payment.method
comodel_name='account.payment.method'
domain=[('code', 'in', CNAB_CODES)]
states={'draft': [('readonly', False)]}
payment_type
Selection
related='payment_method_id.payment_type'
record_type_batch_header_id
Integer
help='What`s the identification for header of batch type?'
readonly=True
states={'draft': [('readonly', False)]}
string='Batch Header Type ID'
record_type_batch_trailer_id
Integer
help='What`s the identification for trailer of batch type?'
readonly=True
states={'draft': [('readonly', False)]}
string='Batch Trailer Type ID'
record_type_detail_id
Integer
help='What`s the identification for detail type?'
readonly=True
states={'draft': [('readonly', False)]}
string='Detail Type ID'
record_type_file_header_id
Integer
help='What`s the identification for header of file type?'
readonly=True
states={'draft': [('readonly', False)]}
string='File Header Type ID'
record_type_file_trailer_id
Integer
help='What`s the identification for trailer of file type?'
readonly=True
states={'draft': [('readonly', False)]}
string='File Trailer Type ID'
state
Selection
default='draft'
readonly=True
selection=[('draft', 'Draft'), ('review', 'Review'), ('approved', 'Approved')]
action_approve(self)
action_draft(self)
action_review(self)
check_structure(self)
get_header(self)
get_trailer(self)
output(self, pay_order)
output_dicts(self, pay_order)
output_yaml(self, pay_order)
unlink(self)
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/l10n-brazil |
| GIT | |
| GIT | https://github.com/OCA/l10n-brazil.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_cnab_structure |
| VERSION | |
| VERSION | 1.3.1 |
| CATEGORY | |
| CATEGORY | Uncategorized |
| LICENSE | |
| LICENSE | AGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Escodoo, Engenere |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Escodoo, Engenere |
| COMMITTERS | |
| COMMITTERS | Raphaël Valyi, Weblate, OCA-git-bot, Magno Costa, oca-ci, Antônio Neto, Kaynnan Lemes, Felipe |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/l10n-brazil |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:40:53 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
OCA/account-payment: - account_due_list - account_due_list_payment_mode OCA/bank-payment: - account_payment_order - account_payment_partner - account_payment_mode OCA/l10n-brazil: - l10n_br_account_payment_order - l10n_br_base - l10n_br_account_due_list - l10n_br_coa_generic - l10n_br_coa odoo/odoo: - base - base_setup - web - base_address_city - base_address_extended - account - product - bus - web_tour - uom - analytic - portal - web_editor - http_routing - auth_signup - digest - resource - base_iban |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES |
pyyaml unidecode erpbrasil.base email-validator num2words phonenumbers lxml |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
cnab_batch_form_view |
l10n_br_cnab.batch | form | New | |
cnab_batch_tree_view |
l10n_br_cnab.batch | tree | New | |
cnab_import_wizard |
cnab.import.wizard.form | cnab.import.wizard | form | New |
cnab_line_field_form_view |
l10n_br_cnab.line.field | form | New | |
cnab_line_field_group_condition_form_view |
cnab.line.group.field.condition | form | New | |
cnab_line_field_group_form_view |
cnab.line.field.group | form | New | |
cnab_line_field_tree_view |
l10n_br_cnab.line.field | tree | New | |
cnab_line_fields_group_condition_tree_view |
cnab.line.group.field.condition | tree | New | |
cnab_line_fields_group_tree_view |
cnab.line.field.group | tree | New | |
cnab_line_form_view |
l10n_br_cnab.line | form | New | |
cnab_line_tree_view |
l10n_br_cnab.line | tree | New | |
cnab_preview_wizard_form |
cnab.preview.wizard.form | cnab.preview.wizard | form | New |
cnab_structure_form_view |
l10n_br_cnab.structure | form | New | |
cnab_structure_payment_mode_form |
cnab_structure_payment_mode_form | account.payment.mode | group | Inherits l10n_br_account_payment_order.l10n_br_account_payment_mode_form |
cnab_structure_payment_order_form |
cnab_structure_payment_order_form | account.payment.order | field | Inherits account_payment_order.account_payment_order_form |
cnab_structure_tree_view |
l10n_br_cnab.structure | tree | New | |
field_select_wizard_form |
field.select.wizard.form | field.select.wizard | form | New |
journal_cnab_import_view_form |
journal.cnab.import.view.form | account.journal | xpath | Inherits account.view_account_journal_form |
l10n_br_cnab_return_event_form_view_structure |
l10n_br_cnab.return.event.form.view.structure | l10n_br_cnab.return.event | form | New |
l10n_br_cnab_return_log_form_view_structure |
l10n_br_cnab.return.log.form.view.structure | l10n_br_cnab.return.log | form | New |
l10n_br_cnab_return_log_tree_view_structure |
l10n_br_cnab.return.log.tree | l10n_br_cnab.return.log | tree | New |
default_outbound_cnab_processor
Selection
help='CNAB Processor to be used in a payment order when it is not defined in the payment mode'
selection=[('oca_processor', 'OCA Processor')]
string='CNAB Processor'
default_outbound_cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
help='CNAB Structure to be used in a payment order when it is not defined in the payment mode.'
string='CNAB Structure'
inbound_discount_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Discount Account for CNAB inbound payments.'
string='Inbound Discount Account'
tracking=True
inbound_interest_fee_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Interest and Fees Account for CNAB inbound payments.'
string='Inbound Interest and Fees Account'
tracking=True
inbound_rebate_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Rebate Account for CNAB inbound payments.'
string='Inbound Rebate Account'
tracking=True
outbound_discount_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Discount Account for CNAB outbound payments.'
string='Outbound Discount Account'
tracking=True
outbound_interest_fee_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Interest and Fees Account for CNAB outbound payments.'
string='Outbound Interest and Fees Account'
tracking=True
outbound_rebate_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Rebate Account for CNAB outbound payments.'
string='Outbound Rebate Account'
tracking=True
tariff_charge_account_id
Many2one → account.account
check_company=True
comodel_name='account.account'
help='Default account for bank tariff.'
string='Tariff Account'
tracking=True
used_to_import_cnab
Boolean
string='Journal used for import CNAB'
No public methods.
batch_template_id
Many2one → l10n_br_cnab.batch
comodel_name='l10n_br_cnab.batch'
compute='_compute_batch_template_id'
cnab_beneficiary_name
Char
compute='_compute_cnab_beneficiary_name'
help='Name of the beneficiary (Nome do Favorecido) that will be informed in the CNAB.'
cnab_payment_way_id
Many2one → cnab.payment.way
comodel_name='cnab.payment.way'
compute='_compute_cnab_payment_way_id'
cnab_pix_transfer_type_id
Many2one → cnab.pix.transfer.type
comodel_name='cnab.pix.transfer.type'
compute='_compute_cnab_pix_transfer_type_id'
store=False
cnab_pix_type_id
Many2one → cnab.pix.key.type
comodel_name='cnab.pix.key.type'
compute='_compute_cnab_pix_type_id'
store=False
No public methods.
cnab_payment_way_ids
Many2many → cnab.payment.way
comodel_name='cnab.payment.way'
relation='payment_mode_cnab_payment_way_rel'
string='CNAB Payment Ways'
cnab_structure_id
Many2one → l10n_br_cnab.structure
cnab_structure_ok
Boolean
default=False
string='Allowed in CNAB (OCA Processor)'
No public methods.
cnab_processor
Selection
compute='_compute_cnab_processor'
selection='_selection_cnab_processor'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
compute='_compute_cnab_structure_id'
generate_payment_file(self)
generated2uploaded(self)
bank_account_cnab_id
Many2one → account.account
comodel_name='account.account'
readonly=True
related='journal_id.default_account_id'
bank_id
Many2one → res.bank
comodel_name='res.bank'
related='journal_id.bank_id'
cnab_format
Char
related='cnab_structure_id.cnab_format'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
domain="[('bank_id', '=', bank_id),('payment_method_id', 'in', payment_method_ids),('state', '=', 'approved')]"
company_id
Many2one → res.company
comodel_name='res.company'
default=<expr>
required=True
string='Company'
filename
Char
journal_id
Many2one → account.journal
comodel_name='account.journal'
help='Only journals where the CNAB Import is allowed.'
required=True
payment_method_ids
Many2many → account.payment.method
comodel_name='account.payment.method'
compute='_compute_payment_method_ids'
return_file
Binary
type
Selection
import_cnab(self)
cnab_line_id
Many2one → l10n_br_cnab.line
ondelete='cascade'
required=True
states={'draft': [('readonly', False)]}
args: 'l10n_br_cnab.line'
condition_ids
One2many → cnab.line.group.field.condition
comodel_name='cnab.line.group.field.condition'
inverse_name='cnab_group_id'
readonly=True
states={'draft': [('readonly', False)]}
field_ids
One2many → l10n_br_cnab.line.field
comodel_name='l10n_br_cnab.line.field'
domain="[('cnab_line_id', '=', cnab_line_id)]"
inverse_name='cnab_group_id'
readonly=True
states={'draft': [('readonly', False)]}
name
Char
states={'draft': [('readonly', False)]}
state
Selection
readonly=True
related='cnab_line_id.state'
default_get(self, fields)
cnab_group_id
Many2one → cnab.line.field.group
comodel_name='cnab.line.field.group'
readonly=True
states={'draft': [('readonly', False)]}
cnab_line_id
Many2one → l10n_br_cnab.line
comodel_name='l10n_br_cnab.line'
related='cnab_group_id.cnab_line_id'
field_id
Many2one → l10n_br_cnab.line.field
comodel_name='l10n_br_cnab.line.field'
domain="[('cnab_line_id', '=', cnab_line_id)]"
readonly=True
states={'draft': [('readonly', False)]}
json_value
Char
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Value (JSON format)'
operator
Selection
default='in'
readonly=True
required=True
selection=[('in', 'in'), ('not in', 'not in')]
states={'draft': [('readonly', False)]}
state
Selection
readonly=True
related='cnab_group_id.state'
default_get(self, fields_list)
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
string='Cnab Structure'
code
Char
required=True
description
Char
gen_liquidation_move
Boolean
help='Mark this option if this occurrence corresponds to a liquidation move.'
string='Generate Liquidation Move'
name
Char
compute='_compute_name'
No public methods.
batch_id
Many2one → l10n_br_cnab.batch
comodel_name='l10n_br_cnab.batch'
string='Cnab Batch'
clearinghouse_code
Char
help='Centralizing Clearing House Code\n(Código da Câmara Centralizadora)'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
string='Cnab Structure'
code
Char
required=True
description
Char
name
Char
compute='_compute_name'
No public methods.
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
string='Cnab Structure'
code
Char
required=True
description
Char
key_type
Selection
required=True
selection=PartnerPix.KEY_TYPES
string='PIX Key Type'
name
Char
compute='_compute_name'
No public methods.
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
required=True
string='Cnab Structure'
code
Char
required=True
description
Char
name
Char
compute='_compute_name'
type_domain
Selection
selection=AccountPaymentLine.PIX_TRANSFER_TYPES
string='Transfer Type'
No public methods.
cnab_file
Binary
string='CNAB File'
cnab_file_name
Char
compute='_compute_cnab_file_name'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
output
Text
string='CNAB Text Output'
output_yaml
Text
compute='_compute_cnab_txt'
string='CNAB YAML Output'
payment_order_id
Many2one → account.payment.order
comodel_name='account.payment.order'
string='Payment Order'
load_file(self)
cnab_field_id
Many2one → l10n_br_cnab.line.field
comodel_name='l10n_br_cnab.line.field'
string='CNAB Field'
current_view
Char
model_id
Many2one → ir.model
string='Related Model'
args: 'ir.model'
new_field_id
Many2one → ir.model.fields
comodel_name='ir.model.fields'
domain="[('model_id', '=', parent_model_id)]"
notation_field
Char
notation_field_view
Char
compute='_compute_notation_field_view'
parent_model_id
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_parent_model_id'
string='Parent Model'
action_add_field(self)
action_confirm(self)
action_remove_last_field(self)
cnab_payment_way_ids
One2many → cnab.payment.way
comodel_name='cnab.payment.way'
domain="[('cnab_structure_id', '=', cnab_structure_id)]"
help='Payments ways that use the structure of this batch.'
inverse_name='batch_id'
readonly=True
states={'draft': [('readonly', False)]}
string='Payments Ways'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
domain="[('cnab_format', '=', '240')]"
help='Only structures with code equal to 240 is allowed.'
readonly=True
states={'draft': [('readonly', False)]}
line_ids
One2many → l10n_br_cnab.line
comodel_name='l10n_br_cnab.line'
domain="[('cnab_format', '=', '240')]"
help='Only structures with code equal to 240 is allowed.'
inverse_name='batch_id'
readonly=True
states={'draft': [('readonly', False)]}
name
Char
readonly=True
states={'draft': [('readonly', False)]}
state
Selection
default='draft'
readonly=True
selection=[('draft', 'Draft'), ('review', 'Review'), ('approved', 'Approved')]
check_batch(self)
get_header(self)
get_segments(self)
get_trailer(self)
output(self, bank_lines, seq_batch)
unlink(self)
batch_id
Many2one → l10n_br_cnab.batch
comodel_name='l10n_br_cnab.batch'
ondelete='cascade'
readonly=True
states={'draft': [('readonly', False)]}
cnab_format
Char
related='cnab_structure_id.cnab_format'
states={'draft': [('readonly', False)]}
cnab_payment_way_ids
Many2many → cnab.payment.way
comodel_name='cnab.payment.way'
domain="[('cnab_structure_id', '=', cnab_structure_id)]"
help='Payment Ways that must use this segment.'
readonly=True
states={'draft': [('readonly', False)]}
string='Payments Ways'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
readonly=True
required=True
states={'draft': [('readonly', False)]}
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
ondelete='cascade'
readonly=True
required=True
states={'draft': [('readonly', False)]}
communication_flow
Selection
required=True
states={'draft': [('readonly', False)]}
args: [('sending', 'Sending'), ('return', 'Return'), ('both', 'Sending and Return')]
content_dest_model_id
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_dest_source_model_id'
help='Related model that will provide the destination of the contents of return CNAB files.'
states={'draft': [('readonly', False)]}
string='Content Destination'
content_source_model_id
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_content_source_model_id'
help='Related model that will provide the origin of the contents of CNABfiles.'
states={'draft': [('readonly', False)]}
string='Content Source'
current_view
Selection
default='general'
required=True
states={'draft': [('readonly', False)]}
args: [('general', 'General'), ('sending', 'Sending'), ('return', 'Return')]
field_ids
One2many → l10n_br_cnab.line.field
comodel_name='l10n_br_cnab.line.field'
inverse_name='cnab_line_id'
readonly=True
states={'draft': [('readonly', False)]}
group_ids
One2many → cnab.line.field.group
comodel_name='cnab.line.field.group'
inverse_name='cnab_line_id'
readonly=True
states={'draft': [('readonly', False)]}
name
Char
compute='_compute_name'
store=True
requerid
Boolean
states={'draft': [('readonly', False)]}
resource_ref
Reference
selection='_selection_target_model'
states={'draft': [('readonly', False)]}
string='Reference'
segment_code
Char
states={'draft': [('readonly', False)]}
sequence
Integer
readonly=True
states={'draft': [('readonly', False)]}
state
Selection
default='draft'
readonly=True
selection=[('draft', 'Draft'), ('review', 'Review'), ('approved', 'Approved')]
type
Selection
readonly=True
states={'draft': [('readonly', False)]}
args: [('header', 'Header'), ('segment', 'Segment'), ('trailer', 'Trailer')]
action_general_view(self)
action_return_view(self)
action_sending_view(self)
check_line(self)
is_requerid(self, payment_way)
output(self, resource_ref, record_type, **kwargs)
unlink(self)
assumed_comma
Integer
help='indicates the position of the comma within a numeric field.'
readonly=True
states={'draft': [('readonly', False)]}
cnab_group_id
Many2one → cnab.line.field.group
readonly=True
states={'draft': [('readonly', False)]}
args: 'cnab.line.field.group'
cnab_line_id
Many2one → l10n_br_cnab.line
ondelete='cascade'
readonly=True
required=True
states={'draft': [('readonly', False)]}
args: 'l10n_br_cnab.line'
computed_name
Char
compute='_compute_name'
string='Field'
content_dest_field
Char
help='Inform the field with the origin of the content, expressed with dot notation.'
readonly=True
states={'draft': [('readonly', False)]}
string='Content Destination Field'
content_dest_model_id
Many2one → ir.model
comodel_name='ir.model'
related='cnab_line_id.content_dest_model_id'
content_source_field
Char
help='Inform the field with the origin of the content, expressed with dot notation.'
readonly=True
states={'draft': [('readonly', False)]}
content_source_model_id
Many2one → ir.model
comodel_name='ir.model'
related='cnab_line_id.content_source_model_id'
default_value
Char
readonly=True
states={'draft': [('readonly', False)]}
end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='End Position'
meaning
Char
readonly=True
states={'draft': [('readonly', False)]}
name
Char
readonly=True
states={'draft': [('readonly', False)]}
notes
Char
readonly=True
states={'draft': [('readonly', False)]}
preview_field
Char
compute='_compute_preview_field'
ref_name
Char
compute='_compute_ref_name'
help="Unique reference name to identify the cnab field, can be used to search the field content in python expressions in 'Dynamic Content'. It is generated automatically by aggregating the field name, starting position and ending position. ex:. 'field_name_001-015'"
string='Reference Name'
related_field_id
Many2one → ir.model.fields
readonly=True
states={'draft': [('readonly', False)]}
args: 'ir.model.fields'
resource_ref
Reference
related='cnab_line_id.resource_ref'
string='Reference'
return_dynamic_content
Char
readonly=True
states={'draft': [('readonly', False)]}
sending_dynamic_content
Char
help="Expression in Python to define the final value of the content,you can use the following predefined words:\n\n'content' returns the value of the mapped content source field.\n'time' class to handle date.\n'seq_batch' returns the batch sequence.\n'seq_record_detail' returns the sequence for detail record in the batch.\n'payment_way_code' return the batch payment way\n'patment_type_code' return the batch payment type\n'qty_batches' returns the number of batches\n'qty_records' returns the number of records\n'batch_detail_lines' returns a list of batch detail records.'segment_code' returns the code of the segment defined in the header of the line."
readonly=True
states={'draft': [('readonly', False)]}
size
Integer
compute='_compute_size'
start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Start Position'
state
Selection
default='draft'
readonly=True
selection=[('draft', 'Draft'), ('review', 'Review'), ('approved', 'Approved')]
type
Selection
readonly=True
states={'draft': [('readonly', False)]}
args: [('alpha', _('Alphanumeric')), ('num', _('Numeric'))]
action_approve(self)
action_change_field(self)
action_change_field_return(self)
action_change_field_sending(self)
action_draft(self)
action_review(self)
check_field(self)
eval_compute_value(self, content, python_expression, **kwargs)
format(self, size, value_type, value)
output(self, resource_ref, **kwargs)
unlink(self)
additional_info
Char
balance
Float
compute='_compute_balance'
help='Balance = Payment Value + Discount Value + Rebate Value - Fees'
bank_code
Char
batch_code
Char
centralizing_chamber_code
Char
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
related='cnab_return_log_id.cnab_structure_id'
doc_purpose
Char
expected_payment_date
Date
gen_liquidation_move
Boolean
help='If check, this CNAB Event will generate a liquidity move line.'
string='Generate Liquidation Move'
generated_move_id
Many2one → account.move
comodel_name='account.move'
journal_id
Many2one → account.journal
comodel_name='account.journal'
related='cnab_return_log_id.journal_id'
move_line_ids
Many2many → account.move.line
comodel_name='account.move.line'
ondelete='restrict'
move_type_code
Char
occurrence_code_1
Char
occurrence_code_2
Char
occurrence_code_3
Char
occurrence_code_4
Char
occurrence_code_5
Char
partner_bank_account
Char
partner_bank_account_dac
Char
partner_bank_branch
Char
partner_bank_code
Char
partner_document
Char
help="Partners's document number, it can be a CNPJ or CPF."
partner_name
Char
partner_notification
Char
record_type
Char
seq_number
Char
state
Selection
selection=[('error', 'Error'), ('ignored', 'Ignored'), ('ready', 'Ready to Genereta Move'), ('confirmed', 'Confirmed')]
ted_purpose
Char
action_ignore_event(self)
check_gen_liquidation_move(self)
confirm_event(self)
create(self, vals)
create_liq_move(self)
create_tariff_move(self)
get_description_occurrence(self, event_code)
load_bank_payment_line(self)
load_description_occurrences(self)
set_move_line_ids(self)
set_occurrence_date(self)
bank_acc_number
Char
compute='_compute_bank_acc_number'
inverse='_inverse_bank_acc_number'
bank_account_cnab_id
Many2one → account.account
comodel_name='account.account'
readonly=True
related='journal_id.default_account_id'
bank_id
Many2one → res.bank
comodel_name='res.bank'
related='journal_id.bank_id'
cnab_structure_id
Many2one → l10n_br_cnab.structure
comodel_name='l10n_br_cnab.structure'
cnpj_cpf
Char
company_id
Many2one → res.company
comodel_name='res.company'
string='Company'
header_file
Char
journal_id
Many2one → account.journal
comodel_name='account.journal'
return_file
Binary
state
Selection
selection=[('draft', 'Draft'), ('confirmed', 'Confirmed')]
type
Selection
action_confirm_return_log(self)
unlink(self)
seq_number
Char
No public methods.
bank_id
Many2one → res.bank
comodel_name='res.bank'
readonly=True
states={'draft': [('readonly', False)]}
batch_ids
One2many → l10n_br_cnab.batch
comodel_name='l10n_br_cnab.batch'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
cnab_format
Char
related='payment_method_id.code'
cnab_occurrence_ids
One2many → cnab.occurrence
comodel_name='cnab.occurrence'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
cnab_payment_way_ids
One2many → cnab.payment.way
comodel_name='cnab.payment.way'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
cnab_pix_key_type_ids
One2many → cnab.pix.key.type
comodel_name='cnab.pix.key.type'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
cnab_pix_transfer_type_ids
One2many → cnab.pix.transfer.type
comodel_name='cnab.pix.transfer.type'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
conf_bank_end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Bank Last Position'
conf_bank_start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Bank Start Position'
conf_batch_end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Batch Last Position'
conf_batch_start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Batch Start Position'
conf_detail_end_pos
Integer
help='Last position of sequencial identification of Detail Records. Only for detail records.'
readonly=True
states={'draft': [('readonly', False)]}
conf_detail_start_pos
Integer
help='Position of sequencial identification of Detail Records. Only for detail records.'
readonly=True
states={'draft': [('readonly', False)]}
conf_payment_way_end_pos
Integer
help='Payment Way last position in Header Batch Records. Only for Header Batch Records.'
readonly=True
states={'draft': [('readonly', False)]}
conf_payment_way_start_pos
Integer
help='Payment Way start position in Header Batch Records. Only for Header Batch Records.'
readonly=True
states={'draft': [('readonly', False)]}
conf_record_type_end_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Record Type Last Position'
conf_record_type_start_pos
Integer
readonly=True
states={'draft': [('readonly', False)]}
string='Record Type Start Position'
conf_segment_end_pos
Integer
help='Last position of segment of an detail record. Only for detail records.'
readonly=True
states={'draft': [('readonly', False)]}
conf_segment_start_pos
Integer
help='Start position of segment of an detail record. Only for detail records.'
readonly=True
states={'draft': [('readonly', False)]}
content_source_model_id
Many2one → ir.model
comodel_name='ir.model'
compute='_compute_content_source_model_id'
help='Related model that will provide the origin of the contents of CNAB files.'
string='Content Source'
line_ids
One2many → l10n_br_cnab.line
comodel_name='l10n_br_cnab.line'
inverse_name='cnab_structure_id'
readonly=True
states={'draft': [('readonly', False)]}
name
Char
readonly=True
states={'draft': [('readonly', False)]}
payment_method_id
Many2one → account.payment.method
comodel_name='account.payment.method'
domain=[('code', 'in', CNAB_CODES)]
states={'draft': [('readonly', False)]}
payment_type
Selection
related='payment_method_id.payment_type'
record_type_batch_header_id
Integer
help='What`s the identification for header of batch type?'
readonly=True
states={'draft': [('readonly', False)]}
string='Batch Header Type ID'
record_type_batch_trailer_id
Integer
help='What`s the identification for trailer of batch type?'
readonly=True
states={'draft': [('readonly', False)]}
string='Batch Trailer Type ID'
record_type_detail_id
Integer
help='What`s the identification for detail type?'
readonly=True
states={'draft': [('readonly', False)]}
string='Detail Type ID'
record_type_file_header_id
Integer
help='What`s the identification for header of file type?'
readonly=True
states={'draft': [('readonly', False)]}
string='File Header Type ID'
record_type_file_trailer_id
Integer
help='What`s the identification for trailer of file type?'
readonly=True
states={'draft': [('readonly', False)]}
string='File Trailer Type ID'
state
Selection
default='draft'
readonly=True
selection=[('draft', 'Draft'), ('review', 'Review'), ('approved', 'Approved')]
action_approve(self)
action_draft(self)
action_review(self)
check_structure(self)
get_header(self)
get_trailer(self)
output(self, pay_order)
output_dicts(self, pay_order)
output_yaml(self, pay_order)
unlink(self)