diff --git a/l10n_br_account_nfe/tests/test_nfe_generate_tags_cobr_dup_pag.py b/l10n_br_account_nfe/tests/test_nfe_generate_tags_cobr_dup_pag.py index 1ef04263339a..00c845b8db51 100644 --- a/l10n_br_account_nfe/tests/test_nfe_generate_tags_cobr_dup_pag.py +++ b/l10n_br_account_nfe/tests/test_nfe_generate_tags_cobr_dup_pag.py @@ -120,7 +120,7 @@ def setUpClass(cls): ) def test_nfe_generate_tag_pag(self): - """ Test NFe generate TAG PAG.""" + """Test NFe generate TAG PAG.""" # Dados criados no teste for detPag in self.invoice.nfe40_detPag: self.assertEqual(detPag.nfe40_indPag, "1", "Error in nfe40_indPag field.") @@ -135,7 +135,7 @@ def test_nfe_generate_tag_pag(self): self.assertEqual(detPag.nfe40_vPag, 1000.0, "Error in nfe40_vPag field.") def test_nfe_generate_tag_cobr_and_dup(self): - """ Test NFe generate TAG COBR e DUP.""" + """Test NFe generate TAG COBR e DUP.""" # Dados criados no teste self.assertEqual(self.invoice.nfe40_vOrig, 472.5) self.assertEqual(self.invoice.nfe40_vDesc, 0.0) diff --git a/l10n_br_account_payment_brcobranca/tests/test_payment_order.py b/l10n_br_account_payment_brcobranca/tests/test_payment_order.py index 2a05fd38d240..e29bc231a07c 100644 --- a/l10n_br_account_payment_brcobranca/tests/test_payment_order.py +++ b/l10n_br_account_payment_brcobranca/tests/test_payment_order.py @@ -213,7 +213,7 @@ def test_banco_ailos_cnab_240(self): ) def test_bank_cnab_not_implement_brcobranca(self): - """ Test Bank CNAB not implemented in BRCobranca.""" + """Test Bank CNAB not implemented in BRCobranca.""" invoice = self.env.ref( "l10n_br_account_payment_order.demo_invoice_payment_order_itau_cnab240" ) @@ -228,7 +228,7 @@ def test_bank_cnab_not_implement_brcobranca(self): invoice.view_boleto_pdf() def test_payment_order_invoice_cancel_process(self): - """ Test Payment Order and Invoice Cancel process.""" + """Test Payment Order and Invoice Cancel process.""" payment_order = self.env["account.payment.order"].search( [("payment_mode_id", "=", self.invoice_cef.payment_mode_id.id)] diff --git a/l10n_br_account_payment_order/models/l10n_br_cnab_boleto_fields.py b/l10n_br_account_payment_order/models/l10n_br_cnab_boleto_fields.py index 6cd3368aab68..edab45ceb949 100644 --- a/l10n_br_account_payment_order/models/l10n_br_cnab_boleto_fields.py +++ b/l10n_br_account_payment_order/models/l10n_br_cnab_boleto_fields.py @@ -146,7 +146,7 @@ class L10nBrCNABBoletoFields(models.Model): ) boleto_discount_perc = fields.Float( - string=u"Percentual de Desconto até a Data de Vencimento", + string="Percentual de Desconto até a Data de Vencimento", digits=dp.get_precision("Account"), track_visibility="always", ) diff --git a/l10n_br_account_payment_order/tests/test_base_class.py b/l10n_br_account_payment_order/tests/test_base_class.py index 3ce2a6d4f4b2..8d5fa0007473 100644 --- a/l10n_br_account_payment_order/tests/test_base_class.py +++ b/l10n_br_account_payment_order/tests/test_base_class.py @@ -20,14 +20,14 @@ def setUpClass(cls): ) def _payment_order_all_workflow(self, payment_order_id): - """ Run all Payment Order Workflow""" + """Run all Payment Order Workflow""" payment_order_id.draft2open() payment_order_id.open2generated() payment_order_id.generated2uploaded() payment_order_id.action_done() def _invoice_payment_order_all_workflow(self, invoice): - """ Search for the payment order related to the invoice""" + """Search for the payment order related to the invoice""" payment_order_id = self.env["account.payment.order"].search( [ ("state", "=", "draft"), @@ -39,7 +39,7 @@ def _invoice_payment_order_all_workflow(self, invoice): return payment_order_id def _prepare_change_view(self, financial_move_line_ids): - """ Prepare context of the change view""" + """Prepare context of the change view""" ctx = dict( active_ids=financial_move_line_ids.ids, active_model="account.move.line" ) diff --git a/l10n_br_account_payment_order/tests/test_invoice_manual_workflow.py b/l10n_br_account_payment_order/tests/test_invoice_manual_workflow.py index e50caafb82ff..9d84f068fe50 100644 --- a/l10n_br_account_payment_order/tests/test_invoice_manual_workflow.py +++ b/l10n_br_account_payment_order/tests/test_invoice_manual_workflow.py @@ -24,13 +24,13 @@ def _invoice_confirm_flow(self): self.assertEqual(self.invoice_manual_test.state, "open") def test_invoice_button(self): - """ Test Invoice Button to Add to a payment order""" + """Test Invoice Button to Add to a payment order""" self._invoice_confirm_flow() self.invoice_manual_test.create_account_payment_line() self._invoice_payment_order_all_workflow(self.invoice_manual_test) def test_payment_order_wizard(self): - """ Test Payment Order Wizard""" + """Test Payment Order Wizard""" self._invoice_confirm_flow() payment_mode_id = self.invoice_manual_test.payment_mode_id self.import_with_po_wizard(payment_mode_id) diff --git a/l10n_br_account_payment_order/tests/test_invoice_normal_workflow.py b/l10n_br_account_payment_order/tests/test_invoice_normal_workflow.py index 4ecf37411b15..2c111f7bd2aa 100644 --- a/l10n_br_account_payment_order/tests/test_invoice_normal_workflow.py +++ b/l10n_br_account_payment_order/tests/test_invoice_normal_workflow.py @@ -16,7 +16,7 @@ def setUpClass(cls): ) def test_cancel_invoice_no_payment_mode_pay(self): - """ Test Pay Invoice without payment mode in cash""" + """Test Pay Invoice without payment mode in cash""" self.invoice_customer_without_paymeny_mode.action_invoice_open() # I check that the invoice state is "Open" @@ -37,7 +37,7 @@ def test_cancel_invoice_no_payment_mode_pay(self): ) def test_cancel_invoice_no_payment_mode_cancel(self): - """ Test Cancel Invoice Without Payment Mode """ + """Test Cancel Invoice Without Payment Mode""" self.invoice_customer_without_paymeny_mode.action_invoice_cancel() # I check that the invoice state is "Cancel" diff --git a/l10n_br_account_payment_order/tests/test_payment_order.py b/l10n_br_account_payment_order/tests/test_payment_order.py index ec447719ea4c..963e57ef149e 100644 --- a/l10n_br_account_payment_order/tests/test_payment_order.py +++ b/l10n_br_account_payment_order/tests/test_payment_order.py @@ -17,7 +17,7 @@ def setUpClass(cls): ) def test_payment_mode_without_payment_order(self): - """ Test Invoice when Payment Mode not generate Payment Order. """ + """Test Invoice when Payment Mode not generate Payment Order.""" self.invoice_cheque._onchange_payment_mode_id() # I validate invoice by creating on self.invoice_cheque.action_invoice_open() @@ -29,7 +29,7 @@ def test_payment_mode_without_payment_order(self): self.assertEqual(len(payment_order), 0) def test_bra_number_constrains(self): - """ Test bra_number constrains. """ + """Test bra_number constrains.""" self.banco_bradesco = self.env["res.bank"].search([("code_bc", "=", "033")]) with self.assertRaises(ValidationError): self.env["res.partner.bank"].create( diff --git a/l10n_br_account_payment_order/tests/test_payment_order_change.py b/l10n_br_account_payment_order/tests/test_payment_order_change.py index 1eeb5c682e36..a7d7e647c123 100644 --- a/l10n_br_account_payment_order/tests/test_payment_order_change.py +++ b/l10n_br_account_payment_order/tests/test_payment_order_change.py @@ -31,7 +31,7 @@ def setUpClass(cls): assert cls.financial_move_line_1, "Move 1 not created for open invoice" def test_change_date_maturity_multiple(self): - """ Test Creation of a Payment Order an change MULTIPLE due date """ + """Test Creation of a Payment Order an change MULTIPLE due date""" self._invoice_payment_order_all_workflow(self.invoice_auto) date_maturity = self.financial_move_line_ids.mapped("date_maturity") new_date = date.today() + timedelta(days=120) @@ -67,7 +67,7 @@ def test_change_date_maturity_multiple(self): ), "Payment Order with wrong mov_instruction_code_id" def test_change_date_maturity_one(self): - """ Test Creation of a Payment Order an change ONE due date """ + """Test Creation of a Payment Order an change ONE due date""" self._invoice_payment_order_all_workflow(self.invoice_auto) date_maturity = self.financial_move_line_0.mapped("date_maturity") new_date = date.today() + timedelta(days=120) @@ -124,7 +124,7 @@ def test_change_date_maturity_one(self): # ) def test_change_not_payment(self): - """ Test Creation of a Payment Order an change not_payment """ + """Test Creation of a Payment Order an change not_payment""" self._invoice_payment_order_all_workflow(self.invoice_auto) financial_move_line_ids = self.invoice_auto.financial_move_line_ids[0] with Form( @@ -152,7 +152,7 @@ def test_change_not_payment(self): ), "Payment Order with wrong mov_instruction_code_id" def test_change_protest_tittle(self): - """ Test Creation of a Payment Order an change protest_tittle """ + """Test Creation of a Payment Order an change protest_tittle""" self._invoice_payment_order_all_workflow(self.invoice_auto) financial_move_line_ids = self.invoice_auto.financial_move_line_ids[0] with Form( @@ -180,7 +180,7 @@ def test_change_protest_tittle(self): ), "Payment Order with wrong mov_instruction_code_id" def test_change_suspend_protest_keep_wallet(self): - """ Test Creation of a Payment Order an change suspend_protest_keep_wallet """ + """Test Creation of a Payment Order an change suspend_protest_keep_wallet""" self._invoice_payment_order_all_workflow(self.invoice_auto) financial_move_line_ids = self.invoice_auto.financial_move_line_ids[0] with Form( @@ -208,7 +208,7 @@ def test_change_suspend_protest_keep_wallet(self): ), "Payment Order with wrong mov_instruction_code_id" def test_change_suspend_grant_rebate(self): - """ Test Creation of a Payment Order an change grant_rebate """ + """Test Creation of a Payment Order an change grant_rebate""" self._invoice_payment_order_all_workflow(self.invoice_auto) financial_move_line_ids = self.invoice_auto.financial_move_line_ids[0] with Form( @@ -237,7 +237,7 @@ def test_change_suspend_grant_rebate(self): ), "Payment Order with wrong mov_instruction_code_id" def test_change_suspend_grant_discount(self): - """ Test Creation of a Payment Order an change grant_discount """ + """Test Creation of a Payment Order an change grant_discount""" self._invoice_payment_order_all_workflow(self.invoice_auto) financial_move_line_ids = self.invoice_auto.financial_move_line_ids[0] with Form( @@ -266,7 +266,7 @@ def test_change_suspend_grant_discount(self): ), "Payment Order with wrong mov_instruction_code_id" def test_change_suspend_cancel_rebate(self): - """ Test Creation of a Payment Order an change cancel_rebate """ + """Test Creation of a Payment Order an change cancel_rebate""" self._invoice_payment_order_all_workflow(self.invoice_auto) financial_move_line_ids = self.invoice_auto.financial_move_line_ids[0] with Form( @@ -294,7 +294,7 @@ def test_change_suspend_cancel_rebate(self): ), "Payment Order with wrong mov_instruction_code_id" def test_change_suspend_cancel_discount(self): - """ Test Creation of a Payment Order an change cancel_discount """ + """Test Creation of a Payment Order an change cancel_discount""" self._invoice_payment_order_all_workflow(self.invoice_auto) financial_move_line_ids = self.invoice_auto.financial_move_line_ids[0] with Form( diff --git a/l10n_br_account_payment_order/tests/test_payment_order_inbound.py b/l10n_br_account_payment_order/tests/test_payment_order_inbound.py index 77260d4833ff..4677ce03e2a1 100644 --- a/l10n_br_account_payment_order/tests/test_payment_order_inbound.py +++ b/l10n_br_account_payment_order/tests/test_payment_order_inbound.py @@ -43,7 +43,7 @@ def setUpClass(cls): ) def test_create_payment_order(self): - """ Test Create Payment Order """ + """Test Create Payment Order""" # I check that Initially customer invoice is in the "Draft" state self.assertEqual(self.invoice_cef.state, "draft") @@ -214,7 +214,7 @@ def test_payment_outside_cnab_payment_order_open(self): register_payments.create_payments() def test_cancel_invoice_payment_order_draft(self): - """ Test Cancel Invoice when Payment Order Draft.""" + """Test Cancel Invoice when Payment Order Draft.""" # I validate invoice by creating on self.invoice_unicred.action_invoice_open() diff --git a/l10n_br_base/models/res_company.py b/l10n_br_base/models/res_company.py index 9e170d57fe08..4a109f170724 100644 --- a/l10n_br_base/models/res_company.py +++ b/l10n_br_base/models/res_company.py @@ -31,29 +31,29 @@ def _get_company_address_fields(self, partner): return partner_fields def _inverse_legal_name(self): - """ Write the l10n_br specific functional fields. """ + """Write the l10n_br specific functional fields.""" for company in self: company.partner_id.legal_name = company.legal_name def _inverse_district(self): - """ Write the l10n_br specific functional fields. """ + """Write the l10n_br specific functional fields.""" for company in self: company.partner_id.district = company.district def _inverse_cnpj_cpf(self): - """ Write the l10n_br specific functional fields. """ + """Write the l10n_br specific functional fields.""" for company in self: company.partner_id.cnpj_cpf = company.cnpj_cpf def _inverse_state(self): - """ Write the l10n_br specific functional fields. """ + """Write the l10n_br specific functional fields.""" for company in self: company.partner_id.write( {"state_id": company.state_id.id, "inscr_est": company.inscr_est} ) def _inverse_state_tax_number_ids(self): - """ Write the l10n_br specific functional fields. """ + """Write the l10n_br specific functional fields.""" for company in self: state_tax_number_ids = self.env["state.tax.numbers"] for ies in company.state_tax_number_ids: @@ -61,17 +61,17 @@ def _inverse_state_tax_number_ids(self): company.partner_id.state_tax_number_ids = state_tax_number_ids def _inverse_inscr_mun(self): - """ Write the l10n_br specific functional fields. """ + """Write the l10n_br specific functional fields.""" for company in self: company.partner_id.inscr_mun = company.inscr_mun def _inverse_city_id(self): - """ Write the l10n_br specific functional fields. """ + """Write the l10n_br specific functional fields.""" for company in self: company.partner_id.city_id = company.city_id def _inverse_suframa(self): - """ Write the l10n_br specific functional fields. """ + """Write the l10n_br specific functional fields.""" for company in self: company.partner_id.suframa = company.suframa diff --git a/l10n_br_base/tests/test_amount_to_text.py b/l10n_br_base/tests/test_amount_to_text.py index 108a48ce3b2a..c06d0794e91e 100644 --- a/l10n_br_base/tests/test_amount_to_text.py +++ b/l10n_br_base/tests/test_amount_to_text.py @@ -35,27 +35,27 @@ def test_02_amount_to_text(self): def test_03_amount_to_text(self): self.assertEqual( self.n2w.to_currency(77777.0), - u"setenta e sete mil, setecentos e setenta" u" e sete reais", + "setenta e sete mil, setecentos e setenta" " e sete reais", ) def test_04_amount_to_text(self): self.assertEqual( self.n2w.to_currency(1856333.0), - u"um milhão, oitocentos e cinquenta e seis mil," - u" trezentos e trinta e três reais", + "um milhão, oitocentos e cinquenta e seis mil," + " trezentos e trinta e três reais", ) def test_05_amount_to_text(self): self.assertEqual( self.n2w.to_currency(9999999.0), - u"nove milhões, novecentos e noventa e nove mil," - u" novecentos e noventa e nove reais", + "nove milhões, novecentos e noventa e nove mil," + " novecentos e noventa e nove reais", ) def test_06_amount_to_text(self): self.assertEqual( self.n2w.to_currency(9999999999.0), - u"nove bilhões, novecentos e noventa e nove milhões," - u" novecentos e noventa e nove mil, novecentos e" - u" noventa e nove reais", + "nove bilhões, novecentos e noventa e nove milhões," + " novecentos e noventa e nove mil, novecentos e" + " noventa e nove reais", ) diff --git a/l10n_br_crm/models/crm_lead.py b/l10n_br_crm/models/crm_lead.py index 8466cce8440a..cdd66325a0e9 100644 --- a/l10n_br_crm/models/crm_lead.py +++ b/l10n_br_crm/models/crm_lead.py @@ -16,7 +16,7 @@ class Lead(models.Model): - """ CRM Lead Case """ + """CRM Lead Case""" _inherit = "crm.lead" diff --git a/l10n_br_crm/tests/test_crm_lead.py b/l10n_br_crm/tests/test_crm_lead.py index ccd85265333c..46887507fd49 100644 --- a/l10n_br_crm/tests/test_crm_lead.py +++ b/l10n_br_crm/tests/test_crm_lead.py @@ -103,7 +103,7 @@ def test_conversion(self): ) def test_create_partner(self): - """ Create a Partner and check the if the fields were filled """ + """Create a Partner and check the if the fields were filled""" self.partner_id = self.crm_lead_company._create_lead_partner() self.obj_partner = self.env["res.partner"].browse(self.partner_id.id) @@ -163,7 +163,7 @@ def test_conversion_contact(self): ) def test_create_contact(self): - """ Create a Contact and check the if the fields were filled """ + """Create a Contact and check the if the fields were filled""" self.partner_id = self.crm_lead_contact._create_lead_partner() self.obj_partner = self.env["res.partner"].browse(self.partner_id.id) diff --git a/l10n_br_fiscal/models/comment.py b/l10n_br_fiscal/models/comment.py index dbcfa8939f3a..99f9e526f76c 100644 --- a/l10n_br_fiscal/models/comment.py +++ b/l10n_br_fiscal/models/comment.py @@ -103,17 +103,17 @@ def format_amount(self, env, amount, currency): formatted_amount = ( lang.format(fmt, currency.round(amount), grouping=True, monetary=True) - .replace(r" ", u"\N{NO-BREAK SPACE}") - .replace(r"-", u"-\N{ZERO WIDTH NO-BREAK SPACE}") + .replace(r" ", "\N{NO-BREAK SPACE}") + .replace(r"-", "-\N{ZERO WIDTH NO-BREAK SPACE}") ) - pre = post = u"" + pre = post = "" if currency.position == "before": - pre = u"{symbol}\N{NO-BREAK SPACE}".format(symbol=currency.symbol or "") + pre = "{symbol}\N{NO-BREAK SPACE}".format(symbol=currency.symbol or "") else: - post = u"\N{NO-BREAK SPACE}{symbol}".format(symbol=currency.symbol or "") + post = "\N{NO-BREAK SPACE}{symbol}".format(symbol=currency.symbol or "") - return u"{pre}{0}{post}".format(formatted_amount, pre=pre, post=post) + return "{pre}{0}{post}".format(formatted_amount, pre=pre, post=post) def compute_message(self, vals, manual_comment=None): diff --git a/l10n_br_fiscal/models/partner_profile.py b/l10n_br_fiscal/models/partner_profile.py index d65bab05d95b..2d635d70d2f9 100644 --- a/l10n_br_fiscal/models/partner_profile.py +++ b/l10n_br_fiscal/models/partner_profile.py @@ -23,7 +23,7 @@ class PartnerProfile(models.Model): is_company = fields.Boolean(string="Is Company?") - default = fields.Boolean(string=u"Default Profile", default=True) + default = fields.Boolean(string="Default Profile", default=True) ind_ie_dest = fields.Selection( selection=NFE_IND_IE_DEST, @@ -87,8 +87,8 @@ def _check_default(self): ): raise ValidationError( _( - u"Mantenha apenas um tipo fiscal padrão" - u" para Pessoa Física ou para Pessoa Jurídica!" + "Mantenha apenas um tipo fiscal padrão" + " para Pessoa Física ou para Pessoa Jurídica!" ) ) return True diff --git a/l10n_br_fiscal/models/res_company.py b/l10n_br_fiscal/models/res_company.py index 08f86e4604e4..82bf6ed32c81 100644 --- a/l10n_br_fiscal/models/res_company.py +++ b/l10n_br_fiscal/models/res_company.py @@ -50,7 +50,7 @@ def default_get(self, fields): return rec def _get_company_address_fields(self, partner): - """ Read the l10n_br specific functional fields. """ + """Read the l10n_br specific functional fields.""" partner_fields = super()._get_company_address_fields(partner) partner_fields.update( { @@ -61,12 +61,12 @@ def _get_company_address_fields(self, partner): return partner_fields def _inverse_cnae_main_id(self): - """ Write the l10n_br specific functional fields. """ + """Write the l10n_br specific functional fields.""" for c in self: c.partner_id.cnae_main_id = c.cnae_main_id def _inverse_tax_framework(self): - """ Write the l10n_br specific functional fields. """ + """Write the l10n_br specific functional fields.""" for c in self: c.partner_id.tax_framework = c.tax_framework diff --git a/l10n_br_fiscal/tests/test_certificate.py b/l10n_br_fiscal/tests/test_certificate.py index eaa7a13c0177..fda8abe782fb 100644 --- a/l10n_br_fiscal/tests/test_certificate.py +++ b/l10n_br_fiscal/tests/test_certificate.py @@ -62,7 +62,7 @@ def _create_compay(self): return company def _switch_user_company(self, user, company): - """ Add a company to the user's allowed & set to current. """ + """Add a company to the user's allowed & set to current.""" user.write( { "company_ids": [(6, 0, (company + user.company_ids).ids)], diff --git a/l10n_br_fiscal/tests/test_cnae.py b/l10n_br_fiscal/tests/test_cnae.py index bc06e7984c72..8419c3edab13 100644 --- a/l10n_br_fiscal/tests/test_cnae.py +++ b/l10n_br_fiscal/tests/test_cnae.py @@ -7,7 +7,7 @@ class TestCNAE(TransactionCase): def test_name_get(self): - """ Test CNAE name_get()""" + """Test CNAE name_get()""" self.cnae = self.env["l10n_br_fiscal.cnae"].create( { "code": "TESTE", diff --git a/l10n_br_fiscal/tests/test_fiscal_closing.py b/l10n_br_fiscal/tests/test_fiscal_closing.py index e8700b6b3bde..28bfa34cac6f 100644 --- a/l10n_br_fiscal/tests/test_fiscal_closing.py +++ b/l10n_br_fiscal/tests/test_fiscal_closing.py @@ -34,7 +34,7 @@ def setUp(self): ) def test_event_to_fiscal_close(self): - """ Test Fiscal Close Export """ + """Test Fiscal Close Export""" xml_file = '2619221333Venda55116872018-08-16T16:28:18-03:002018-08-16T16:28:18-03:0012261160611911000Odoo Brasil v875335849000115Teste Produtos Médicos Ltda - METeste Produtos Médicos Ltda - MEAvenida Manoel1Boa Vista2611606RecifePE500701231058Brasil0123456789306412330337148260000119MEDICOS, HOSP, IMP. E EXP. LTDAAv. Doutor Pedro1Sala 4Ponta da Praia3548500SantosSP110250121058Brasil999999991803879214167880945SEM GTINESPAÇADOR TEMPORARIO DE ACRILICO PARA QUADRIL COM GENTAMICINA902110106102UN1.00002490.00000002490.00SEM GTINUN1.00002490.000000010.00140999510707880930SEM GTINESPAÇADOR TEMPORARIO DE ACRILICO PARA QUADRIL COM GENTAMICINA902110106102UN1.00002490.00000002490.00SEM GTINUN1.00002490.000000010.00140999510707880200SEM GTINCIMENTO ACRÍLICO G 40G - APLICAÇÃO MANUAL COM GENTAMICINA300640206102UN4.0000200.0000000800.00SEM GTINUN4.0000200.000000010.001409995106060.000.000.000.000.000.000.000.005780.000.000.000.000.000.000.000.000.000.005780.00102012862002707LATAM LINHAS AEREAS S/A024673560PRACA MINISTRO SALGADO FILHO, S/N, IMBIRIBEIRARecifePE1CAIXA DE PAPELÃOS/ MARCA16875780.000.005780.000012018-09-252890.000022018-11-042890.00995780.00- NCM:9021.10.10 - Alíquotas da COFINS e do PIS Reduzidas a Zero pela Lei pela Lei 10.865/2004 ( Redação da Lei 12.058/2009 ) - Isento de ICMS pelo Convênio 126/2010.NCM:3006.40.20 - Isento de ICMS até 30/09/2019 pelos Convênios 01/99 e 049/2017 - Alíquotas da COFINS e do PIS Reduzidas a Zero pelo Decreto 6426/2008.x7gyL3XnoxBJdNazenJGuNwqRIQ=fwCykhp3tX/+E3uomHDLVmZB8qX7X6MBJsPluFn4SgDRXenw5Umxgb9NORDE9j/uhsYE7vwJT+T5mslK88jOCDp0loi5z89jmzK9T+/tdwOTHL5FF0oRWvm4MUP3wxFIClfPHzEYL308uVGC9RH1lVa0RjPUPhSj2ikSWHIJwZx5koIdW2b23iLa3ACSjWHLFUs3C6k0ZVRjz70smR/Dn8WuEZs2b1kW2KYmG81nrK+iIO6IQrETwSX+whX/TuL6Z9c0HwOArteAB5pMLL76MJlwwgyUdO/V7SlM1TErsILSHNUZjkOo+5RsWQfAbdsVi0UFDMgkIFm2uc+TxqcKrA==MIIHejCCBWKgAwIBAgIITKnRnque5/QwDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCQlIxEzARBgNVBAoMCklDUC1CcmFzaWwxKDAmBgNVBAMMH1NFUkFTQSBDZXJ0aWZpY2Fkb3JhIERpZ2l0YWwgdjUwHhcNMTgwMjE2MTQ1NDAwWhcNMTkwMjE2MTQ1NDAwWjCB8jELMAkGA1UEBhMCQlIxEzARBgNVBAoMCklDUC1CcmFzaWwxFDASBgNVBAsMCyhFTSBCUkFOQ08pMRgwFgYDVQQLDA8wMDAwMDEwMDgyMjE2ODYxFDASBgNVBAsMCyhFTSBCUkFOQ08pMRQwEgYDVQQLDAsoRU0gQlJBTkNPKTEUMBIGA1UECwwLKEVNIEJSQU5DTykxFDASBgNVBAsMCyhFTSBCUkFOQ08pMRQwEgYDVQQLDAsoRU0gQlJBTkNPKTEwMC4GA1UEAwwnU1VCSVRPTiBCUkFTSUwgUFJPRFVUT1MgTUVESUNPUyBMVERBIE1FMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn5AU9/g869aJ2d3ju2yqDCKE38bI1xJRH2vulmla0Nl9Z7cahJX7YbJ4Fgn2GWFp/RrP0gsPwDJrLScGhwwYRCQ0r68z4s4wwNw6HUUm4ig5vIsX7ZCe/BErhtUoycPAUZPUD5tPw5bQM3qQvLFKbk88u+YOJRnhOlkarzd8UrCkQqphKwH3ggot8A9AHRDJmX1EeXsnqWetvmKM8mhnp02FDlHGBpQ3MZnfs0lYB+kktA0RVTovT94bkbW4bpiQb4/5GoT0LscJICABz+TfXfEa0+aDst10myXqMJP+YGnMFIhEKzSrSA5MQrKiyOC9lx+hNNPyTOehpD33Cop/JQIDAQABo4ICtzCCArMwHwYDVR0jBBgwFoAUVnWvSnOy2AjEfftsKBwR1ffBqMwwgZcGCCsGAQUFBwEBBIGKMIGHMEcGCCsGAQUFBzAChjtodHRwOi8vd3d3LmNlcnRpZmljYWRvZGlnaXRhbC5jb20uYnIvY2FkZWlhcy9zZXJhc2FjZHY1LnA3YjA8BggrBgEFBQcwAYYwaHR0cDovL29jc3AuY2VydGlmaWNhZG9kaWdpdGFsLmNvbS5ici9zZXJhc2FjZHY1MIG1BgNVHREEga0wgaqBFlJPQkVSVEFAU1VCSVRPTi5DT00uQlKgPgYFYEwBAwSgNRMzMDgwMzE5ODkwNzY2MTg1OTQwODAwMDAwMDAwMDAwMDAwMDAwMDA3MzE5NjA0U0RTIFBFoBwGBWBMAQMCoBMTEVJPQkVSVEEgRElBUyBMSU5ToBkGBWBMAQMDoBATDjEyOTg0Nzk0MDAwMTU0oBcGBWBMAQMHoA4TDDAwMDAwMDAwMDAwMDBxBgNVHSAEajBoMGYGBmBMAQIBBjBcMFoGCCsGAQUFBwIBFk5odHRwOi8vcHVibGljYWNhby5jZXJ0aWZpY2Fkb2RpZ2l0YWwuY29tLmJyL3JlcG9zaXRvcmlvL2RwYy9kZWNsYXJhY2FvLXNjZC5wZGYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMIGbBgNVHR8EgZMwgZAwSaBHoEWGQ2h0dHA6Ly93d3cuY2VydGlmaWNhZG9kaWdpdGFsLmNvbS5ici9yZXBvc2l0b3Jpby9sY3Ivc2VyYXNhY2R2NS5jcmwwQ6BBoD+GPWh0dHA6Ly9sY3IuY2VydGlmaWNhZG9zLmNvbS5ici9yZXBvc2l0b3Jpby9sY3Ivc2VyYXNhY2R2NS5jcmwwDgYDVR0PAQH/BAQDAgXgMA0GCSqGSIb3DQEBCwUAA4ICAQCPM8ywyofTzKOF1C8dAxljfmePeSliRBNARR9yZJlJTGsUWKHCaqDQJFjS1eoBv4KdV8PvwuS9/wSV83phdzIU/tpykH943TuvizlZynMZABB4ZUyHObcLFkdbaqeyxnTbTioDv2TnjfMGGxaptMWzMopH5xoJ4SddLedXdiA3brus8v8gJTjtcf6ywtk4xQec+wohLXSVUpLw6xC1F4gMBCVX5Zav2k6wi1NfcpeGFSOAIFCSKmw+kv4MRW/vD4YbEiTgay71BSMmyTNKXJl1gRhbm7A4/xLFjfL7kJ8dOki83ms+9teCmnvPcZEpmnxYwv8g31FMC5GxzKUijb0Of2gQU+TB4CHYY5IohsVWBG1T4ZtKpe7//KRT/Mxa1aFOsiSu/h1kVJf3qQwCZZWHdwAf/uLja7nbogZjE+cd75ucyDY+s3kKXSS8VR1KSZP8JH7c2sbxf0hW1YRztfa5SDdicqaxZgldzE0QyHEag5bpaHbzch3BcDLegObn6S6O9xx3NkkAm07aqyfdRWMXbXmSgDgzS2/zuttiA2eh540j4BYGHHYFSzgb/ZEqPVYzvBNGUEw3OA2UQebPYA6TCgtu0kL9MdRfxSuZn+iAM1f9bnGM3VYSO0jLWqpsZ+ai27+LS+FMlGRacuZmdBae5BWSyGD4bKHXy8dVrVIO4g==1NFEPE_P_20.01.01.166261808129847940001545500100000168711922133392018-08-16T16:45:05-03:00126180042806970x7gyL3XnoxBJdNazenJGuNwqRIQ=100Autorizado o uso da NF-e' # noqa event_id = self.nfe_export.event_ids.create_event_save_xml( diff --git a/l10n_br_fiscal/tests/test_fiscal_document_generic.py b/l10n_br_fiscal/tests/test_fiscal_document_generic.py index 04d01a910b13..9e88f4370336 100644 --- a/l10n_br_fiscal/tests/test_fiscal_document_generic.py +++ b/l10n_br_fiscal/tests/test_fiscal_document_generic.py @@ -35,7 +35,7 @@ def setUpClass(cls): cls.nfe_sn_export = cls.env.ref("l10n_br_fiscal.demo_nfe_sn_export") def test_nfe_same_state(self): - """ Test NFe same state. """ + """Test NFe same state.""" self.nfe_same_state._onchange_document_serie_id() self.nfe_same_state._onchange_fiscal_operation_id() @@ -153,7 +153,7 @@ def test_nfe_same_state(self): self.nfe_same_state.action_document_confirm() def test_nfe_other_state(self): - """ Test NFe other state. """ + """Test NFe other state.""" self.nfe_other_state._onchange_document_serie_id() self.nfe_other_state._onchange_fiscal_operation_id() @@ -276,7 +276,7 @@ def test_nfe_other_state(self): ) def test_nfe_not_taxpayer(self): - """ Test NFe not taxpayer. """ + """Test NFe not taxpayer.""" self.nfe_not_taxpayer._onchange_document_serie_id() self.nfe_not_taxpayer._onchange_fiscal_operation_id() @@ -384,7 +384,7 @@ def test_nfe_not_taxpayer(self): ) def test_nfe_not_taxpayer_not_company(self): - """ Test NFe not taxpayer not Company. """ + """Test NFe not taxpayer not Company.""" self.nfe_not_taxpayer_pf._onchange_document_serie_id() self.nfe_not_taxpayer_pf._onchange_fiscal_operation_id() @@ -493,7 +493,7 @@ def test_nfe_not_taxpayer_not_company(self): ) def test_nfe_export(self): - """ Test NFe export. """ + """Test NFe export.""" self.nfe_export._onchange_document_serie_id() self.nfe_export._onchange_fiscal_operation_id() @@ -596,7 +596,7 @@ def test_nfe_export(self): ) def test_nfe_sn_same_state(self): - """ Test NFe Simples Nacional same state. """ + """Test NFe Simples Nacional same state.""" self.nfe_sn_same_state._onchange_document_serie_id() self.nfe_sn_same_state._onchange_fiscal_operation_id() @@ -716,7 +716,7 @@ def test_nfe_sn_same_state(self): self.assertEqual(self.nfe_sn_same_state.amount_estimate_tax, 1308.45) def test_nfe_sn_other_state(self): - """ Test NFe SN other state. """ + """Test NFe SN other state.""" self.nfe_sn_other_state._onchange_document_serie_id() self.nfe_sn_other_state._onchange_fiscal_operation_id() @@ -821,7 +821,7 @@ def test_nfe_sn_other_state(self): ) def test_nfe_sn_not_taxpayer(self): - """ Test NFe SN not taxpayer. """ + """Test NFe SN not taxpayer.""" self.nfe_sn_not_taxpayer._onchange_document_serie_id() self.nfe_sn_not_taxpayer._onchange_fiscal_operation_id() @@ -914,7 +914,7 @@ def test_nfe_sn_not_taxpayer(self): ) def test_nfe_sn_export(self): - """ Test NFe SN export. """ + """Test NFe SN export.""" self.nfe_sn_export._onchange_document_serie_id() self.nfe_sn_export._onchange_fiscal_operation_id() @@ -1019,7 +1019,7 @@ def test_nfe_sn_export(self): ) def test_nfe_return(self): - """ Test Fiscal Document Return """ + """Test Fiscal Document Return""" action = self.nfe_same_state.action_create_return() return_id = self.nfe_same_state.browse( [i[2][0] for i in action["domain"] if i[0] == "id"] @@ -1032,7 +1032,7 @@ def test_nfe_return(self): ) def test_unlink_dummy_document(self): - """ Test Dummy Fiscal Document Unlink Restrictions """ + """Test Dummy Fiscal Document Unlink Restrictions""" dummy_document = self.env.user.company_id.fiscal_dummy_id with self.assertRaises(IntegrityError), mute_logger("odoo.sql_db"): # as much as possible we ensure technical dummy fiscal documents @@ -1040,7 +1040,7 @@ def test_unlink_dummy_document(self): dummy_document.unlink() def test_unlink_dummy_document_line(self): - """ Test Dummy Fiscal Document Line Unlink Restrictions """ + """Test Dummy Fiscal Document Line Unlink Restrictions""" dummy_line = self.env.user.company_id.fiscal_dummy_id.line_ids[0] with self.assertRaises(UserError): dummy_line.unlink() diff --git a/l10n_br_fiscal/tests/test_fiscal_document_nfse.py b/l10n_br_fiscal/tests/test_fiscal_document_nfse.py index 11d148e45760..6bcbbe4e9929 100644 --- a/l10n_br_fiscal/tests/test_fiscal_document_nfse.py +++ b/l10n_br_fiscal/tests/test_fiscal_document_nfse.py @@ -11,7 +11,7 @@ def setUp(self): self.nfse_same_state = self.env.ref("l10n_br_fiscal.demo_nfse_same_state") def test_nfse_same_state(self): - """ Test NFSe same state. """ + """Test NFSe same state.""" self.nfse_same_state._onchange_document_serie_id() self.nfse_same_state._onchange_fiscal_operation_id() diff --git a/l10n_br_fiscal/tests/test_fiscal_tax.py b/l10n_br_fiscal/tests/test_fiscal_tax.py index 403b11fe0071..31aee8026457 100644 --- a/l10n_br_fiscal/tests/test_fiscal_tax.py +++ b/l10n_br_fiscal/tests/test_fiscal_tax.py @@ -16,7 +16,7 @@ def setUp(self): self._switch_user_company(self.env.user, self.company_lucro_presumido) def _switch_user_company(self, user, company): - """ Add a company to the user's allowed & set to current. """ + """Add a company to the user's allowed & set to current.""" user.write( { "company_ids": [(6, 0, (company + user.company_ids).ids)], diff --git a/l10n_br_fiscal/tests/test_service_type.py b/l10n_br_fiscal/tests/test_service_type.py index 16a49df0b12f..2193241c6d84 100644 --- a/l10n_br_fiscal/tests/test_service_type.py +++ b/l10n_br_fiscal/tests/test_service_type.py @@ -7,7 +7,7 @@ class TestServiceType(TransactionCase): def test_name_get(self): - """ Test Service Type name_get()""" + """Test Service Type name_get()""" self.service_type = self.env["l10n_br_fiscal.service.type"].create( {"code": "TESTE", "name": "TESTE", "internal_type": "normal"} ) diff --git a/l10n_br_fiscal/tests/test_subsequent_operation.py b/l10n_br_fiscal/tests/test_subsequent_operation.py index 2cb2badd3905..451de12c3542 100644 --- a/l10n_br_fiscal/tests/test_subsequent_operation.py +++ b/l10n_br_fiscal/tests/test_subsequent_operation.py @@ -23,7 +23,7 @@ def setUp(self): self.cofins_tax_0 = self.env.ref("l10n_br_fiscal.tax_cofins_0") def test_subsequent_operation_simple_faturamento(self): - """ Test Fiscal Subsequent Operation Simples Faturamento""" + """Test Fiscal Subsequent Operation Simples Faturamento""" self.nfe_simples_faturamento._onchange_fiscal_operation_id() self.nfe_simples_faturamento._onchange_company_id() diff --git a/l10n_br_hr_contract/models/hr_contract.py b/l10n_br_hr_contract/models/hr_contract.py index c33af10de306..f11d9752a3cc 100644 --- a/l10n_br_hr_contract/models/hr_contract.py +++ b/l10n_br_hr_contract/models/hr_contract.py @@ -25,8 +25,8 @@ class HrContract(models.Model): welfare_policy = fields.Selection( string="Welfare policy", selection=[ - ("rgps", u"Regime Geral da Previdência Social"), - ("rpps", u"Regime Próprio da Previdência Social"), + ("rgps", "Regime Geral da Previdência Social"), + ("rpps", "Regime Próprio da Previdência Social"), ("rpse", "Regime de Previdência Social no Exterior"), ], help="e-Social: S2200/S2300 - tpRegPrev", diff --git a/l10n_br_nfe/models/document.py b/l10n_br_nfe/models/document.py index d67531546d18..58c9e66b7656 100644 --- a/l10n_br_nfe/models/document.py +++ b/l10n_br_nfe/models/document.py @@ -804,7 +804,7 @@ def make_pdf(self): ) def temp_xml_autorizacao(self, xml_string): - """ TODO: Migrate-me to erpbrasil.edoc.pdf ASAP""" + """TODO: Migrate-me to erpbrasil.edoc.pdf ASAP""" root = etree.fromstring(xml_string) ns = {None: "http://www.portalfiscal.inf.br/nfe"} new_root = etree.Element("nfeProc", nsmap=ns) diff --git a/l10n_br_nfe/tests/test_account_customer_nfe.py b/l10n_br_nfe/tests/test_account_customer_nfe.py index 298536ad6a3c..9b4c221fdf23 100644 --- a/l10n_br_nfe/tests/test_account_customer_nfe.py +++ b/l10n_br_nfe/tests/test_account_customer_nfe.py @@ -18,7 +18,7 @@ def setUp(self): self.invoice_difal = self.env.ref("l10n_br_account_product.demo_nfe_difal") def test_customer_nfe_same_state(self): - """Test customer NFe same state 'Contribuinte' """ + """Test customer NFe same state 'Contribuinte'""" self.invoice_same_state._onchange_fiscal_document_id() assert self.invoice_same_state.document_serie_id, ( "Error with _onchange_fiscal_document_id() field " @@ -164,7 +164,7 @@ def test_customer_nfe_same_state(self): ) def test_customer_invoice_other_costs(self): - """Test customer NFe other costs 'Contribuinte' """ + """Test customer NFe other costs 'Contribuinte'""" self.invoice_other_costs._onchange_fiscal_document_id() self.invoice_other_costs._onchange_fiscal() for line in self.invoice_other_costs.invoice_line_ids: @@ -193,7 +193,7 @@ def test_customer_invoice_other_costs(self): ) def test_customer_invoice_difal(self): - """Test customer NFe with DIFAL 'Nao Contribuinte' """ + """Test customer NFe with DIFAL 'Nao Contribuinte'""" self.invoice_difal._onchange_fiscal_document_id() self.invoice_difal._onchange_fiscal() self.invoice_difal._onchange_partner_id() diff --git a/l10n_br_nfe/tests/test_account_nfe_refund.py b/l10n_br_nfe/tests/test_account_nfe_refund.py index 5ec67b277b80..f6385c747cad 100644 --- a/l10n_br_nfe/tests/test_account_nfe_refund.py +++ b/l10n_br_nfe/tests/test_account_nfe_refund.py @@ -23,7 +23,7 @@ def setUp(self): ).action_invoice_open() def test_customer_nfe_refund(self): - """ Test Customer NFe Refund.""" + """Test Customer NFe Refund.""" self.wizard = self.wizard_export.create( {"file_type": "xml", "nfe_environment": "2"} ) diff --git a/l10n_br_nfe/wizards/l10n_br_account_nfe_export.py b/l10n_br_nfe/wizards/l10n_br_account_nfe_export.py index 0b40ad2671df..4b0f0308a170 100644 --- a/l10n_br_nfe/wizards/l10n_br_account_nfe_export.py +++ b/l10n_br_nfe/wizards/l10n_br_account_nfe_export.py @@ -5,7 +5,7 @@ class L10nBrAccountNfeExport(models.TransientModel): - """ Exportar Nota Fiscal Eletrônica """ + """Exportar Nota Fiscal Eletrônica""" _name = "l10n_br_account_product.nfe_export" _inherit = "l10n_br_account_product.nfe_export_invoice" diff --git a/l10n_br_nfe/wizards/l10n_br_account_nfe_export_invoice.py b/l10n_br_nfe/wizards/l10n_br_account_nfe_export_invoice.py index fdd06b10b5fc..7747e827b618 100644 --- a/l10n_br_nfe/wizards/l10n_br_account_nfe_export_invoice.py +++ b/l10n_br_nfe/wizards/l10n_br_account_nfe_export_invoice.py @@ -11,7 +11,7 @@ class L10nBrAccountNfeExportInvoice(models.TransientModel): - """ Export fiscal eletronic file from invoice""" + """Export fiscal eletronic file from invoice""" _name = "l10n_br_account_product.nfe_export_invoice" _description = "Export eletronic invoice" @@ -44,7 +44,7 @@ def _default_sign_xml(self): ) nfe_environment = fields.Selection( - selection=[("1", u"Produção"), ("2", u"Homologação")], + selection=[("1", "Produção"), ("2", "Homologação")], string="Ambiente", default=_default_nfe_environment, ) @@ -58,7 +58,7 @@ def _default_sign_xml(self): ) export_folder = fields.Boolean( - string=u"Salvar na Pasta de Exportação", default=_default_export_folder + string="Salvar na Pasta de Exportação", default=_default_export_folder ) def nfe_export(self): @@ -66,7 +66,7 @@ def nfe_export(self): active_ids = self._context.get("active_ids", []) if not active_ids: - err_msg = u"Não existe nenhum documento fiscal para ser" u" exportado!" + err_msg = "Não existe nenhum documento fiscal para ser" " exportado!" invoices = [] export_inv_numbers = [] company_ids = [] @@ -75,15 +75,15 @@ def nfe_export(self): for inv in self.env["account.invoice"].browse(active_ids): if inv.state not in ("sefaz_export"): err_msg += ( - u"O Documento Fiscal %s não esta definida para" - u" ser exportação " - u"para a SEFAZ.\n" + "O Documento Fiscal %s não esta definida para" + " ser exportação " + "para a SEFAZ.\n" ) % inv.fiscal_number elif not inv.issuer == "0": err_msg += ( - u"O Documento Fiscal %s é do tipo externa e " - u"não pode ser exportada para a " - u"receita.\n" + "O Documento Fiscal %s é do tipo externa e " + "não pode ser exportada para a " + "receita.\n" ) % inv.fiscal_number else: inv.write( @@ -107,9 +107,9 @@ def nfe_export(self): if len(set(company_ids)) > 1: err_msg += ( - u"Não é permitido exportar Documentos Fiscais de " - u"mais de uma empresa, por favor selecione " - u"Documentos Fiscais da mesma empresa." + "Não é permitido exportar Documentos Fiscais de " + "mais de uma empresa, por favor selecione " + "Documentos Fiscais da mesma empresa." ) if len(export_inv_numbers) > 1: diff --git a/l10n_br_nfse/tests/test_fiscal_document_nfse_common.py b/l10n_br_nfse/tests/test_fiscal_document_nfse_common.py index 9f65cc0dbefd..81bea88a7459 100644 --- a/l10n_br_nfse/tests/test_fiscal_document_nfse_common.py +++ b/l10n_br_nfse/tests/test_fiscal_document_nfse_common.py @@ -28,7 +28,7 @@ def setUp(self): self.nfse_same_state.company_id = self.company.id def test_certified_nfse_same_state_(self): - """ Test Certified NFSe same state. """ + """Test Certified NFSe same state.""" self.nfse_same_state._onchange_document_serie_id() self.nfse_same_state._onchange_fiscal_operation_id() diff --git a/l10n_br_nfse_issnet/tests/test_fiscal_document_nfse_issnet.py b/l10n_br_nfse_issnet/tests/test_fiscal_document_nfse_issnet.py index c1e087bccb98..9c59cb9e3fd3 100644 --- a/l10n_br_nfse_issnet/tests/test_fiscal_document_nfse_issnet.py +++ b/l10n_br_nfse_issnet/tests/test_fiscal_document_nfse_issnet.py @@ -25,7 +25,7 @@ def setUp(self): self.company.provedor_nfse = "issnet" def test_nfse_issnet(self): - """ Test NFS-e same state. """ + """Test NFS-e same state.""" xml_path = os.path.join( l10n_br_nfse_issnet.__path__[0], "tests", "nfse", "001_50_nfse.xml" diff --git a/l10n_br_nfse_paulistana/tests/test_fiscal_document_nfse_paulistana.py b/l10n_br_nfse_paulistana/tests/test_fiscal_document_nfse_paulistana.py index a82f682bb2c4..0fcd9212db5d 100644 --- a/l10n_br_nfse_paulistana/tests/test_fiscal_document_nfse_paulistana.py +++ b/l10n_br_nfse_paulistana/tests/test_fiscal_document_nfse_paulistana.py @@ -25,7 +25,7 @@ def setUp(self): self.company.provedor_nfse = "paulistana" def test_nfse_paulistana(self): - """ Test NFS-e same state. """ + """Test NFS-e same state.""" xml_path = os.path.join( l10n_br_nfse_paulistana.__path__[0], "tests", "nfse", "paulistana.xml" diff --git a/l10n_br_resource/models/resource_calendar.py b/l10n_br_resource/models/resource_calendar.py index 3315d29a8a49..688f02fefd46 100644 --- a/l10n_br_resource/models/resource_calendar.py +++ b/l10n_br_resource/models/resource_calendar.py @@ -35,12 +35,12 @@ def _compute_leave_ids(self): parent_path = fields.Char(index=True) - country_id = fields.Many2one("res.country", u"País") + country_id = fields.Many2one("res.country", "País") state_id = fields.Many2one( - "res.country.state", u"Estado", domain="[('country_id','=',country_id)]" + "res.country.state", "Estado", domain="[('country_id','=',country_id)]" ) l10n_br_city_id = fields.Many2one( - "res.city", u"Municipio", domain="[('state_id','=',state_id)]" + "res.city", "Municipio", domain="[('state_id','=',state_id)]" ) leave_ids = fields.Many2many( comodel_name="resource.calendar.leaves", compute="_compute_leave_ids" diff --git a/l10n_br_resource/models/resource_calendar_leaves.py b/l10n_br_resource/models/resource_calendar_leaves.py index 265c79a3e8d1..50c7b9ce8053 100644 --- a/l10n_br_resource/models/resource_calendar_leaves.py +++ b/l10n_br_resource/models/resource_calendar_leaves.py @@ -28,28 +28,28 @@ class ResourceCalendarLeave(models.Model): country_id = fields.Many2one( "res.country", - string=u"País", + string="País", related="calendar_id.country_id", ) state_id = fields.Many2one( "res.country.state", - u"Estado", + "Estado", related="calendar_id.state_id", domain="[('country_id','=',country_id)]", readonly=True, ) l10n_br_city_id = fields.Many2one( "res.city", - u"Municipio", + "Municipio", related="calendar_id.l10n_br_city_id", domain="[('state_id','=',state_id)]", readonly=True, ) leave_type = fields.Selection( - string=u"Tipo", + string="Tipo", selection=[item for item in TIPO_FERIADO.items()], ) abrangencia = fields.Selection( - string=u"Abrangencia", + string="Abrangencia", selection=[item for item in ABRANGENCIA_FERIADO.items()], ) diff --git a/l10n_br_resource/tests/test_resource_calendar.py b/l10n_br_resource/tests/test_resource_calendar.py index fd1ccc810370..c15d04ee460f 100644 --- a/l10n_br_resource/tests/test_resource_calendar.py +++ b/l10n_br_resource/tests/test_resource_calendar.py @@ -15,50 +15,50 @@ def setUp(self): self.nacional_calendar_id = self.resource_calendar.create( { - "name": u"Calendario Nacional", + "name": "Calendario Nacional", "country_id": self.env.ref("base.br").id, } ) self.leave_nacional_01 = self.resource_leaves.create( { - "name": u"Tiradentes", + "name": "Tiradentes", "date_from": fields.Datetime.to_datetime("2016-03-21 00:00:00"), "date_to": fields.Datetime.to_datetime("2016-03-21 23:59:59"), "calendar_id": self.nacional_calendar_id.id, - "leave_type": u"F", - "abrangencia": u"N", + "leave_type": "F", + "abrangencia": "N", } ) self.estadual_calendar_id = self.resource_calendar.create( { - "name": u"Calendario Estadual", + "name": "Calendario Estadual", "parent_id": self.nacional_calendar_id.id, } ) self.leave_estadual_01 = self.resource_leaves.create( { - "name": u"Aniversario de SP", + "name": "Aniversario de SP", "date_from": fields.Datetime.to_datetime("2016-01-25 00:00:00"), "date_to": fields.Datetime.to_datetime("2016-01-25 23:59:59"), "calendar_id": self.estadual_calendar_id.id, - "leave_type": u"F", - "abrangencia": u"E", + "leave_type": "F", + "abrangencia": "E", } ) self.municipal_calendar_id = self.resource_calendar.create( { - "name": u"Calendario Municipal", + "name": "Calendario Municipal", "parent_id": self.estadual_calendar_id.id, } ) self.leave_municipal_01 = self.resource_leaves.create( { - "name": u"Aniversario Chapeco", + "name": "Aniversario Chapeco", "date_from": fields.Datetime.to_datetime("2016-08-25 00:00:00"), "date_to": fields.Datetime.to_datetime("2016-08-25 23:59:59"), "calendar_id": self.municipal_calendar_id.id, - "leave_type": u"F", - "abrangencia": u"M", + "leave_type": "F", + "abrangencia": "M", } ) @@ -66,7 +66,7 @@ def setUp(self): self.calendar_id_sp = self.resource_calendar.create( { - "name": u"Calendario de Sao Paulo", + "name": "Calendario de Sao Paulo", "country_id": self.env.ref("base.br").id, "state_id": self.env.ref("base.state_br_sp").id, "l10n_br_city_id": self.env.ref("l10n_br_base.city_3500105").id, @@ -74,50 +74,50 @@ def setUp(self): ) def test_00_add_leave_nacional(self): - """ Inclusao de um novo Feriado no calendario nacional """ + """Inclusao de um novo Feriado no calendario nacional""" self.leave_nacional_02 = self.resource_leaves.create( { - "name": u"Natal", + "name": "Natal", "date_from": fields.Datetime.to_datetime("2016-12-24 00:00:00"), "date_to": fields.Datetime.to_datetime("2016-12-24 23:59:59"), "calendar_id": self.nacional_calendar_id.id, - "leave_type": u"F", - "abrangencia": u"N", + "leave_type": "F", + "abrangencia": "N", } ) - self.assertEqual(self.leave_nacional_02.name, u"Natal") + self.assertEqual(self.leave_nacional_02.name, "Natal") self.assertEqual(self.leave_nacional_02.calendar_id, self.nacional_calendar_id) self.assertEqual(2, len(self.nacional_calendar_id.leave_ids)) def test_01_add_leave_estadual(self): - """ Inclusao de um novo Feriado no calendario Estadual """ + """Inclusao de um novo Feriado no calendario Estadual""" self.leave_estadual_02 = self.resource_leaves.create( { - "name": u"Aniversario MG", + "name": "Aniversario MG", "date_from": fields.Datetime.to_datetime("2016-07-16 00:00:00"), "date_to": fields.Datetime.to_datetime("2016-07-16 23:59:59"), "calendar_id": self.estadual_calendar_id.id, - "leave_type": u"F", - "abrangencia": u"E", + "leave_type": "F", + "abrangencia": "E", } ) - self.assertEqual(self.leave_estadual_02.name, u"Aniversario MG") + self.assertEqual(self.leave_estadual_02.name, "Aniversario MG") self.assertEqual(self.leave_estadual_02.calendar_id, self.estadual_calendar_id) self.assertEqual(3, len(self.estadual_calendar_id.leave_ids)) def test_02_add_leave_municipal(self): - """ Inclusao de um novo Feriado no calendario municipal """ + """Inclusao de um novo Feriado no calendario municipal""" self.leave_municipal_02 = self.resource_leaves.create( { - "name": u"Aniversario Itajuba", + "name": "Aniversario Itajuba", "date_from": fields.Datetime.to_datetime("2016-03-19 00:00:00"), "date_to": fields.Datetime.to_datetime("2016-03-19 23:59:59"), "calendar_id": self.municipal_calendar_id.id, - "leave_type": u"F", - "abrangencia": u"M", + "leave_type": "F", + "abrangencia": "M", } ) - self.assertEqual(self.leave_municipal_02.name, u"Aniversario Itajuba") + self.assertEqual(self.leave_municipal_02.name, "Aniversario Itajuba") self.assertEqual( self.leave_municipal_02.calendar_id, self.municipal_calendar_id ) @@ -157,7 +157,7 @@ def test_06_obter_proximo_dia_util(self): self.assertEqual( proximo_dia_util, fields.Datetime.to_datetime("2016-03-22 00:00:01"), - u"Partindo de um feriado, proximo dia util invalido", + "Partindo de um feriado, proximo dia util invalido", ) anterior_ao_fds = fields.Datetime.to_datetime("2016-12-16 00:00:01") @@ -165,7 +165,7 @@ def test_06_obter_proximo_dia_util(self): self.assertEqual( proximo_dia_util, fields.Datetime.to_datetime("2016-12-19 00:00:01"), - u"Partindo de um fds, proximo dia util invalido", + "Partindo de um fds, proximo dia util invalido", ) def test_07_get_dias_base(self): @@ -175,7 +175,7 @@ def test_07_get_dias_base(self): data_final = fields.Datetime.to_datetime("2017-01-31 23:59:59") total = self.resource_calendar.get_dias_base(data_inicio, data_final) - self.assertEqual(total, 30, u"Calculo de Dias Base de Jan incorreto") + self.assertEqual(total, 30, "Calculo de Dias Base de Jan incorreto") data_inicio = fields.Datetime.to_datetime("2017-02-01 00:00:01") data_final = fields.Datetime.to_datetime("2017-02-28 23:59:59") @@ -193,41 +193,41 @@ def test_08_data_eh_dia_util(self): self.assertTrue( self.municipal_calendar_id.data_eh_dia_util(segunda), - u"ERRO: Segunda eh dia util!", + "ERRO: Segunda eh dia util!", ) self.assertTrue( self.municipal_calendar_id.data_eh_dia_util(terca), - u"ERRO: Terca eh dia util!", + "ERRO: Terca eh dia util!", ) self.assertTrue( not self.municipal_calendar_id.data_eh_dia_util(sabado), - u"ERRO: Sabado nao eh dia util!", + "ERRO: Sabado nao eh dia util!", ) self.assertTrue( not self.municipal_calendar_id.data_eh_dia_util(domingo), - u"ERRO: Domingo nao eh dia util!", + "ERRO: Domingo nao eh dia util!", ) self.assertTrue( not self.municipal_calendar_id.data_eh_dia_util(feriado), - u"ERRO: Feriado nao eh dia util!", + "ERRO: Feriado nao eh dia util!", ) self.leave_nacional_02 = self.resource_leaves.create( { - "name": u"Feriado 2017", + "name": "Feriado 2017", "date_from": fields.Datetime.to_datetime("2017-01-21 00:00:00"), "date_to": fields.Datetime.to_datetime("2017-01-21 23:59:59"), "calendar_id": self.nacional_calendar_id.id, - "leave_type": u"F", - "abrangencia": u"N", + "leave_type": "F", + "abrangencia": "N", } ) feriado2 = fields.Datetime.to_datetime("2017-01-21 00:00:00") self.assertTrue( not self.municipal_calendar_id.data_eh_dia_util(feriado2), - u"ERRO: Feriado2 nao eh dia util!", + "ERRO: Feriado2 nao eh dia util!", ) def test_09_quantidade_dia_util(self): @@ -239,7 +239,7 @@ def test_09_quantidade_dia_util(self): data_inicio, data_final ) self.assertEqual( - total_dias_uteis, 22, u"ERRO: Total dias uteis mes Jan/2017 invalido" + total_dias_uteis, 22, "ERRO: Total dias uteis mes Jan/2017 invalido" ) data_inicio = fields.Datetime.to_datetime("2018-01-01 00:00:01") @@ -249,7 +249,7 @@ def test_09_quantidade_dia_util(self): data_inicio, data_final ) self.assertEqual( - total_dias_uteis, 23, u"ERRO: Total dias uteis mes Jan/2018 invalido" + total_dias_uteis, 23, "ERRO: Total dias uteis mes Jan/2018 invalido" ) def test_10_data_eh_feriado_bancario(self): @@ -259,12 +259,12 @@ def test_10_data_eh_feriado_bancario(self): # adicionando feriado bancario self.resource_leaves.create( { - "name": u"Feriado Bancario", + "name": "Feriado Bancario", "date_from": fields.Datetime.to_datetime("2017-01-13 00:00:00"), "date_to": fields.Datetime.to_datetime("2017-01-13 23:59:59"), "calendar_id": self.nacional_calendar_id.id, - "leave_type": u"B", - "abrangencia": u"N", + "leave_type": "B", + "abrangencia": "N", } ) data = fields.Datetime.to_datetime("2017-01-13 01:02:03") @@ -280,13 +280,13 @@ def test_12_get_country_from_calendar(self): """ holiday = self.holiday_import.create( { - "interval_type": u"days", + "interval_type": "days", "calendar_id": self.nacional_calendar_id.id, } ) country_id = self.holiday_import.get_country_from_calendar(holiday) - self.assertEqual(country_id.code, u"BR", u"Pais incorreto.") + self.assertEqual(country_id.code, "BR", "Pais incorreto.") def test_16_proximo_dia_util_bancario(self): data = fields.Datetime.to_datetime("2017-01-13 00:00:00") @@ -299,7 +299,7 @@ def test_17_holiday_import(self): holiday = self.holiday_import.create( { "start_date": fields.Datetime.to_datetime("2018-08-28 00:00:00"), - "interval_type": u"years", + "interval_type": "years", "calendar_id": self.nacional_calendar_id.id, } ) diff --git a/l10n_br_resource/wizards/workalendar_holiday_import_wizard.py b/l10n_br_resource/wizards/workalendar_holiday_import_wizard.py index c35ab0c28839..28fbecae9c6c 100644 --- a/l10n_br_resource/wizards/workalendar_holiday_import_wizard.py +++ b/l10n_br_resource/wizards/workalendar_holiday_import_wizard.py @@ -184,11 +184,11 @@ def holiday_import(self): date_from = fields.Datetime.to_datetime(datetime_from) date_to = fields.Datetime.to_datetime(datetime_to) - if holiday.abrangencia == u"N": # Tipo Nacional + if holiday.abrangencia == "N": # Tipo Nacional work_time = self.get_calendar_for_country() - if holiday.abrangencia == u"E": # Tipo Estadual + if holiday.abrangencia == "E": # Tipo Estadual work_time = self.get_calendar_for_state(holiday) - if holiday.abrangencia == u"M": # Tipo Municipal + if holiday.abrangencia == "M": # Tipo Municipal work_time = self.get_calendar_for_city(holiday) if not leaves.search_count( [ diff --git a/l10n_br_stock_account/models/stock_move.py b/l10n_br_stock_account/models/stock_move.py index 290148a648bb..7d041c8dd120 100644 --- a/l10n_br_stock_account/models/stock_move.py +++ b/l10n_br_stock_account/models/stock_move.py @@ -125,7 +125,7 @@ def _get_price_unit_invoice(self, inv_type, partner, qty=1): return result def _get_price_unit(self): - """ Returns the unit price to store on the quant """ + """Returns the unit price to store on the quant""" result = super()._get_price_unit() # No Brasil o caso de Ordens de Entrega com Operação Fiscal diff --git a/l10n_br_stock_account_report/tests/test_l10n_br_p7_model_inventory_report.py b/l10n_br_stock_account_report/tests/test_l10n_br_p7_model_inventory_report.py index caf849a3fbc0..de82ea8c9a76 100644 --- a/l10n_br_stock_account_report/tests/test_l10n_br_p7_model_inventory_report.py +++ b/l10n_br_stock_account_report/tests/test_l10n_br_p7_model_inventory_report.py @@ -14,7 +14,7 @@ def setUpClass(cls): cls.p7_report_wizard = cls.env["l10n_br.p7.model.inventory.report.wizard"] def test_l10n_br_p7_model_inventory_report(self): - """ Test Brazilian P7 Model Inventory Report.""" + """Test Brazilian P7 Model Inventory Report.""" wizard_obj = self.p7_report_wizard.with_context( default_compute_at_date=0, diff --git a/payment_pagseguro/models/payment_acquirer.py b/payment_pagseguro/models/payment_acquirer.py index 1a502e6c0ae3..5a6f3e669803 100644 --- a/payment_pagseguro/models/payment_acquirer.py +++ b/payment_pagseguro/models/payment_acquirer.py @@ -22,7 +22,7 @@ class PaymentAcquirerPagseguro(models.Model): ) def get_installments_options(self): - """ Get list of installment options available to compose the html tag """ + """Get list of installment options available to compose the html tag""" return list(range(1, self.pagseguro_max_installments + 1)) @api.multi diff --git a/payment_pagseguro/models/payment_transaction.py b/payment_pagseguro/models/payment_transaction.py index b61f6b8b61a8..73bc5634ec20 100644 --- a/payment_pagseguro/models/payment_transaction.py +++ b/payment_pagseguro/models/payment_transaction.py @@ -250,7 +250,7 @@ def _get_pagseguro_charge_params(self): return CHARGE_PARAMS def log_transaction(self, reference, message): - """ Logs a transaction. It can be either a successful or a failed one. """ + """Logs a transaction. It can be either a successful or a failed one.""" self.sudo().write( { "date": fields.datetime.now(),