Skip to content

Commit

Permalink
[FIX] sale_layout_category_hide_detail: Improve interoperability, hid…
Browse files Browse the repository at this point in the history
…e discounted price too
  • Loading branch information
Sibert-Aerts committed Nov 6, 2024
1 parent d3d0613 commit 029be63
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@
<xpath expr="//span[@t-field='line.price_unit']" position="attributes">
<attribute
name="t-if"
add="not current_section or current_section.show_line_amount"
add="(not current_section or current_section.show_line_amount)"
separator=" and "
/>
</xpath>
<xpath expr="//span[@t-field='line.price_subtotal']" position="attributes">
<attribute
name="t-if"
add="not current_section or current_section.show_line_amount"
add="(not current_section or current_section.show_line_amount)"
separator=" and "
/>
</xpath>
Expand All @@ -83,7 +83,7 @@
>
<attribute
name="t-if"
add="not current_section or current_section.show_line_amount"
add="(not current_section or current_section.show_line_amount)"
separator=" and "
/>
</xpath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,28 +78,28 @@
<xpath expr="//td[@name='td_priceunit']/span" position="attributes">
<attribute
name="t-if"
add="not current_section or current_section.show_line_amount"
add="(not current_section or current_section.show_line_amount)"
separator=" and "
/>
</xpath>
<xpath expr="//td[@name='td_taxes']/span" position="attributes">
<attribute
name="t-if"
add="not current_section or current_section.show_line_amount"
add="(not current_section or current_section.show_line_amount)"
separator=" and "
/>
</xpath>
<xpath expr="//td[@name='td_subtotal']/span" position="attributes">
<attribute
name="t-if"
add="not current_section or current_section.show_line_amount"
add="(not current_section or current_section.show_line_amount)"
separator=" and "
/>
</xpath>
<xpath expr="//td[@t-if='display_discount']/span" position="attributes">
<attribute
name="t-if"
add="not current_section or current_section.show_line_amount"
add="(not current_section or current_section.show_line_amount)"
separator=" and "
/>
</xpath>
Expand Down
13 changes: 10 additions & 3 deletions sale_layout_category_hide_detail/views/sale_portal_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,21 @@
<xpath expr="//div[@t-field='line.price_unit']" position="attributes">
<attribute
name="t-if"
add="not current_section or current_section.show_line_amount"
add="(not current_section or current_section.show_line_amount)"
separator=" and "
/>
</xpath>
<xpath expr="//t[contains(@t-out, 'line.price_unit')]" position="attributes">
<attribute
name="t-if"
add="(not current_section or current_section.show_line_amount)"
separator=" and "
/>
</xpath>
<xpath expr="//span[@t-field='line.price_subtotal']" position="attributes">
<attribute
name="t-if"
add="not current_section or current_section.show_line_amount"
add="(not current_section or current_section.show_line_amount)"
separator=" and "
/>
</xpath>
Expand All @@ -99,7 +106,7 @@
>
<attribute
name="t-if"
add="not current_section or current_section.show_line_amount"
add="(not current_section or current_section.show_line_amount)"
separator=" and "
/>
</xpath>
Expand Down

0 comments on commit 029be63

Please sign in to comment.