Advertisement
rht_odoo

[QW][4603152]remove_columns_and_lines_not_visible

Mar 3rd, 2025 (edited)
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.76 KB | None | 0 0
  1. <data>
  2.     <!--
  3.    Done by RHT on the 03/03/2025
  4.    Need : Only keep the column description
  5.    Task : https://www.odoo.com/odoo/project.task/4603152
  6.    Pastebin : https://pastebin.com/ANvmiAt2
  7.    -->
  8.     <xpath expr="//table[@id='sales_order_table']//tr" position="replace">
  9.     </xpath>
  10.     <xpath expr="//t[@t-foreach='lines_to_report']" position="replace">
  11.         <t t-foreach="lines_to_report" t-as="line" t-if="line.x_studio_visible_for_customer">
  12.             <t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal"/>
  13.             <tr t-att-class="'fw-bold o_line_section' if (                                         line.display_type == 'line_section'                                         or line.product_type == 'combo'                                     )                                     else 'fst-italic o_line_note' if line.display_type == 'line_note'                                     else ''">
  14.                 <t name="product_line_row" t-if="not line.display_type and line.product_type != 'combo'">
  15.                     <td id="product_name">
  16.                         <span t-field="line.name"/>
  17.                     </td>
  18.                 </t>
  19.                 <t t-if="line.display_type == 'line_section' or line.product_type == 'combo'">
  20.                     <td colspan="99">
  21.                         <span t-field="line.name"/>
  22.                     </td>
  23.                     <t t-set="current_section" t-value="line"/>
  24.                     <t t-set="current_subtotal" t-value="0"/>
  25.                 </t>
  26.                 <t t-if="line.display_type == 'line_note'">
  27.                     <td colspan="99">
  28.                         <span t-field="line.name"/>
  29.                     </td>
  30.                 </t>
  31.              </tr>
  32.             <tr t-if="current_section and (                                         line_last                                         or lines_to_report[line_index+1].display_type == 'line_section'                                         or lines_to_report[line_index+1].product_type == 'combo'                                         or (                                             line.combo_item_id                                             and not lines_to_report[line_index+1].combo_item_id                                         )                                     ) and not line.is_downpayment" class="is-subtotal text-end">
  33.                 <t t-set="current_section" t-value="None"/>
  34.                 <td colspan="99">
  35.                     <strong class="mr16">Subtotal</strong>
  36.                     <span t-out="current_subtotal" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: sale_order.currency_id}"/>
  37.                 </td>
  38.             </tr>
  39.         </t>
  40.     </xpath>
  41. </data>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement