From ad3916c84aee4b08ab831271a2e50c107655a737 Mon Sep 17 00:00:00 2001 From: Magno Costa Date: Mon, 5 Oct 2020 16:49:42 -0300 Subject: [PATCH] [MIG][WIP] Prepare extraction of objects l10n_br.cnab/lote/evento to KMEE module implementation. --- l10n_br_account_payment_order/__manifest__.py | 8 ++++++-- .../migrations/12.0.2.0.0/pre-migration.py | 4 ++++ l10n_br_account_payment_order/models/__init__.py | 10 +++++++--- .../models/bank_payment_line.py | 16 ++++++++++------ .../security/ir.model.access.csv | 3 --- .../views/bank_payment_line.xml | 10 ++++++++-- 6 files changed, 35 insertions(+), 16 deletions(-) diff --git a/l10n_br_account_payment_order/__manifest__.py b/l10n_br_account_payment_order/__manifest__.py index 4d376edbcfa6..11ac518e3112 100644 --- a/l10n_br_account_payment_order/__manifest__.py +++ b/l10n_br_account_payment_order/__manifest__.py @@ -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', diff --git a/l10n_br_account_payment_order/migrations/12.0.2.0.0/pre-migration.py b/l10n_br_account_payment_order/migrations/12.0.2.0.0/pre-migration.py index 5aa639306d0a..c2fa5534eb75 100644 --- a/l10n_br_account_payment_order/migrations/12.0.2.0.0/pre-migration.py +++ b/l10n_br_account_payment_order/migrations/12.0.2.0.0/pre-migration.py @@ -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'), diff --git a/l10n_br_account_payment_order/models/__init__.py b/l10n_br_account_payment_order/models/__init__.py index b0912c2a2fcd..89277c80a6b6 100644 --- a/l10n_br_account_payment_order/models/__init__.py +++ b/l10n_br_account_payment_order/models/__init__.py @@ -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 diff --git a/l10n_br_account_payment_order/models/bank_payment_line.py b/l10n_br_account_payment_order/models/bank_payment_line.py index 8519a996fce6..095453a59bfd 100644 --- a/l10n_br_account_payment_order/models/bank_payment_line.py +++ b/l10n_br_account_payment_order/models/bank_payment_line.py @@ -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', diff --git a/l10n_br_account_payment_order/security/ir.model.access.csv b/l10n_br_account_payment_order/security/ir.model.access.csv index a42c8b36703f..60f4f4205cb3 100644 --- a/l10n_br_account_payment_order/security/ir.model.access.csv +++ b/l10n_br_account_payment_order/security/ir.model.access.csv @@ -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 diff --git a/l10n_br_account_payment_order/views/bank_payment_line.xml b/l10n_br_account_payment_order/views/bank_payment_line.xml index 4b0d81cd2f3b..a4f25bf2a83d 100644 --- a/l10n_br_account_payment_order/views/bank_payment_line.xml +++ b/l10n_br_account_payment_order/views/bank_payment_line.xml @@ -21,13 +21,19 @@ - +