-
-
Notifications
You must be signed in to change notification settings - Fork 538
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
[17.0][IMP] product_contract: Set description under product name instead of description #1187
Conversation
Hi @sbejaoui, |
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.
product_contract/readme/CONFIGURE.md
Outdated
@@ -0,0 +1,5 @@ | |||
You can show the details showed under the product on description by using the next system parameters. |
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 show the details showed under the product on description by using the next system parameters. | |
You can include the contract details on the sales order description by | |
using the following system parameters: |
) | ||
field_selection = dict(field_info.get("selection")) | ||
recurring_rule_label = field_selection.get(line.recurring_rule_type) | ||
def get_product_contract_date_text(self): |
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.
Put these methods private.
422c85a
to
ed9cc64
Compare
@pedrobaeza changes done! |
… description Using the feature extraLines of Many2one field Component we can add the info under the product and avoid noice on the product description. You can show this info on the description by using the system parameters: - product_contract.show_recurrency - product_contract.show_invoicing_type - product_contract.show_date
ed9cc64
to
f006353
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.
/ocabot merge minor
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 2eda508. Thanks a lot for contributing to OCA. ❤️ |
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.
@CarlosRoca13 sorry for the delay in revision. I found an error. It could be that the issue was present before this change, but I think it’s good to fix it. Let me know what you think.
._fields["force_month_%s" % self.recurring_rule_type] | ||
.get_description(self.env) | ||
) | ||
field_selection = dict(field_info.get("selection")) | ||
invoicing_type_label = field_selection.get( | ||
line.recurring_invoicing_type | ||
) | ||
line.name = _( | ||
"""{product}: | ||
- Recurrency: {recurring_rule} | ||
- Invoicing Type: {invoicing_type} | ||
- Date: {date_text} | ||
""" | ||
).format( | ||
product=line.product_id.display_name, | ||
recurring_rule=recurring_rule_label, | ||
invoicing_type=invoicing_type_label, | ||
date_text=date_text, | ||
force_month_label = field_selection.get( | ||
self.product_id["force_month_%s" % self.recurring_rule_type] |
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 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 think this could be attended in this other PR: #1188
Using the feature extraLines of Many2one field Component we can add the info under the product and avoid noice on the product description.
You can show this info on the description by using the system parameters:
- product_contract.show_recurrency
- product_contract.show_invoicing_type
- product_contract.show_date
cc @Tecnativa TT54693
ping @pedrobaeza @carlos-lopez-tecnativa @sergio-teruel