-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
[15.0][FIX] sale_comment_template: fix action to allow to see templates in sales #260
base: 15.0
Are you sure you want to change the base?
Conversation
@alan196 @SirAionTech Could you please help me checking this PR? |
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.
Technical and functional review 👍
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 the PR!
name="context" | ||
eval="{'default_model_ids': [(4, ref('sale.model_sale_order'))]}" | ||
/> | ||
<field name="domain">[('models', '=', 'sale.order')]</field> |
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.
This would only find templates that are only for sale.order
s.
According to OCA/purchase-reporting@84a78d6, this
<field name="domain">[('models', '=', 'sale.order')]</field> | |
<field name="domain">[('model_ids', '=', 'sale.order')]</field> |
should allow to find sale.order
's templates when they are listed along with other models' templates (as it should have been before this change), would you mind including it?
In the commit you also have an example of how to implement a test case, it would be great if you could include that too.
eval="{'default_model_ids': [(4, ref('sale.model_sale_order'))]}" | ||
/> | ||
<field name="domain">[('models', '=', 'sale.order')]</field> | ||
<field name="context" eval="{'default_models': 'sale.order'}" /> |
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.
<field name="context" eval="{'default_models': 'sale.order'}" /> | |
<field name="context">{'default_models': 'sale.order'}</field> |
eval
was needed for eval
uating ref
; it works either way so this is not blocking.
021cb22
to
cba67ad
Compare
@SirAionTech Thanks for your review! I apply your suggestion and rebase the code, could you help me to review 🙏 |
This PR has the |
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.
Functional 👍
I think this can be merged |
This commit addresses the following issues:
Resolved an issue where users were unable to view templates in the comment list due to an incorrect domain configuration in the action.
Updated the context to set the sale order as the default option.