Skip to content

Commit

Permalink
[MIG][WIP] Prepare extraction of objects l10n_br.cnab/lote/evento to …
Browse files Browse the repository at this point in the history
…KMEE module implementation.
  • Loading branch information
mbcosta committed Oct 5, 2020
1 parent 83be8bb commit ad3916c
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 16 deletions.
8 changes: 6 additions & 2 deletions l10n_br_account_payment_order/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@
'views/account_payment_mode.xml',
'views/res_company.xml',
'views/bank_payment_line.xml',
'views/l10n_br_cnab_retorno_view.xml',
'views/l10n_br_cnab_evento_views.xml',
# TODO - mover os cnab/lote/evento para o modulo de implentacao da
# KMEE, já que para importacao do arquivo CNAB de retorno a Akretion
# passou a usar o account_move_base_import, estou mantendo a visão
# para permirtir a extração e assim preservar o histórico de commits
# 'views/l10n_br_cnab_retorno_view.xml',
# 'views/l10n_br_cnab_evento_views.xml',
'views/account_invoice.xml',
'views/account_move_line.xml',
# 'views/l10n_br_payment_cnab.xml',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
('mensagem_erro_exportacao', 'export_error_message'),
('ultimo_estado_cnab', 'last_cnab_state')
],
# TODO - mover os cnab/lote/evento para o modulo de implentacao da KMEE,
# já que para importacao do arquivo CNAB de retorno a Akretion passou a
# usar o account_move_base_import, estou mantendo o código para permirtir
# a extração e assim preservar o histórico de commits
'l10n_br.cnab.evento': [
('data_real_pagamento', 'real_payment_date'),
('data_ocorrencia', 'occurrence_date'),
Expand Down
10 changes: 7 additions & 3 deletions l10n_br_account_payment_order/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
from . import account_payment_line
from . import account_payment
from . import bank_payment_line
from . import l10n_br_cnab
from . import l10n_br_cnab_evento
from . import l10n_br_cnab_lote
# TODO - mover os cnab/lote/evento para o modulo de implentacao da KMEE,
# já que para importacao do arquivo CNAB de retorno a Akretion passou a
# usar o account_move_base_import, estou mantendo o código para permirtir
# a extração e assim preservar o histórico de commits
# from . import l10n_br_cnab
# from . import l10n_br_cnab_evento
# from . import l10n_br_cnab_lote
from . import cnab_return_move_code
16 changes: 10 additions & 6 deletions l10n_br_account_payment_order/models/bank_payment_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,16 @@ def default_get(self, fields_list):
help='Campo G048 do CNAB',
)

event_id = fields.One2many(
string='Eventos CNAB',
comodel_name='l10n_br.cnab.evento',
inverse_name='bank_payment_line_id',
readonly=True,
)
# TODO - mover os cnab/lote/evento para o modulo de implentacao da KMEE,
# já que para importacao do arquivo CNAB de retorno a Akretion passou a
# usar o account_move_base_import, estou mantendo o código para permirtir
# a extração e assim preservar o histórico de commits
# event_id = fields.One2many(
# string='Eventos CNAB',
# comodel_name='l10n_br.cnab.evento',
# inverse_name='bank_payment_line_id',
# readonly=True,
# )

own_number = fields.Char(
string='Nosso Numero',
Expand Down
3 changes: 0 additions & 3 deletions l10n_br_account_payment_order/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
access_l10n_br_cnab,access_l10n_br_cnab,model_l10n_br_cnab,group_cnab_cobranca,1,1,1,1
access_l10n_br_cnab_lote,access_l10n_br_cnab_lote,model_l10n_br_cnab_lote,group_cnab_cobranca,1,1,1,1
access_l10n_br_cnab_evento,access_l10n_br_cnab_evento,model_l10n_br_cnab_evento,group_cnab_cobranca,1,1,1,1
access_cnab_return_move_code,access_cnab_return_move_code,model_cnab_return_move_code,group_cnab_cobranca,1,1,1,1
10 changes: 8 additions & 2 deletions l10n_br_account_payment_order/views/bank_payment_line.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@
<field name="fee_value"/>
<field name="favored_warning"/>
</group>
<xpath expr="//group[@name='payment-lines'"
<!--
# TODO - mover os cnab/lote/evento para o modulo de implentacao da KMEE,
# já que para importacao do arquivo CNAB de retorno a Akretion passou a
# usar o account_move_base_import, estou mantendo o código para permirtir
# a extração e assim preservar o histórico de commits
-->
<!--<xpath expr="//group[@name='payment-lines'"
position="after">
<group string="Histórico de Eventos CNAB Relacionados"
name="evento-lines">
<field name="event_id" nolabel="1"/>
</group>
</xpath>
</xpath>-->
</group>
</field>
</record>
Expand Down

0 comments on commit ad3916c

Please sign in to comment.