Skip to content

Commit

Permalink
Merge pull request #385 from HarshK-SerpentCS/13_sale_report_hide_price
Browse files Browse the repository at this point in the history
[13.0] [MIG] sale_report_hide_price: Migrated the module in v13.
  • Loading branch information
JayVora-SerpentCS authored Oct 10, 2019
2 parents eab1fde + 9d5b1a7 commit 4291335
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion sale_report_hide_price/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'maintainer': 'Serpent Consulting Services Pvt. Ltd.',
'category': 'Sales Management',
'website': 'http://www.serpentcs.com',
'version': '12.0.1.0.1',
'version': '13.0.1.0.1',
'license': 'AGPL-3',
'summary': 'Hide price/discount in Sale Order Report',
'depends': [
Expand Down
2 changes: 1 addition & 1 deletion sale_report_hide_price/models/sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ class SaleOrder(models.Model):
show_discount = fields.Boolean(
'Show Discount',
help="If checked, you can see the discount"
" in report of Sales Order/Quotation.")
" in report of Sales Order/Quotation.")
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
10 changes: 5 additions & 5 deletions sale_report_hide_price/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ <h4 class="oe_slogan" style="font-family:times new roman;color:#8a8a8a;margin-bo
Based on the choices on the fields, the relevant fields would be shown in the report.
</p>
<div>
<img class="oe_demo oe_picture oe_screenshot" width="700px" src="price_and_discount_in_sale_order.png"/>
<img class="oe_demo oe_picture oe_screenshot" width="700px" src="show.png"/>
</div>
</div>
</section>

<section class="oe_container">
<div class="oe_row oe_spaced" style="background:#f3f0f0;padding-top:2px;padding-bottom:10px;margin-top:20px;margin-bottom:20px;">
<h2 class="oe_slogan" style="font-family:times new roman;color:#875A7B;margin-top:20px;margin-bottom:20px;">
<span class="label" style="background:#875A7B;">
<span class="label">
Reports
</span>
</h2>
Expand All @@ -39,23 +39,23 @@ <h2 class="oe_slogan" style="font-family:times new roman;color:#875A7B;margin-to
</p>
</div>
<div>
<img class="oe_demo oe_picture oe_screenshot" width="700px" src="price_and_discount_in_report.jpg"/>
<img class="oe_demo oe_picture oe_screenshot" width="700px" src="report.png"/>
</div>
<div>
<p class="oe_mt32 text-justify" style="font-size: 18px;font-family:times new roman;margin-left:65px;margin-right:65px;">
When Show Price is checked then it will show Unit Price and Price in sales order report.
</p>
</div>
<div>
<img class="oe_demo oe_picture oe_screenshot" width="700px" src="price_in_report.jpg"/>
<img class="oe_demo oe_picture oe_screenshot" width="700px" src="price.png"/>
</div>
<div>
<p class="oe_mt32 text-justify" style="font-size: 18px;font-family:times new roman;margin-left:65px;margin-right:65px;">
When Show Discount is checked then it will show discount in sales order report.
</p>
</div>
<div>
<img class="oe_demo oe_picture oe_screenshot" width="700px" src="discount_in_report.jpg"/>
<img class="oe_demo oe_picture oe_screenshot" width="700px" src="discount.png"/>
</div>
</div>
</section>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions sale_report_hide_price/views/report_saleorder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<!-- Discount fields hides from sale quotation report if show and hide price from Quotation -->
<td t-if="display_discount" position="replace">
<t t-if="doc.show_discount">
<td t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">
<td t-if="display_discount" class="text-right" groups="product.group_discount_per_so_line">
<span t-field="line.discount" />
</td>
</t>
<t t-if="not doc.show_discount">
<td class="text-right" groups="sale.group_discount_per_so_line">-N.A.-</td>
<td class="text-right" groups="product.group_discount_per_so_line">-N.A.-</td>
</t>
</td>
<xpath expr="//table[hasclass('table-sm')]/tbody/t[2]/tr/t/td[3]" position="replace">
Expand All @@ -26,8 +26,8 @@
<xpath expr="//table[hasclass('table-sm')]/tbody/t[2]/tr/t/td[last()]" position="replace">
<t t-if="doc.show_price">
<td class="text-right" groups="account.group_show_line_subtotals_tax_excluded">
<span t-field="line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
<span t-field="line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
<span t-field="line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
<span t-field="line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
</td>
</t>
<t t-if="not doc.show_price">
Expand Down

0 comments on commit 4291335

Please sign in to comment.