Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][BUG] hr_expense_invoice: Can't register payment to employee if using existing invoice and follow normal process steps submit->aprove->post #267

Open
peterromao opened this issue Aug 21, 2024 · 1 comment
Labels

Comments

@peterromao
Copy link

Module

hr_expense_invoice

Describe the bug

As per the title says. When user wants to pay back to the employe the payment he has made to the vendor there is a message popping up stating that he can't register payments when the outstanding value is zero (this is the field amount_residual). All the account moves have been well posted but this variable goes to zero when it shouldn't. The circuit/process goes without hiccups when this module is not involved ie. when the expense is created without linking a vendor invoice.

To Reproduce

This has been triggered on Dockered Odoo version 16.20240730 with latest git pull of OCA/hr-expense.

  1. Create Vendor Invoice with one product line, check account moves OK pror to confirmation.
  2. Confirm Invoice. Check moves and pay status: moves OK and invoice not paid.
  3. Create new employee expense with Vendor Bill field chosing the invoice from step 2 and entering the full amount of the invoice as Total. Expenses form view shows this Total as value to report.
  4. View Expense Sheet Report, Check all is OK.
  5. Submit for aproval.
  6. Aprove. No moves posted so far.
  7. Post Journal Entries and checked that everything is OK. All the corresponding moves are posted as they should (see below). The only thing that's wrong is the Amount Due (amount_residual) that shows 0 when it shouldn't.
    image
  8. When user presses the Register Payment button message pops up as in image below.
    image

Expected behavior
The Amount Due should be the residual amount left out to pay back the employee.

Additional context
This has been checked in various different Odoo 16.x installations with the same behaviour.

@peterromao peterromao added the bug label Aug 21, 2024
@peterromao
Copy link
Author

Hello,
Just tested on runboat to see if it was my setup and I can confirm that the same error by design is there as well.
Thanks
Peter

@peterromao peterromao changed the title Can't register payment to employee if existing invoice follows normal process steps submit->aprove->post Can't register payment to employee if using existing invoice and follow normal process steps submit->aprove->post Aug 23, 2024
@peterromao peterromao changed the title Can't register payment to employee if using existing invoice and follow normal process steps submit->aprove->post [16.0][BUG]hr_expense_invoice: Can't register payment to employee if using existing invoice and follow normal process steps submit->aprove->post Aug 26, 2024
@peterromao peterromao changed the title [16.0][BUG]hr_expense_invoice: Can't register payment to employee if using existing invoice and follow normal process steps submit->aprove->post [16.0][BUG] hr_expense_invoice: Can't register payment to employee if using existing invoice and follow normal process steps submit->aprove->post Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant