From e174a2cd64791e073d9fd43096ed5cfddea8281d Mon Sep 17 00:00:00 2001 From: nie Date: Mon, 5 Oct 2020 11:03:47 +0000 Subject: [PATCH] [FIX] account: editable export, traceback on "Tax Cash Basis Entry of" Steps to reproduce the bug: - Select an invoice in the list - Click Action -> Export - Select "I want to update data (import-compatible export)" - Click the field "Tax Cash Basis Entry of" Bug: Traceback Cause: Crashes because of a KeyError here: https://github.com/odoo/odoo/blob/2d860cdddf29b9fbd1a5401082c9f743028d2fb5/addons/web/controllers/main.py#L1743 The KeyError occurs because AccountPartialReconcile hasn't got a `name` field; `rec_name` is therefore `None`. Setting it to any field fixes the issue and `id` is the safest. opw:2349511 closes odoo/odoo#59273 X-original-commit: 6327c86d0ea30bc056c6db320d0a1413d5807b10 Signed-off-by: backspac Signed-off-by: Nicolas Martinelli (nim) --- addons/account/models/account_partial_reconcile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/models/account_partial_reconcile.py b/addons/account/models/account_partial_reconcile.py index d1c12f6c0a1..0d48a08b458 100644 --- a/addons/account/models/account_partial_reconcile.py +++ b/addons/account/models/account_partial_reconcile.py @@ -8,6 +8,7 @@ from datetime import date class AccountPartialReconcile(models.Model): _name = "account.partial.reconcile" _description = "Partial Reconcile" + _rec_name = "id" # ==== Reconciliation fields ==== debit_move_id = fields.Many2one(