Laurent Smet 7859dee4fc [FIX] account: fix payment_difference computation
Bug introduced by https://github.com/odoo/odoo/commit/cdca5d4751a979f6b694f02d88160843f81a77f5

There is two problems:
- The payment difference is the difference between what you need to pay and what you pay.
=> The compute does the opposite.
- When the payment type is outbound, the payment amount is never negative.
=> Need to inverse the payment amount in the compute in this case.

E.G.

Suppose A a customer invoice of 25 and B a vendor bill of 50:

Payment on A will compute:
payment_type = 'inbound'
amount = 25

If you pay 20, the payment_difference computed was 20 - 25 = -5
It should be 25 - 20 = 5 instead.

Payment on B will compute:
payment_type = 'outbound'
amount = 50 (not -50!)

If you pay 40, the payment difference computed was 40 - (-50) = 10
It should be -50 - (-40) = -10 instead.
2018-03-22 11:01:20 +01:00
…
2018-03-22 09:00:00 +01: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, Purchase Management, ...

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.

Then follow 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%