Arnaud Sibille 554ae1bcda [FIX] account: force _compute_journal_id only when creating payment
The goal of the `def new` override on `account.payment` is to have the
`journal_id` computed when creating a payment in the form view.

The problem is that it is also called by the onchange when a field is
modified.
This is causing a bug:
- Go the the cash journal and change the name of its payment methods (so
 you can distinct them from the ones of the bank journal).
- create a payment (do not save)
- switch the journal to "Cash" then switch back to "Bank".
-> the "Payment Method" is still one from the "Cash" journal.

The fix here is a hacky way of checking this is the call on the
record creation.

closes odoo/odoo#157407

X-original-commit: 816a170a10969a7785fdcf2f9dffe461108ca16c
Signed-off-by: William André (wan) <wan@odoo.com>
2024-03-12 15:08:31 +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%