Skip to content

Commit

Permalink
[FIX] hr_expense: set exclude_from_invoice_tab on destination move line
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrunn committed Apr 8, 2024
1 parent d814e40 commit ef8dc5a
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ def _fill_payment_state(env):
WHERE account_move_id IS NULL
""",
)
# set exclude_from_invoice_tab the way v15 does it
openupgrade.logged_query(
env.cr,
"""
UPDATE account_move_line
SET exclude_from_invoice_tab=(coalesce(quantity, 0) = 0)
WHERE expense_id IS NOT NULL
""",
)
# Recompute payment_state for the moves associated to the expenses, as on
# v14 these ones were not computed being of type `entry`, which changes now
# on v15 if the method `_payment_state_matters` returns True, which is the
Expand Down

0 comments on commit ef8dc5a

Please sign in to comment.