Skip to content

[15.0][FIX] Clear price_tax when the Taxes field is empty#324

Open
newtratip wants to merge 1 commit intoOCA:15.0from
newtratip:patch-1
Open

[15.0][FIX] Clear price_tax when the Taxes field is empty#324
newtratip wants to merge 1 commit intoOCA:15.0from
newtratip:patch-1

Conversation

@newtratip
Copy link
Member

I found an error when creating a journal entry for an expense without taxes while the price_tax field still has a value. On the UI, the price_tax field is hidden, so the issue is not visible to the user until the journal entry is created

This PR resets price_tax to 0 when no taxes are set.

Steps to reproduce

  1. Create an Expense Report and add an expense line with taxes (Example: amount = 100, taxes = 7%, price_tax = 7)
  2. Remove the 7% tax and save the expense sheet. The price_tax value remains 7 (it is not cleared to zero)
  3. Submit the expense sheet to create the journal entry. The system throws an error due to a tax difference, as shown in the screenshot below.
image

@Saran440, Please consider reviewing and approving this PR.

@OCA-git-bot
Copy link
Contributor

Hi @ps-tubtim,
some modules you are maintaining are being modified, check this out!

Copy link
Member

@Saran440 Saran440 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants