-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][ADD] l10n_br_cte: add new module #3492
[14.0][ADD] l10n_br_cte: add new module #3492
Conversation
Hi @renatonlima, @rvalyi, |
e9383db
to
778ea20
Compare
Ainda vou ajustar os commits e deixar mais organizado. |
@mileo da uma olhada no arquivo de contribuintes e se tiver mais alguem me passa o nome e o email aqui por favor. |
@mileo por favor peça para seu time dar uma revisada.. por ora comentei os trechos da transmissao mas ja da para validar a geracao do xml. |
vou dar mais uma tapa nas coisas para ter algo rodando bonitinho e ja testo com esta PR.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rvalyi se puder efetuar novamente os testes eu agradeco. |
Ficou bastante melhor. Porem se vc for em Fiscal>Documents>All Documents>Create continua aquele erro:
Não testei muito ainda mas pelo menos vi esse... |
8117dc4
to
2b81e67
Compare
f59dba0
to
2839b7d
Compare
def match_or_create_m2o(self, rec_dict, parent_dict, model=None): | ||
"""If state not found, break hard, don't create it""" | ||
|
||
if rec_dict.get("code"): | ||
domain = [("code", "=", rec_dict.get("code")), ("ibge_code", "!=", False)] | ||
match = self.search(domain, limit=1) | ||
if match: | ||
return match.id | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui não precisamos chamar o super?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eu me tomei como base o que estava no modulo l10n_br_nfe, mas olhando agora, acredito que sim, falta o super tanto inclusive no l10n_br_nfe.. @rvalyi oq acha ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a gente poderia, mas tb não vejo grande problema não chamar. Pois esse metodo tem um dispatch para cada model ou comodel e apenas retorna um registro caso der match. Ou seja se vc quiser sobrecarregar não teria muita coisa para fazer com o result do parent. Podemos ajustar isso depois... cc @antoniospneto
rec.phone = rec.cte40_fone | ||
|
||
@api.model | ||
def match_or_create_m2o(self, rec_dict, parent_dict, model=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui também?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
da para rolar merge, mas ai como vai ser nobump, @marcelsavegnago vc tem que dar uma incrementada nos módulos:
- l10n_br_account (minor)
- l10n_br_cte_spec (major eu diria)
- l10n_br_fiscal (minor)
- spec_driven_model (patch)
@rvalyi done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parabéns pelo trabalho ai! uma grande etapa na localização ainda*!
*But our princess is in another castle!
/ocabot merge nobump
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 42929d8. Thanks a lot for contributing to OCA. ❤️ |
No description provided.