l10n-brazil
l10n-brazil copied to clipboard
[12.0][FIX] indicador do consumidor final no account.invoice.
Ao alterar o cliente na fatura, o campo ind_final ( indicador de consumidor final ) não estava sendo atualizado.
No documento fiscal já existia um onchange para esse fim, porém no account ele não funciona, o motivo é por causa do inherits do documento fiscal no account.invoice. A ORM do Odoo não saber lidar com esses casos onde o mesmo field existe implementado no modelo pai e também no modelo filho, é o caso do campo partner_id ele existe na invoice e no fiscal.document. Nessa caso a ORM não chama o onchange do partner que está no documento fiscal, só chama o onchange se ele estiver implementando explicitamente em alguma classe que herda o account.invoice (diretamente)
por esse motivo, repliquei o código do onchange que está no fiscal.document para o account.invoice.
Obs: esses campos que repetem nos dois modelos tem que ter um cuidado especial, os campo são esses:
"name",
"partner_id",
"company_id",
"currency_id",
"product_id",
"uom_id",
"quantity",
"price_unit",
"discount_value",
Deu um erro aleatório no Travis parece que não encontrou o plano de contas, alguém sabe como faz para reiniciar ?
odoo.exceptions.UserError: ('No account was found to create the invoice, be sure you have installed a chart of account.', '')
Ola @netosjb então entrando no Travis logado vc tem um botão em cima na direita para dar cancel ou restart no build.
Esse problema inconsistente, é a primeira vez que eu vejo ele no Travis. Mas é exactement nisso que tou trabalhando na 12.0 esses dias... Logo que eu sair de um inception com o registry do odoo eu subo um PR... Até la bora torcer.
/ocabot merge minor
What a great day to merge this nice PR. Let's do it! Prepared branch 12.0-ocabot-merge-pr-2014-by-rvalyi-bump-minor, awaiting test results.
@rvalyi your merge command was aborted due to failed check(s), which you can inspect on this commit of 12.0-ocabot-merge-pr-2014-by-rvalyi-bump-minor.
After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.
seria bom ter o merge de https://github.com/OCA/l10n-brazil/pull/2015 antes para arrumar os erros. Mas enfim eu prefiro esperar o Renato olhar melhor o PR #2015 antes. Então vamos tentar a sorte de novo com esse...
/ocabot merge minor
What a great day to merge this nice PR. Let's do it! Prepared branch 12.0-ocabot-merge-pr-2014-by-rvalyi-bump-minor, awaiting test results.
@rvalyi your merge command was aborted due to failed check(s), which you can inspect on this commit of 12.0-ocabot-merge-pr-2014-by-rvalyi-bump-minor.
After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.
O erro que falhou por último não é o mesmo de antes, vou investigar o motivo.
2022-07-13 04:13:42,057 8592 [1;32m[1;49mINFO[0m openerp_test odoo.addons.l10n_br_nfe.tests.test_nfe_xml_validation: test_xml_nfe_validation (odoo.addons.l10n_br_nfe.tests.test_nfe_xml_validation.TestXMLValidation) 2022-07-13 04:13:42,058 8592 [1;32m[1;49mINFO[0m openerp_test odoo.addons.l10n_br_nfe.tests.test_nfe_xml_validation: ` In this test case, the CEP is deleted from the partner's record on purpose, when confirming the NF-e an XML validation error must be presented. 2022-07-13 04:13:44,107 8592 [1;32m[1;49mINFO[0m openerp_test odoo.addons.l10n_br_nfe.tests.test_nfe_xml_validation: (Test Result) XML Validation Message: Element '{http://www.portalfiscal.inf.br/nfe}CEP': [facet 'pattern'] The value 'XoQC@33278' is not accepted by the pattern '[0-9]{8}'. Element '{http://www.portalfiscal.inf.br/nfe}vTroco': This element is not expected. Expected is ( {http://www.portalfiscal.inf.br/nfe}detPag ).
O erro que falhou por último não é o mesmo de antes, vou investigar o motivo.
2022-07-13 04:13:42,057 8592 �[1;32m�[1;49mINFO�[0m openerp_test odoo.addons.l10n_br_nfe.tests.test_nfe_xml_validation: test_xml_nfe_validation (odoo.addons.l10n_br_nfe.tests.test_nfe_xml_validation.TestXMLValidation) 2022-07-13 04:13:42,058 8592 �[1;32m�[1;49mINFO�[0m openerp_test odoo.addons.l10n_br_nfe.tests.test_nfe_xml_validation: ` In this test case, the CEP is deleted from the partner's record on purpose, when confirming the NF-e an XML validation error must be presented. 2022-07-13 04:13:44,107 8592 �[1;32m�[1;49mINFO�[0m openerp_test odoo.addons.l10n_br_nfe.tests.test_nfe_xml_validation: (Test Result) XML Validation Message: Element '{http://www.portalfiscal.inf.br/nfe}CEP': [facet 'pattern'] The value 'XoQC@33278' is not accepted by the pattern '[0-9]{8}'. Element '{http://www.portalfiscal.inf.br/nfe}vTroco': This element is not expected. Expected is ( {http://www.portalfiscal.inf.br/nfe}detPag ).
Ops, eu vi errado, o erro que tá incomodando ainda é no plano de contas :/
/ocabot merge minor
This PR looks fantastic, let's merge it! Prepared branch 12.0-ocabot-merge-pr-2014-by-rvalyi-bump-minor, awaiting test results.
@rvalyi your merge command was aborted due to failed check(s), which you can inspect on this commit of 12.0-ocabot-merge-pr-2014-by-rvalyi-bump-minor.
After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.
@rvalyi essa pr tá zicada não é possivel :joy:
uai.. dando erro com o l10n_br_account_payment_order :D.. doidera :D ` ValueError: External ID not found in the system: l10n_br_account_payment_order.demo_invoice_payment_order_unicred_cnab400
uai.. dando erro com o l10n_br_account_payment_order :D.. doidera :D ` ValueError: External ID not found in the system: l10n_br_account_payment_order.demo_invoice_payment_order_unicred_cnab400
eita vou investigarr
l10n_br_account_payment_order.demo_invoice_payment_order_unicred_cnab400
os dados demos do payment_order falhou ao carregar por causa do plano de contas
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.
Pessoal vou fechar essa PR, pois nosso foco agora está na 14.0 e na 14.0 essa alteração já entrou #2358 se alguém ainda precisar desta funcionalidade na 12.0 fique a vontade para comentar.