Advertisement
rht_odoo

[QW][4603152]line_visible_for_customer_invoice

Mar 3rd, 2025 (edited)
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 0.52 KB | None | 0 0
  1. <data>
  2.     <!--
  3.    Done by RHT on the 28/02/2025
  4.    Need: choose which line is visible for the customer
  5.    Task : https://www.odoo.com/odoo/project.task/4603152
  6.    Pastebin : https://pastebin.com/fjwJJrVX
  7.    -->
  8.     <xpath expr="//t[@t-set='lines']" position="replace">
  9.          <t t-set="lines" t-value="o.invoice_line_ids.sorted(key=lambda l: (-l.sequence, l.date, l.move_name, -l.id), reverse=True)"/>
  10.          <t t-set="lines" t-value="lines.filtered(lambda l:l.x_studio_visible_for_customer)"/>
  11.     </xpath>
  12. </data>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement