-
-
Notifications
You must be signed in to change notification settings - Fork 762
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, 15.0] account_move_name_sequence: default of account.journal field 'refund_sequence' not respected in method 'create' #1465
Labels
Comments
RodrigoBM
added a commit
to factorlibre/account-financial-tools
that referenced
this issue
Nov 28, 2022
…ence true if value not get in vals
RodrigoBM
added a commit
to factorlibre/account-financial-tools
that referenced
this issue
Nov 28, 2022
…ence true if value not get in vals
RodrigoBM
added a commit
to factorlibre/account-financial-tools
that referenced
this issue
Nov 28, 2022
…ence true if value not get in vals
RodrigoBM
added a commit
to factorlibre/account-financial-tools
that referenced
this issue
Nov 28, 2022
…ence true if value not get in vals
@moylop260 do you have this issue? |
No, I was not aware @RodrigoBM |
RodrigoBM
added a commit
to factorlibre/account-financial-tools
that referenced
this issue
Dec 2, 2022
…ence true if value not get in vals
This was referenced Dec 2, 2022
@moylop260 done |
RodrigoBM
added a commit
to factorlibre/account-financial-tools
that referenced
this issue
Dec 2, 2022
…ence true if value not get in vals
@moylop260 close this issue, thanks |
RodrigoBM
added a commit
to factorlibre/account-financial-tools
that referenced
this issue
Dec 8, 2022
…ence true if value not get in vals
ddejong-therp
pushed a commit
to ddejong-therp/account-financial-tools
that referenced
this issue
Aug 31, 2023
…ence true if value not get in vals
andreagidaltig
pushed a commit
to vauxoo-dev/account-financial-tools
that referenced
this issue
Sep 30, 2023
…ence true if value not get in vals
andreagidaltig
pushed a commit
to vauxoo-dev/account-financial-tools
that referenced
this issue
Oct 9, 2023
…ence true if value not get in vals
andreagidaltig
pushed a commit
to vauxoo-dev/account-financial-tools
that referenced
this issue
Oct 9, 2023
…ence true if value not get in vals
moitabenfdz
pushed a commit
to DynAppsNV/account-financial-tools
that referenced
this issue
Nov 13, 2023
…ence true if value not get in vals
keylor2906
pushed a commit
to vauxoo-dev/account-financial-tools
that referenced
this issue
Dec 5, 2023
…ence true if value not get in vals
keylor2906
pushed a commit
to Vauxoo/account-financial-tools
that referenced
this issue
Dec 5, 2023
…ence true if value not get in vals
BertVGroenendael
pushed a commit
to DynAppsNV/account-financial-tools
that referenced
this issue
Oct 16, 2024
…ence true if value not get in vals
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In module "account_move_name_sequence" (of branches "14.0" and "15.0"), the default of
account.journal
fieldrefund_sequence
is changed toTrue
. (Compare e.g. the original in module "account" of branch "14.0"). But this changed default value then is not taken into account in the overwritten methodcreate()
.Expected behavior
There should actually be a
refund_sequence_id
whenever therefund_sequence
isTrue
.Current behavior
If not explicitly providing the
refund_sequence
(and also no explicitrefund_sequence_id
) when creating anaccount.journal
record of type "sale" or "purchase", norefund_sequence_id
will get created, butrefund_sequence
will beTrue
.Causes
In module "account", the value of field
refund_sequence
is explicitly added to the argumentvals
duringcreate()
, by calling_fill_missing_values()
: For "sale" and "purchase" journals, it will beTrue
, andFalse
for all other journal types.But here in module "account_move_name_sequence", this super method
create()
is called (and correctly so) only after the creation of the sequences.As a consequence, if not explicitly providing
refund_sequence
(and also norefund_sequence_id
) when creating anaccount.journal
record of type "sale" or "purchase", norefund_sequence_id
will get created (becausevals.get("refund_sequence")
will beFalse
). But then during the super call, fieldrefund_sequence
will be set toTrue
.Proposed fix
As a fix, do add
True
as the explicit default when gettingrefund_sequence
from thevals
:In general, getting a value from the
vals
should always be done with the same default as the field's definition.The text was updated successfully, but these errors were encountered: