Skip to content

Commit

Permalink
Merge pull request OCA#4386 from hbrunn/15.0-hr_expense-set-exclude_f…
Browse files Browse the repository at this point in the history
…rom_invoice_tab

[15.0][FIX] hr_expense: set exclude_from_invoice_tab on destination move line
  • Loading branch information
pedrobaeza authored Apr 9, 2024
2 parents d814e40 + ef8dc5a commit 27160dc
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 27160dc

Please sign in to comment.