thcl-odoo 75416b03a7 [FIX] hr_expense: fix expense total computation
Current behavior :
The amount shown for an expense is equals to 0 instead of the real price.

Steps :
- Install Expenses, Accounting
- Create an expense and finish the flow (register payment included)
- In Accounting app, go to Vendors > Payments
- In this view, amount is equals to 0 but the amount is correct in individual view

Note :
Since this commit [1], `expense_id` is added on move.line so that
`_payment_state_matters` now returns True [2]. We are now entering this
condition [3].

This causes some issues when recording payments for our expense.
Indeed, the 2 lines (credit + debit) enter this condition [4] but debit line
should be treated by this block [5] otherwise the 2 lines cancel each other out.

Solution :
Add `exclude_from_invoice_tab = True` receivable/payable expense payment lines

[1] : odoo@1645995#diff-5bee371350ae80995abbea23e800bfb1c52f968db6c9dc59f2681ac415d34103R27-R28
[2] : https://github.com/odoo/odoo/blob/1e3a9c90908f37d19f4aa1bbcb81568dea9fd451/addons/hr_expense/models/account_move_line.py#L9-L13
[3] : https://github.com/odoo/odoo/blob/d6ca59ed9bf6877ee6b1b311223472adfa4db549/addons/account/models/account_move.py#L1419
[4] : https://github.com/odoo/odoo/blob/d6ca59ed9bf6877ee6b1b311223472adfa4db549/addons/account/models/account_move.py#L1422
[5] : https://github.com/odoo/odoo/blob/d6ca59ed9bf6877ee6b1b311223472adfa4db549/addons/account/models/account_move.py#L1434-L1438

OPW-2838105

closes odoo/odoo#94259

X-original-commit: a6b8feabcb2323edf7ca24d3e96e6cb7f420fcc9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-06-22 14:28:49 +02:00
…
2015-09-08 17:58:38 +02:00
2021-10-07 17:59:53 +00:00
2022-01-14 15:44:52 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%