Thursday, May 23, 2019
3 changes
Enhancements to existing features
This change lets Odoo tests run even when demo data has not been loaded. It supports better testing practices by allowing tests that create their own data to run in leaner environments.
Original PR description
As most of the tests are using demo data, a check is performed to verify that they are loaded. A best practice is to write tests that does not depend on demo data but with this check, it's not possible to launch them without demo data. With this commit, the check is removed, allowing to launch test even without demo data loaded.
This change adds a safeguard test for accounting reconciliation to ensure write-offs keep debit and credit amounts on the correct side. It helps prevent future changes from introducing errors in financial reconciliation results.
Original PR description
Test that there is no conversion of debit/credit when creating a writeoff with the method process_move_lines of the model 'account.reconciliation.widget'. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update simplifies how draft form changes are handled before records are saved, reducing special-case behavior behind the scenes. It helps make field updates more consistent in Field Service, Manufacturing Work Orders, and Subscriptions without introducing major user-facing changes.
Original PR description
Using new records in onchange() simplifies code: the environment flag `in_onchange` is gone, and all special cases correspond to new records. The expression `record._origin` is now available on *all* records, and returns the *actual* record corresponding to `record`.