-
-
Notifications
You must be signed in to change notification settings - Fork 416
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
[11.0][IMP] crm_claim: add activities to claims #214
Conversation
activity_type = env.ref('mail.mail_activity_data_todo') | ||
crm_claim_model = env.ref('crm_claim.model_crm_claim') | ||
cr.execute(""" | ||
SELECT |
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 can make the insert from a select query and make this faster
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.
Change done
WHERE | ||
date_action_next IS NOT Null | ||
OR | ||
action_next IS NOT Null; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
id, | ||
name, | ||
user_id, | ||
CASE WHEN date_action_next IS NOT Null THEN date_action_next |
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 COALESCE(date_action_next, now())
instead for simplifying the query
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.
Done
FROM | ||
crm_claim | ||
WHERE | ||
date_action_next IS NOT Null |
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.
I'm thinking that you can remove now this part of the WHERE
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.
Before this, you can set a 'date_action_next' without adding an 'action_next', if you don't add this where it won't create any activity (a 'summary' is not mandatory in the database, you can create one without text)
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.
Is the text mandatory on activities?
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.
There are 3 fields mandatory through odoo:
- user_id
- date_deadline
- activity_type_id
Internally:
- res_model
- res_model_id
- res_id
- res_name
summary
and note
are NOT MANDATORY
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.
OK, thanks for the confirmation.
No description provided.