-
-
Notifications
You must be signed in to change notification settings - Fork 247
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] [FIX] account_fiscal_year_closing - create/write #294
Conversation
Bug also on v16.0 #248 |
When creating from scratch, Mapping is used as an Array instead of simple id (due to many in another many). When coming from a template, id is used To take into account this particularity, check the type before taking the id of the array.
I confirm the bug and fix. Please merge this. |
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.
Thanks for PR
@@ -553,13 +553,13 @@ class AccountFiscalyearClosingMapping(models.Model): | |||
|
|||
@api.model | |||
def create(self, vals): | |||
if "dest_account_id" in vals: | |||
if "dest_account_id" in vals and type(vals["dest_account_id"]) == list: |
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.
use isinstance(vals["dest_account_id"], list)
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Would you please merge this? |
When creating new fiscal year closing with an account mapping (with destination account) in moves configuration, an issue is raised at save (Issue #280).
But when coming from a template (selecting template on screen), Mapping data are used as an Array instead instead of simple id (due to many inside another many).
The current code manage only case from template.
This PR take into account this particularity (and mangage other way), check the type before taking the id of the array.