Skip to content

Commit

Permalink
Merge 671ebc6 into 0b55b10
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaGD committed Dec 3, 2018
2 parents 0b55b10 + 671ebc6 commit 8299f6b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
5 changes: 4 additions & 1 deletion br_payment_cnab/bancos/sicoob.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion br_payment_cnab/models/payment_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down
5 changes: 4 additions & 1 deletion br_payment_cnab/models/payment_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)')
Expand Down Expand Up @@ -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\
Expand Down
5 changes: 3 additions & 2 deletions br_payment_cnab/views/payment_mode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
<page string="Informações Adicionais">
<group>
<group>
<field name="service_type" />
<field name="service_type" attrs="{'invisible': [('payment_type', 'not in', ('01', '02', '03', '04', '05', '06', '07', '08', '09'))]}"/>
<field name="mov_finality" attrs="{'invisible': [('payment_type', 'not in', ('01', '02'))]}"/>
<field name="codigo_receita" attrs="{'invisible': [('payment_type', 'not in', ('04', '05', '06', '07', '08', '09'))]}" />
<field name="codigo_receita" attrs="{'invisible': [('payment_type', 'not in', ('04', '05', '06', '07', '08', '09', '10'))]}" />
<field name="numero_referencia" attrs="{'invisible': [('payment_type', 'not in', ('04', '05', '06', '07', '08', '09'))]}" />
<field name="percentual_receita_bruta_acumulada" attrs="{'invisible': [('payment_type', '!=', '07')]}" />
<field name="fgts_id" attrs="{'invisible': [('payment_type', '!=', '10')]}" />
</group>
<div>
<h4>Manuais de configuração</h4>
Expand Down
8 changes: 7 additions & 1 deletion br_payment_cnab_voucher/models/account_voucher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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!'))
Expand Down
4 changes: 3 additions & 1 deletion br_payment_cnab_voucher/views/account_voucher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
<field name="company_id" position="after">
<field name="payment_mode_id" domain="[('type', '=', 'payable')]" />
<field name="payment_type" invisible="1" />
<field name='conec_social_fgts' attrs="{'invisible': [('payment_type', '!=', '10')]}"/>
<field name='conec_social_dv_fgts' attrs="{'invisible': [('payment_type', '!=', '10')]}"/>
<field name="bank_account_id" attrs="{'invisible': [('payment_type', 'not in', ('01', '02'))]}" domain="[('partner_id', '=', partner_id)]"/>
</field>
<field name="tax_amount" position="before">
<field name="interest_value" widget="monetary"/>
<field name="fine_value" widget="monetary"/>
</field>
<group position="inside">
<h3 attrs="{'invisible': [('payment_type', 'not in', ('03', '04'))]}">
<h3 attrs="{'invisible': [('payment_type', 'not in', ('03', '04', '10'))]}">
<strong><label string="Linha Digitável" /></strong>
<field name="linha_digitavel" />
</h3>
Expand Down

0 comments on commit 8299f6b

Please sign in to comment.