-
Notifications
You must be signed in to change notification settings - Fork 0
[3006][ADD] sale_report_qweb_decimal_place #6
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
Conversation
3e89823 to
e4bba51
Compare
yostashiro
left a comment
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.
@AungKoKoLin1997 Can we put the module in https://github.com/OCA/sale-reporting?
| @@ -0,0 +1 @@ | |||
| This module provides the price unit format of sale report depends on the choice of price_decimal_places in currency. | |||
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 module provides the price unit format of sale report depends on the choice of price_decimal_places in currency. | |
| This module provides the option to adjust the price unit format (number of decimal places to apply) | |
| of sale reports according to the configuration of price_decimal_places in currency. | |
| This module depends on report_qweb_decimal_place module in OCA/reporting-engine. |
@yostashiro This module is for v 16.0 and we put OCA/reporting-engine#697 is for v 15.0. So, should we create new PR for report_qweb_decimal_place in OCA repo for v16.0 before v15.0 PR is merged? I was planning to create migration PR for report_qweb_decimal_place after this OCA/reporting-engine#697 is merged. That's why I decided to put the modules for v16.0 in fal-custom repo first and later we can put to OCA. |
|
That's fine but why did we target 15.0 in OCA/reporting-engine#697 in the first place? I think there is currently no direct client needs of such module for 15.0. |
I don't know the reason. But in the first place, we have 15.0 branch and I have been assigned to create branch for 16.0 in this task https://www.quartile.co/web#id=3061&model=project.task&view_type=form&menu_id=517 and also create new PR for 16.0 branch in #2 (comment) |
| <xpath expr="//td[@name='td_priceunit']/span" position="replace"> | ||
| <t t-set="currency" t-value="doc.currency_id" /> | ||
| <t t-set="price_unit" t-value="line.price_unit" /> | ||
| <t t-call="report_qweb_decimal_place.price_unit_value_format" /> | ||
| </xpath> |
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.
| <xpath expr="//td[@name='td_priceunit']/span" position="replace"> | |
| <t t-set="currency" t-value="doc.currency_id" /> | |
| <t t-set="price_unit" t-value="line.price_unit" /> | |
| <t t-call="report_qweb_decimal_place.price_unit_value_format" /> | |
| </xpath> | |
| <xpath expr="//span[@t-field='line.price_unit']" position="attributes"> | |
| <attribute name="t-att-style">'display: none' if doc.currency_id.apply_price_decimal_place else ''</attribute> | |
| </xpath> | |
| <xpath expr="//span[@t-field='line.price_unit']" position="after"> | |
| <t t-if="not doc.currency_id.apply_price_decimal_place"> | |
| <t t-set="currency" t-value="doc.currency_id" /> | |
| <t t-set="price_unit" t-value="line.price_unit" /> | |
| <t t-call="report_qweb_decimal_place.price_unit_value_format" /> | |
| </t> | |
| </xpath> |
To avoid the overuse of replace.
I was wondering if we should actually change the following template from report_qweb_decimal_place
<template id="price_unit_value_format">
<t t-if="currency.apply_price_decimal_place">
<span
class="text-nowrap"
t-esc="price_unit"
t-options='{"widget": "float", "precision": currency.price_decimal_places}'
/>
</t>
<t t-else="">
<span class="text-nowrap" t-field="line.price_unit" />
</t>
</template>
to
<template id="price_unit_value_format">
<span
class="text-nowrap"
t-esc="price_unit"
t-options='{"widget": "float", "precision": currency.price_decimal_places}'
/>
</template>
assuming that the template is called in the above suggested manner. What do you think?
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.
Yes. I think this approach is better.
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, please go ahead and apply changes to all the relevant places.
|
@kakurai8 Please go ahead and install the modules in the test database. |
7e11154 to
a420832
Compare
|
pre-commit fails with this error. Ran |
|
Ran pre-commit locally and confirmed there is no issue. |
3006