Skip to content

Commit

Permalink
Removendo os warnings do projeto
Browse files Browse the repository at this point in the history
  • Loading branch information
danimaribeiro committed Mar 4, 2022
1 parent 1476f39 commit 456ad20
Show file tree
Hide file tree
Showing 16 changed files with 71 additions and 64 deletions.
2 changes: 1 addition & 1 deletion l10n_br_eletronic_document/models/base_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class ImportDeclaration(models.Model):
], 'Tipo de Importação', default='1', required=True)
thirdparty_cnpj = fields.Char('CNPJ', size=18)
thirdparty_state_id = fields.Many2one(
'res.country.state', 'Estado',
'res.country.state', 'Estado Parceiro',
domain="[('country_id.code', '=', 'BR')]")
exporting_code = fields.Char(
'Código do Exportador', required=True, size=60)
Expand Down
98 changes: 49 additions & 49 deletions l10n_br_eletronic_document/models/eletronic_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,35 +88,35 @@ def _compute_tax_totals(self):

# ------------ PIS ---------------------
pis_base_calculo = fields.Monetary(
string='Base de Cálculo', digits='Account',
string='Base PIS', digits='Account',
readonly=True, states=STATE, store=True, compute=_compute_tax_totals)
pis_valor = fields.Monetary(
string='Valor PIS', digits='Account',
readonly=True, states=STATE, store=True, compute=_compute_tax_totals)
pis_valor_retencao = fields.Monetary(
string='Valor Retido', digits='Account',
string='Retenção PIS', digits='Account',
readonly=True, states=STATE, store=True, compute=_compute_tax_totals)

# ------------ COFINS ------------
cofins_base_calculo = fields.Monetary(
string='Base de Cálculo', digits='Account',
string='Base COFINS', digits='Account',
readonly=True, states=STATE, store=True, compute=_compute_tax_totals)
cofins_valor = fields.Monetary(
string='Valor COFINS', digits='Account',
readonly=True, states=STATE, store=True, compute=_compute_tax_totals)
cofins_valor_retencao = fields.Monetary(
string='Valor Retido', digits='Account',
string='Retenção Cofins', digits='Account',
readonly=True, states=STATE, store=True, compute=_compute_tax_totals)

# ----------- ISS -------------
iss_base_calculo = fields.Monetary(
string='Base de Cálculo', digits='Account',
string='Base ISS', digits='Account',
readonly=True, states=STATE, store=True, compute=_compute_tax_totals)
iss_valor = fields.Monetary(
string='Valor ISS', digits='Account',
readonly=True, states=STATE, store=True, compute=_compute_tax_totals)
iss_valor_retencao = fields.Monetary(
string='Valor Retenção', digits='Account',
string='Retenção ISS', digits='Account',
readonly=True, states=STATE, store=True, compute=_compute_tax_totals)

# ------------ CSLL ------------
Expand Down Expand Up @@ -371,17 +371,17 @@ def _compute_valor_estimado_tributos(self):

# Cobrança
numero_fatura = fields.Char(
string=u"Fatura", readonly=True, states=STATE)
string="No. Fatura", readonly=True, states=STATE)
fatura_bruto = fields.Monetary(
string=u"Valor Original", readonly=True, states=STATE)
string="Valor Original", readonly=True, states=STATE)
fatura_desconto = fields.Monetary(
string=u"Desconto", readonly=True, states=STATE)
string="Desconto", readonly=True, states=STATE)
fatura_liquido = fields.Monetary(
string=u"Valor Líquido", readonly=True, states=STATE)
string="Valor Líquido", readonly=True, states=STATE)

duplicata_ids = fields.One2many(
'nfe.duplicata', 'eletronic_document_id',
string=u"Duplicatas", readonly=True, states=STATE)
string="Duplicatas", readonly=True, states=STATE)

# Compras
nota_empenho = fields.Char(
Expand All @@ -403,9 +403,9 @@ def _compute_valor_estimado_tributos(self):
string=u"Protocolo", size=50, readonly=True, states=STATE,
help=u"Protocolo de autorização da NFe", copy=False)
nfe_processada = fields.Binary(
string=u"Xml da NFe", readonly=True, copy=False)
string="Xml NFe", readonly=True, copy=False)
nfe_processada_name = fields.Char(
string=u"Xml da NFe", size=100, readonly=True, copy=False)
string="Nome do XML NFe", size=100, readonly=True, copy=False)

nfse_url = fields.Char(
string="URL da NFe", size=500, readonly=True, copy=False)
Expand Down Expand Up @@ -1122,10 +1122,10 @@ def _compute_tributos_estimados(self):
origem = fields.Selection(
ORIGEM_PROD, string='Origem Mercadoria', readonly=True, states=STATE, default='0')
icms_cst = fields.Selection(
CST_ICMS + CSOSN_SIMPLES, string='Situação Tributária',
CST_ICMS + CSOSN_SIMPLES, string='CST ICMS',
readonly=True, states=STATE)
icms_aliquota = fields.Float(
string='Alíquota', digits='Account',
string='Alíquota ICMS', digits='Account',
readonly=True, states=STATE)
icms_tipo_base = fields.Selection(
[('0', '0 - Margem Valor Agregado (%)'),
Expand All @@ -1134,13 +1134,13 @@ def _compute_tributos_estimados(self):
('3', '3 - Valor da operação')],
string='Modalidade BC do ICMS', readonly=True, states=STATE, default='3')
icms_base_calculo = fields.Monetary(
string='Base de cálculo', digits='Account',
string='Base ICMS', digits='Account',
readonly=True, states=STATE)
icms_aliquota_reducao_base = fields.Float(
string='% Redução Base', digits='Account',
string='% Redução Base ICMS', digits='Account',
readonly=True, states=STATE)
icms_valor = fields.Monetary(
string='Valor Total', digits='Account',
string='Valor ICMS', digits='Account',
readonly=True, states=STATE)
icms_valor_credito = fields.Monetary(
string="Valor de Cŕedito", digits='Account',
Expand All @@ -1164,13 +1164,13 @@ def _compute_tributos_estimados(self):
string='Alíquota', digits='Account',
readonly=True, states=STATE)
icms_st_base_calculo = fields.Monetary(
string='Base de cálculo', digits='Account',
string='Base ICMS ST', digits='Account',
readonly=True, states=STATE)
icms_st_aliquota_reducao_base = fields.Float(
string='% Redução Base', digits='Account',
string='% Redução Base ST', digits='Account',
readonly=True, states=STATE)
icms_st_valor = fields.Monetary(
string='Valor Total', digits='Account',
string='Valor ICMS ST', digits='Account',
readonly=True, states=STATE)

icms_valor_original_operacao = fields.Float(
Expand All @@ -1192,21 +1192,21 @@ def _compute_tributos_estimados(self):
# ----------- IPI -------------------
ipi_cst = fields.Selection(CST_IPI, string='Situação tributária')
ipi_aliquota = fields.Float(
string='Alíquota', digits='Account',
string='Alíquota IPI', digits='Account',
readonly=True, states=STATE)
ipi_base_calculo = fields.Monetary(
string='Base de cálculo', digits='Account',
string='Base IPI', digits='Account',
readonly=True, states=STATE)
ipi_reducao_bc = fields.Float(
string='% Redução Base', digits='Account',
readonly=True, states=STATE)
ipi_valor = fields.Monetary(
string='Valor Total', digits='Account',
string='Valor IPI', digits='Account',
readonly=True, states=STATE)

# ----------- II ----------------------
ii_base_calculo = fields.Monetary(
string='Base de Cálculo', digits='Account',
string='Base II', digits='Account',
readonly=True, states=STATE)
ii_aliquota = fields.Float(
string='Alíquota II', digits='Account',
Expand All @@ -1223,47 +1223,47 @@ def _compute_tributos_estimados(self):

# ------------ PIS ---------------------
pis_cst = fields.Selection(
CST_PIS_COFINS, string='Situação Tributária',
CST_PIS_COFINS, string='CST Pis',
readonly=True, states=STATE)
pis_aliquota = fields.Float(
string='Alíquota', digits='Account',
string='Alíquota PIS', digits='Account',
readonly=True, states=STATE)
pis_base_calculo = fields.Monetary(
string='Base de Cálculo', digits='Account',
string='Base PIS', digits='Account',
readonly=True, states=STATE)
pis_valor = fields.Monetary(
string='Valor Total', digits='Account',
string='Valor PIS', digits='Account',
readonly=True, states=STATE)
pis_valor_retencao = fields.Monetary(
string='Valor Retido', digits='Account',
string='Retenção PIS', digits='Account',
readonly=True, states=STATE)

# ------------ COFINS ------------
cofins_cst = fields.Selection(
CST_PIS_COFINS, string='Situação Tributária',
CST_PIS_COFINS, string='CST COFINS',
readonly=True, states=STATE)
cofins_aliquota = fields.Float(
string='Alíquota', digits='Account',
string='Alíquota COFINS', digits='Account',
readonly=True, states=STATE)
cofins_base_calculo = fields.Monetary(
string='Base de Cálculo', digits='Account',
string='Base COFINS', digits='Account',
readonly=True, states=STATE)
cofins_valor = fields.Monetary(
string='Valor Total', digits='Account',
string='Valor COFINS', digits='Account',
readonly=True, states=STATE)
cofins_valor_retencao = fields.Monetary(
string='Valor Retido', digits='Account',
string='Retenção COFINS', digits='Account',
readonly=True, states=STATE)

# ----------- ISS -------------
iss_aliquota = fields.Float(
string='Alíquota', digits='Account',
string='Alíquota ISS', digits='Account',
readonly=True, states=STATE)
iss_base_calculo = fields.Monetary(
string='Base de Cálculo', digits='Account',
string='Base ISS', digits='Account',
readonly=True, states=STATE)
iss_valor = fields.Monetary(
string='Valor Total', digits='Account',
string='Valor ISS', digits='Account',
readonly=True, states=STATE)
iss_valor_retencao = fields.Monetary(
string='Valor Retenção', digits='Account',
Expand Down Expand Up @@ -1295,10 +1295,10 @@ def _compute_tributos_estimados(self):
string='Retenção IRPJ', digits='Account',
readonly=True, states=STATE)
irrf_base_calculo = fields.Monetary(
string='Base de Cálculo', digits='Account',
string='Base IRRF', digits='Account',
readonly=True, states=STATE)
irrf_aliquota = fields.Float(
string='Alíquota', digits='Account',
string='Alíquota IRRF', digits='Account',
readonly=True, states=STATE)
irrf_valor = fields.Monetary(
string='Valor IRRF', digits='Account',
Expand Down Expand Up @@ -1333,7 +1333,7 @@ def _compute_cst_danfe(self):
classe_enquadramento_ipi = fields.Char(
string="Classe Enquadramento", size=5, readonly=True, states=STATE)
codigo_enquadramento_ipi = fields.Char(
string="Classe Enquadramento", size=3, default='999',
string="Código Enquadramento", size=3, default='999',
readonly=True, states=STATE)

import_declaration_ids = fields.One2many(
Expand All @@ -1343,21 +1343,21 @@ def _compute_cst_danfe(self):
# ----------- ICMS INTERESTADUAL -----------
tem_difal = fields.Boolean(string='Difal?', readonly=True, states=STATE)
icms_bc_uf_dest = fields.Monetary(
string=u'Base ICMS', readonly=True, states=STATE)
string='Base ICMS Difal', readonly=True, states=STATE)
icms_aliquota_fcp_uf_dest = fields.Float(
string=u'% FCP', readonly=True, states=STATE)
string='% FCP', readonly=True, states=STATE)
icms_aliquota_uf_dest = fields.Float(
string=u'% ICMS destino', readonly=True, states=STATE)
string='% ICMS destino', readonly=True, states=STATE)
icms_aliquota_interestadual = fields.Float(
string=u"% ICMS Inter", readonly=True, states=STATE)
string="% ICMS Inter", readonly=True, states=STATE)
icms_aliquota_inter_part = fields.Float(
string=u'% Partilha', default=100.0, readonly=True, states=STATE)
string='% Partilha', default=100.0, readonly=True, states=STATE)
icms_uf_remet = fields.Monetary(
string=u'ICMS Remetente', readonly=True, states=STATE)
string='ICMS Remetente', readonly=True, states=STATE)
icms_uf_dest = fields.Monetary(
string=u'ICMS Destino', readonly=True, states=STATE)
string='ICMS Destino', readonly=True, states=STATE)
icms_fcp_uf_dest = fields.Monetary(
string=u'Valor FCP', readonly=True, states=STATE)
string='Valor FCP', readonly=True, states=STATE)
informacao_adicional = fields.Text(string=u"Informação Adicional")

# =========================================================================
Expand Down
6 changes: 3 additions & 3 deletions l10n_br_eletronic_document/models/nfe_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class CartaCorrecaoEletronicaEvento(models.Model):
)

# Fields CCe
id_cce = fields.Char(string="ID", size=60)
id_cce = fields.Char(string="ID CCE", size=60)
datahora_evento = fields.Datetime(string="Data do Evento")
tipo_evento = fields.Char(string="Código do Evento")
sequencial_evento = fields.Integer(string="Sequencial do Evento")
Expand Down Expand Up @@ -118,9 +118,9 @@ class InutilizedNfe(models.Model):
code = fields.Char(string="Código", size=10)
motive = fields.Char(string="Motivo", size=300)
sent_xml = fields.Binary(string="Xml Envio", readonly=True)
sent_xml_name = fields.Char(string="Xml Envio", size=30, readonly=True)
sent_xml_name = fields.Char(string="Nome Xml Envio", size=30, readonly=True)
received_xml = fields.Binary(string="Xml Recebimento", readonly=True)
received_xml_name = fields.Char(string="Xml Recebimento", size=30, readonly=True)
received_xml_name = fields.Char(string="Nome Xml Recebimento", size=30, readonly=True)

@api.model
def create(self, vals):
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_eletronic_document/views/base_account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<field name="name"/>
<field name="small_name"/>
<newline/>
<group expand='0' string='Agrupar Por...' groups="base.group_extended">
<group expand='0' string='Agrupar Por...'>
<filter name="type" string='Tipo' domain="[]" context="{'group_by' : 'type'}" />
</group>
</search>
Expand Down
4 changes: 2 additions & 2 deletions l10n_br_eletronic_document/wizard/cancel_nfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class CancelNFe(models.TransientModel):
string="Situação")
message = fields.Char(string="Mensagem", size=300, readonly=True)
sent_xml = fields.Binary(string="Xml Envio", readonly=True)
sent_xml_name = fields.Char(string="Xml Envio", size=30, readonly=True)
sent_xml_name = fields.Char(string="Nome Xml Envio", size=30, readonly=True)
received_xml = fields.Binary(string="Xml Recebimento", readonly=True)
received_xml_name = fields.Char(string="Xml Recebimento", size=30, readonly=True)
received_xml_name = fields.Char(string="Nome Xml Recebimento", size=30, readonly=True)

def action_cancel_nfe(self):
if self.edoc_id and len(self.justificativa) > 15:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ def _default_sequence_number(self):
'eletronic.document', string="Documento Eletrônico")
message = fields.Char(string="Mensagem", size=300, readonly=True)
sent_xml = fields.Binary(string="Xml Envio", readonly=True)
sent_xml_name = fields.Char(string="Xml Envio", size=30, readonly=True)
sent_xml_name = fields.Char(string="Nome Xml Envio", size=30, readonly=True)
received_xml = fields.Binary(string="Xml Recebimento", readonly=True)
received_xml_name = fields.Char(
string="Xml Recebimento", size=30, readonly=True)
received_xml_name = fields.Char(string="Nome Xml Recebimento", size=30, readonly=True)

def valida_carta_correcao_eletronica(self):
if len(self.correcao) < 15:
Expand Down
1 change: 1 addition & 0 deletions l10n_br_nfe_import/models/ncm_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@

class NcmCategory(models.Model):
_name = 'l10n_br.ncm.category'
_description = "Categoria de NCM para importar"

name = fields.Char(string="Código")
1 change: 1 addition & 0 deletions l10n_br_nfe_import/wizard/import_nfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

class WizardImportNfe(models.TransientModel):
_name = 'wizard.import.nfe'
_description = "Wizard Importacao NFE"

state = fields.Selection([('ok', 'OK'), ('error', 'Erro')], default='ok')
import_batch_zip = fields.Boolean(
Expand Down
2 changes: 2 additions & 0 deletions l10n_br_nfe_import/wizard/nfe_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

class WizardNFeConfiguration(models.TransientModel):
_name = "wizard.nfe.configuration"
_description = "Wizard Configuracao NFe"

eletronic_doc_id = fields.Many2one("eletronic.document")
partner_id = fields.Many2one("res.partner", string="Parceiro")
Expand Down Expand Up @@ -71,6 +72,7 @@ def action_confirm_items(self):

class WizardNFeConfigurationItem(models.TransientModel):
_name = "wizard.nfe.configuration.item"
_description = "Wizard Configuracao NFe Item"

wizard_id = fields.Many2one('wizard.nfe.configuration')
create_products = fields.Boolean(string='Criar?',
Expand Down
1 change: 1 addition & 0 deletions l10n_br_nfe_import/wizard/xml_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

class WizardXmlImport(models.TransientModel):
_name = 'wizard.xml.import'
_description = "Wizard Importacao XMl"

state = fields.Selection([('ok', 'OK'), ('error', 'Erro')], default='ok')

Expand Down
3 changes: 2 additions & 1 deletion l10n_br_nfe_mde/models/nfe_mde.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def cnpj_cpf_format(cnpj_cpf):

class NfeMde(models.Model):
_name = 'nfe.mde'
_description = "Manifesto de NFe"
_inherit = ['mail.thread', 'mail.activity.mixin', 'mail.bot']
_rec_name = 'numero_sequencial'
_order = 'numero_sequencial desc'
Expand Down Expand Up @@ -102,7 +103,7 @@ def _compute_total_edocs(self):
# readonly=True)
nfe_processada = fields.Binary(string=u"Xml da NFe", readonly=True)
nfe_processada_name = fields.Char(
string=u"Xml da NFe", size=100, readonly=True)
string="Nome Xml da NFe", size=100, readonly=True)
is_processed = fields.Boolean(string="Processado?", default=False)
is_imported = fields.Boolean(string="Importado?", default=False)
total_edocs = fields.Integer(string="Total NFe",
Expand Down
1 change: 1 addition & 0 deletions l10n_br_nfe_mde/models/nfe_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

class NfeSchedule(models.TransientModel):
_name = 'nfe.schedule'
_description = "Scheduler para efetuar download de notas"

state = fields.Selection(
string="Estado",
Expand Down
1 change: 1 addition & 0 deletions l10n_br_nfe_mde/wizard/operation_not_performed.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

class OperationNotPerformed(models.TransientModel):
_name = 'wizard.operation.not.perfomed'
_description = "Wizard Operacao nao Confirmada"

mde_id = fields.Many2one('nfe.mde', string="Documento")
justificativa = fields.Text('Justificativa', size=255, required=True)
Expand Down
Loading

0 comments on commit 456ad20

Please sign in to comment.