Skip to content

Commit

Permalink
Merge pull request #144 from Escodoo/12.0-l10n_br_fiscal-document-inv…
Browse files Browse the repository at this point in the history
…oice-fix_flake8

[12.0-l10n_br_fiscal-document-invoice][FIX] flake8
  • Loading branch information
rvalyi authored Mar 5, 2021
2 parents f6469a7 + ab067f6 commit 7960a1d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
11 changes: 6 additions & 5 deletions l10n_br_account/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
DOCUMENT_ISSUER_PARTNER,
SITUACAO_EDOC_AUTORIZADA,
SITUACAO_EDOC_CANCELADA,
SITUACAO_EDOC_A_ENVIAR,
TAX_FRAMEWORK,
# SITUACAO_EDOC_A_ENVIAR,
# TAX_FRAMEWORK,
)

INVOICE_TO_OPERATION = {
Expand Down Expand Up @@ -345,8 +345,9 @@ def get_taxes_values(self):

@api.multi
def action_move_create(self):
for inv in self.filtered(lambda i: i.fiscal_document_id !=
self.env.ref('l10n_br_fiscal.fiscal_document_dummy')):
for inv in self.filtered(
lambda i: i.fiscal_document_id != self.env.ref(
'l10n_br_fiscal.fiscal_document_dummy')):
if inv.issuer == DOCUMENT_ISSUER_COMPANY:
inv.fiscal_document_id.document_date()
inv.fiscal_document_id.document_number()
Expand Down Expand Up @@ -378,7 +379,7 @@ def open_fiscal_document(self):
(self.env.ref('l10n_br_account.fiscal_invoice_form').id, 'form')]
if 'views' in action:
action['views'] = form_view + [
(state,view) for state,view in action['views']
(state, view) for state, view in action['views']
if view != 'form']
else:
action['views'] = form_view
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_account/models/account_invoice_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from odoo.addons.l10n_br_fiscal.constants.fiscal import (
TAX_FRAMEWORK,
FISCAL_IN_OUT,
# FISCAL_IN_OUT,
)

from .account_invoice import INVOICE_TO_OPERATION
Expand Down
5 changes: 2 additions & 3 deletions l10n_br_account/wizards/wizard_document_correction.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Copyright (C) 2021 Renato Lima - Akretion <renato.lima@akretion.com.br>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from odoo import api, fields, models


class DocumentCorrectionWizard(models.TransientModel):
Expand All @@ -22,7 +21,7 @@ def doit(self):

fiscal_document.correction_reason = wizard.justificative
msg = "Carta de correção: {}".format(wizard.justificative)
document_id.message_post(body=msg)
fiscal_document.message_post(body=msg)

numeros = fiscal_document.fiscal_document_event_ids.filtered(
lambda e: e.type == '14').mapped(
Expand Down
6 changes: 3 additions & 3 deletions l10n_br_sale/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,12 @@ def action_view_invoice(self):
action['domain'] = [('id', 'in', invoices.ids)]
elif len(invoices) == 1:
form_view = [
(self.env.ref('l10n_br_account.fiscal_invoice_form').id,
'form')
(self.env.ref(
'l10n_br_account.fiscal_invoice_form').id, 'form')
]
if 'views' in action:
action['views'] = form_view + [
(state,view) for state,view in action['views']
(state, view) for state, view in action['views']
if view != 'form']
else:
action['views'] = form_view
Expand Down

0 comments on commit 7960a1d

Please sign in to comment.