From 63c367fc1b2a8c7e4b9f00213edae06f5bb50895 Mon Sep 17 00:00:00 2001 From: marinaGD Date: Mon, 3 Dec 2018 17:00:07 -0200 Subject: [PATCH 1/2] clear 'nome_concessionaria' in sicoob when payment_type = fgts, add fgts in payment type, add fgts fields --- br_payment_cnab/bancos/sicoob.py | 5 ++++- br_payment_cnab/models/payment_information.py | 3 ++- br_payment_cnab/models/payment_mode.py | 5 ++++- br_payment_cnab/views/payment_mode.xml | 5 +++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/br_payment_cnab/bancos/sicoob.py b/br_payment_cnab/bancos/sicoob.py index 791b2b7c7..80c4b56d5 100644 --- a/br_payment_cnab/bancos/sicoob.py +++ b/br_payment_cnab/bancos/sicoob.py @@ -74,7 +74,10 @@ def _get_segmento(self, line, lot_sequency, num_lot): 'finalidade_ted': get_ted_doc_finality( 'sicoob', '01', segmento.get('finalidade_doc_ted'), ignore), 'finalidade_doc': get_ted_doc_finality( - 'sicoob', '02', segmento.get('finalidade_doc_ted'), ignore) + 'sicoob', '02', segmento.get('finalidade_doc_ted'), ignore), + 'nome_concessionaria': ( + '' if line.payment_information_id.payment_type == '10' + else segmento.get('nome_concessionaria')) }) return segmento diff --git a/br_payment_cnab/models/payment_information.py b/br_payment_cnab/models/payment_information.py index 719145911..a7cdc8f84 100644 --- a/br_payment_cnab/models/payment_information.py +++ b/br_payment_cnab/models/payment_information.py @@ -54,7 +54,8 @@ def name_get(self): ('04', 'Tributos com código de barras'), ('05', 'GPS - Guia de previdencia Social'), ('06', 'DARF Normal'), - ('09', 'ICMS')], + ('09', 'ICMS'), + ('10', 'FGTS com Código de Barras')], string="Tipo de Operação") warning_code = fields.Selection([ diff --git a/br_payment_cnab/models/payment_mode.py b/br_payment_cnab/models/payment_mode.py index a5539b3f7..0aa06a0c5 100644 --- a/br_payment_cnab/models/payment_mode.py +++ b/br_payment_cnab/models/payment_mode.py @@ -15,7 +15,8 @@ class PaymentMode(models.Model): ('04', 'Tributos com código de barras'), ('05', 'GPS - Guia de previdencia Social'), ('06', 'DARF Normal'), - ('09', 'ICMS')], + ('09', 'ICMS'), + ('10', 'FGTS com Código de Barras')], string="Tipo de Operação") schedule_days_before = fields.Integer('Antecipar em: (dias)') @@ -58,6 +59,8 @@ class PaymentMode(models.Model): numero_referencia = fields.Char('Número de Referência') + fgts_id = fields.Char('Número de Identificação do FGTS') + percentual_receita_bruta_acumulada = fields.Char( string='Percentual de Receita Bruta Acumulada', help='Percentual decorrente da receita bruta acumulada a ser aplicado\ diff --git a/br_payment_cnab/views/payment_mode.xml b/br_payment_cnab/views/payment_mode.xml index 80430bfe4..a67e9a59c 100644 --- a/br_payment_cnab/views/payment_mode.xml +++ b/br_payment_cnab/views/payment_mode.xml @@ -18,11 +18,12 @@ - + - + +

Manuais de configuração

From 671ebc60a87753feb58347d24274a3555f868f42 Mon Sep 17 00:00:00 2001 From: marinaGD Date: Mon, 3 Dec 2018 17:00:43 -0200 Subject: [PATCH 2/2] add fgts fields in voucher --- br_payment_cnab_voucher/models/account_voucher.py | 8 +++++++- br_payment_cnab_voucher/views/account_voucher.xml | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/br_payment_cnab_voucher/models/account_voucher.py b/br_payment_cnab_voucher/models/account_voucher.py index 141fd3d39..a2f0434a6 100644 --- a/br_payment_cnab_voucher/models/account_voucher.py +++ b/br_payment_cnab_voucher/models/account_voucher.py @@ -29,7 +29,8 @@ class AccountVoucher(models.Model): ('06', 'DARF Normal'), ('07', 'DARF Simples'), ('08', 'FGTS'), - ('09', 'ICMS')], + ('09', 'ICMS'), + ('10', 'FGTS com Código de Barras')], string="Tipo de Operação", readonly=True, states={'draft': [('readonly', False)]}) bank_account_id = fields.Many2one( @@ -48,6 +49,11 @@ class AccountVoucher(models.Model): fine_value = fields.Float( 'Fine Value', readonly=True, states={'draft': [('readonly', False)]}) + conec_social_fgts = fields.Char( + string='Lacre Conectividade Social', size=16) + conec_social_dv_fgts = fields.Char( + string='Dígito do Lacre CS', size=9) + _sql_constraints = [ ('account_voucher_barcode_uniq', 'unique (barcode)', _('O código de barras deve ser único!')) diff --git a/br_payment_cnab_voucher/views/account_voucher.xml b/br_payment_cnab_voucher/views/account_voucher.xml index 670f42dba..75027a736 100644 --- a/br_payment_cnab_voucher/views/account_voucher.xml +++ b/br_payment_cnab_voucher/views/account_voucher.xml @@ -9,6 +9,8 @@ + + @@ -16,7 +18,7 @@ -

+