Skip to content
Snippets Groups Projects
user avatar
Xavier ALT authored
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: default avatarLaurent Smet <smetl@users.noreply.github.com>
0bcf3518
History
Name Last commit Last update