-
-
Notifications
You must be signed in to change notification settings - Fork 281
[16.0][REF] l10n_br_fiscal: Melhorias na inutilização de numeração #4141
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
base: 16.0
Are you sure you want to change the base?
[16.0][REF] l10n_br_fiscal: Melhorias na inutilização de numeração #4141
Conversation
|
Hi @rvalyi, |
0ccaa53 to
97441ae
Compare
1f88738 to
181097b
Compare
181097b to
0deceee
Compare
e804b4f to
0689528
Compare
0689528 to
9068acb
Compare
kaynnan
left a comment
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.
LGTM
| self.ensure_one() | ||
| self._update_document_status(document_id) | ||
| self.state = "done" | ||
| self.write({"state": "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.
aqui é mais idiomática usar self.state = "done". Isso vai chamar o write automaticamente ainda.
rvalyi
left a comment
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.
2 pequenas considerações mas fora isso me parece OK
| self.ensure_one() | ||
| document_number = self.internal_sequence_id._next() | ||
| if self._is_invalid_number(document_number) or self.check_number_in_use( | ||
| if self.is_invalid_number(document_number) or self.check_number_in_use( |
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 so acho melhor conservar o _ na frente, assim não fica exposto pro RPC. Dificilmente esse método seria uma falha de segurança mas por padrão é melhor expor apenas o necessário.
Algumas melhorias na invalidação de numeração: