Friday, October 4, 2024
1 change · saas-17.2
Miscellaneous changes
In case an extra dependency is added to the api.depends decorator of account.move._compute_journal_id, account.payment.partner_bank_id is going to be recomputed, potentially overwriting existing value. Steps to reproduce: 1. Install a module adding a dependency to account.move._compute_journal_id 2. Create a vendor bill with a partner having more than one bank account 3. Register payment using another bank account than the first one The created payment would then have its bank account r
Original PR description
In case an extra dependency is added to the api.depends decorator of account.move._compute_journal_id, account.payment.partner_bank_id is going to be recomputed, potentially overwriting existing value. Steps to reproduce: 1. Install a module adding a dependency to account.move._compute_journal_id 2. Create a vendor bill with a partner having more than one bank account 3. Register payment using another bank account than the first one The created payment would then have its bank account recomputed. By testing for an existing value in the compute function before assigning the first bank account of the partner, we ensure any manually defined value will not be overwritten through unwanted recomputation. For context: https://github.com/OCA/sale-workflow/pull/3321 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#181278