[19.0][FIX] subscription_oca: fall back to journal account when product has no income account - #1511
Open
alvaro-domatix wants to merge 1 commit into
Conversation
…ct has no income account
Contributor
Author
|
Bumping for a maintainer look. @pedrobaeza |
Member
|
I'm not a maintainer nor user of this module. You should become that figure IMO. Others using the module can review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A subscription line on a product without income account (neither the product nor its category defines one) previously forced account_id=False on the generated invoice line, which violates the database constraint account_move_line_check_accountable_required_fields (account_id IS NOT NULL). The management cron then failed five times in a row and Odoo deactivated it silently.
With this change, when no income account is found the key is omitted so the standard fallback applies: the line gets the journal default account, like any other sale invoice line.