Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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#53039 X-original-commit: 0bcf351 Signed-off-by: Laurent Smet <[email protected]>
- Loading branch information