-
- Downloads
[FIX] account: fix payment posting when user encoding one for another company
Consider a multi-company database with user A allowed on multiple
companies (ex: YourCompany (USD), Belgian Company (EUR))
- user A switch to "YourCompany"
- Go to Accounting / Sales / Documents / Payment
- Create a new payment, with:
* Payment Type = "Received Money"
* Partner Type = "Customer"
* Partner = "Agrolait"
* Payment Journal = "Bank (EUR)"
(i.e. journal of "Belgiam Company")
* Payment Amount = "200" "EUR"
- Click on "Confirm"
=> An error is raised "Cannot create moves for different companies."
This commit ensure that when creating the payment journal entry, the
`destination account` is always computed relative to the payment's
company and not the current company of the user.
OPW-2192639
closes odoo/odoo#52802
Signed-off-by:
Laurent Smet <smetl@users.noreply.github.com>
Please register or sign in to comment