Skip to content

Commit

Permalink
[FIX] l10n_br_pos_cfe: Change the variable names from en to pt
Browse files Browse the repository at this point in the history
  • Loading branch information
ygcarvalh committed Feb 28, 2023
1 parent ebdbfad commit 90547df
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 40 deletions.
36 changes: 12 additions & 24 deletions l10n_br_pos_cfe/models/pos_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,28 @@ def _demo_configure_pos_config_sat_tanca(self):
for record in self:
record.write(
{
"cnpj_homologacao": "08.723.218/0001-86",
"ie_homologacao": "149.626.224.113",
"cnpj_homologation": "08.723.218/0001-86",
"ie_homologation": "149.626.224.113",
"cnpj_software_house": "16.716.114/0001-72",
"sat_path": "/opt/sat/libsat_v3_0_0_3_x64.so",
"numero_caixa": "1",
"cod_ativacao": "12345678",
"assinatura_sat": "SGR-SAT SISTEMA DE GESTAO E RETAGUARDA DO SAT",
"cashier_number": "1",
"activation_code": "12345678",
"signature_sat": "SGR-SAT SISTEMA DE GESTAO E RETAGUARDA DO SAT",
}
)
_logger.info(
"CONFIG: _demo_configure_pos_config_sat_tanca of pos.config id {}".format(
record.id
)
)
record.company_id.ambiente_sat = "homologacao"
_logger.info("CONFIG: company_id.ambiente_sat = 'homologacao'")
record.company_id.environment_sat = "homologation"

def _demo_configure_pos_config_sat_sweda(self):
for record in self:
record.write(
{
"cnpj_homologacao": "53.485.215/0001-06",
"ie_homologacao": "111.072.115.110",
"cnpj_homologation": "53.485.215/0001-06",
"ie_homologation": "111.072.115.110",
"cnpj_software_house": "10.615.281/0001-40",
"sat_path": "/opt/sat/sweda/libSATDLL_Dual_armv7.so",
"numero_caixa": "1",
"cod_ativacao": "12345678",
"assinatura_sat": "SGR-SAT SISTEMA DE GESTAO E RETAGUARDA DO SAT",
"cashier_number": "1",
"activation_code": "12345678",
"signature_sat": "SGR-SAT SISTEMA DE GESTAO E RETAGUARDA DO SAT",
}
)
_logger.info(
"CONFIG: _demo_configure_pos_config_sat_sweda of pos.config id {}".format(
record.id
)
)
record.company_id.ambiente_sat = "homologacao"
_logger.info("CONFIG: self.company_id.ambiente_sat = 'homologacao'")
record.company_id.environment_sat = "homologation"
8 changes: 3 additions & 5 deletions l10n_br_pos_cfe/models/pos_payment_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
("99", "Outros"),
]

CREDENCIADORAS_CARTAO = [
CARD_ACQUIRERS = [
# Código da credenciadora, CNPJ e Nome
("001", "03.106.213/0001-90 Administradora de Cartões Sicredi Ltda."),
("002", "03.106.213/0002-71 Administradora de Cartões Sicredi Ltda.(filial RS)"),
Expand Down Expand Up @@ -65,7 +65,5 @@
class PosPaymentMethod(models.Model):
_inherit = "pos.payment.method"

sat_payment_mode = fields.Selection(WA03_CMP_MP, "Modo de Pagamento SAT")
sat_card_accrediting = fields.Selection(
CREDENCIADORAS_CARTAO, "Credenciadora do Cartão"
)
sat_payment_mode = fields.Selection(WA03_CMP_MP, "SAT Payment Mode")
sat_card_accrediting = fields.Selection(CARD_ACQUIRERS, "Card Acquirer")
20 changes: 10 additions & 10 deletions l10n_br_pos_cfe/tests/test_l10n_br_pos_cfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ def test_pos_config_sweda(self):
self.pos_config._demo_configure_pos_config_sat_sweda()

values_to_compare = {
"cnpj_homologacao": "53.485.215/0001-06",
"ie_homologacao": "111.072.115.110",
"cnpj_homologation": "53.485.215/0001-06",
"ie_homologation": "111.072.115.110",
"cnpj_software_house": "10.615.281/0001-40",
"sat_path": "/opt/sat/sweda/libSATDLL_Dual_armv7.so",
"numero_caixa": 1,
"cod_ativacao": "12345678",
"assinatura_sat": "SGR-SAT SISTEMA DE GESTAO E RETAGUARDA DO SAT",
"cashier_number": 1,
"activation_code": "12345678",
"signature_sat": "SGR-SAT SISTEMA DE GESTAO E RETAGUARDA DO SAT",
}

configured_values = {
"cnpj_homologacao": self.pos_config.cnpj_homologacao,
"ie_homologacao": self.pos_config.ie_homologacao,
"cnpj_homologation": self.pos_config.cnpj_homologation,
"ie_homologation": self.pos_config.ie_homologation,
"cnpj_software_house": self.pos_config.cnpj_software_house,
"sat_path": self.pos_config.sat_path,
"numero_caixa": self.pos_config.numero_caixa,
"cod_ativacao": self.pos_config.cod_ativacao,
"assinatura_sat": self.pos_config.assinatura_sat,
"cashier_number": self.pos_config.cashier_number,
"activation_code": self.pos_config.activation_code,
"signature_sat": self.pos_config.signature_sat,
}

self.assertEqual(
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ num2words
phonenumbers
pycep_correios
pyyaml
unidecode
satcomum
unidecode
workalendar
xmldiff

0 comments on commit 90547df

Please sign in to comment.