Advertisement
rht_odoo

[QW][4648516]sale_portal_price_is_zero_set_as_included

Mar 19th, 2025 (edited)
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.28 KB | None | 0 0
  1. <data>
  2.     <!--
  3.    Done by RHT on the 19/03/2025
  4.    Need : hide the price when price is 0 - set as included
  5.    Task : https://www.odoo.com/odoo/project.task/4648516
  6.    Pastebin : https://pastebin.com/yBXGHrES
  7.    -->
  8.     <xpath expr="//td[3]" position="replace">
  9.         <td t-attf-class="text-end {{ 'd-none d-sm-table-cell' if report_type == 'html' else '' }}">
  10.             <div t-if="line.discount &gt;= 0 and line.price_unit &gt;0" t-field="line.price_unit" t-att-style="line.discount and 'text-decoration: line-through' or None" t-att-class="(line.discount and 'text-danger' or '') + ' text-end'"/>
  11.             <div t-if="line.discount and line.price_unit != 0">
  12.                 <t t-out="(1-line.discount / 100.0) * line.price_unit" t-options="{&quot;widget&quot;: &quot;float&quot;, &quot;decimal_precision&quot;: &quot;Product Price&quot;}"/>
  13.             </div>
  14.             <div t-if="line.price_unit == 0">Compris</div>
  15.         </td>
  16.     </xpath>
  17.     <xpath expr="//td[@id='subtotal']" position="replace">
  18.          <td t-if="not line.is_downpayment" class="text-end" id="subtotal">
  19.             <span t-if="line.price_unit!= 0" class="oe_order_line_price_subtotal" t-field="line.price_subtotal"/>
  20.             <span t-else="">Compris</span>
  21.         </td>
  22.     </xpath>
  23. </data>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement