-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
[FIX] automation_oca error on record delete #15
base: 16.0
Are you sure you want to change the base?
Conversation
2a33c2c
to
9e04281
Compare
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.
baa85a4
to
f365e0d
Compare
0e693d5
to
f72e66b
Compare
f72e66b
to
8abbb8c
Compare
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 this, can you check my comments?
} | ||
) | ||
result.append(placeholder.id) | ||
recs = recs - missing |
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.
recs = recs - missing | |
recs = recs - missing |
"state": automation_record.state or "done", | ||
"model": automation_record.model or model, | ||
"resource_ref": automation_record.resource_ref, | ||
"is_test": automation_record.is_test or False, |
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.
You could add the record history
missing_res_id = fields.Integer( | ||
help="ID of the missing referenced resource.", | ||
readonly=True, | ||
) |
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.
Can we reuse the variable res_id?
This PR comes to solve this issue #4 when removing items related to automation records, now a placeholder is created for handling the missing relation.