-
Notifications
You must be signed in to change notification settings - Fork 0
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
Task: T004192 #8
Conversation
@@ -4,6 +4,7 @@ | |||
|
|||
from odoo import api, fields, models | |||
from odoo.tools.safe_eval import safe_eval | |||
from odoo.exceptions import ValidationError |
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.
Gunakan UserError
from odoo.exceptions import Warning as UserError
('id', '!=', record.id) | ||
]) | ||
if items: | ||
raise ValidationError("The risk item '%s - %s' is already used." % (record.item_id.name, record.risk_analysis_id.name)) |
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.
Untuk format pesan error bisa dilihat contohnya disini.
Kedepannya format seperti ini akan menjadi standard kita dalam menuliskan pesan error.
/ocabot merge minor |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 69c1fc9. Thanks a lot for contributing to open-synergy. ❤️ |
No description provided.