odoo icon indicating copy to clipboard operation
odoo copied to clipboard

[FIX] fix partner_credit/tax_totals key name

Open gschaer opened this issue 1 year ago • 1 comments

Description of the issue/feature this PR addresses:

The value move.tax_totals is defined in /addons/account/models/account_move.py by calling the function _get_tax_totals_summary from account_tax:

https://github.com/odoo/odoo/blob/5714ee114fb5c4b9d1342159b07efa27f16a7c8d/addons/account/models/account_move.py#L1551

The _get_tax_totals_summary generates a dict with the total amount stored as total_amount and not amount_total

https://github.com/odoo/odoo/blob/5714ee114fb5c4b9d1342159b07efa27f16a7c8d/addons/account/models/account_tax.py#L1870

https://github.com/odoo/odoo/blob/5714ee114fb5c4b9d1342159b07efa27f16a7c8d/addons/account/models/account_tax.py#L2052-L2053

Current behavior before PR: Server throws a KeyError as amount_total doesn't exist in move.tax_totals

Desired behavior after PR is merged: move.tax_totals is computed correctly

Fixes https://github.com/odoo/odoo/issues/184408


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

gschaer avatar Oct 21 '24 17:10 gschaer

Pull request status dashboard

robodoo avatar Oct 21 '24 17:10 robodoo

See guidelines.

MiquelRForgeFlow avatar Oct 28 '24 15:10 MiquelRForgeFlow

Fixed by https://github.com/odoo/odoo/commit/a91144533a6c02cd543743c237cfea120c9129f1

vava-odoo avatar Dec 06 '24 10:12 vava-odoo