[14.0][FIX] nfce - serie and check anonymous customer #3380
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes changes to the
l10n_br_fiscal
andl10n_br_pos_nfce
modules to enhance validation and simplify the codebase. The most important changes include adding a constraint to ensure anonymous consumers cannot have a CNPJ/CPF number and modifying how the next document series number is determined.Enhancements to validation:
l10n_br_fiscal/models/res_partner.py
: Added a constraint in the_check_anonymous_consumer
method to ensure that anonymous consumers cannot have a CNPJ/CPF number.Codebase simplification:
l10n_br_pos_nfce/models/pos_config.py
: Removed the_default_next_number
method and updated thenfce_document_serie_sequence_number_next
field to use a related field for determining the next document series number.Minor changes:
l10n_br_fiscal/models/res_partner.py
: Added the_
function to the import statement for translations.