Skip to content
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

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

arielbarreiros96
Copy link

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.

@arielbarreiros96 arielbarreiros96 force-pushed the 16.0-fix-automation_oca branch 2 times, most recently from 2a33c2c to 9e04281 Compare December 9, 2024 10:49
Copy link

@rrebollo rrebollo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional Review in Runboat
LGTM overall. However, consider enhancing the layout for the form view in the automation record. Specifically, refine the design for when the referenced record has been deleted to improve clarity and usability.

image

@pedrobaeza pedrobaeza added this to the 16.0 milestone Dec 13, 2024
@arielbarreiros96 arielbarreiros96 force-pushed the 16.0-fix-automation_oca branch 2 times, most recently from baa85a4 to f365e0d Compare December 26, 2024 11:43
@arielbarreiros96
Copy link
Author

Some improvements made to the UI, now orphaned records are shown as orphans on the tree view as well
image

@arielbarreiros96 arielbarreiros96 force-pushed the 16.0-fix-automation_oca branch 3 times, most recently from 0e693d5 to f72e66b Compare January 16, 2025 14:04
Copy link

@Christian-RB Christian-RB left a 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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,

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

Comment on lines +48 to +51
missing_res_id = fields.Integer(
help="ID of the missing referenced resource.",
readonly=True,
)

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants