From d2495b663a0b0f7849736c8a0c72275d25803df3 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Tue, 9 Dec 2014 09:32:58 +0100 Subject: [PATCH] Do not write the company_id on the line The field company_id is a related towards the move line. If we write in credit_control_line.company_id, the ORM will do a write on the company_id field of account_move_line. It is useless anyway and if the module account_constraints is installed, it will block the creation of credit_control_line records. --- account_credit_control/line.py | 1 - 1 file changed, 1 deletion(-) diff --git a/account_credit_control/line.py b/account_credit_control/line.py index d6a0d1d80..abbfbccfd 100644 --- a/account_credit_control/line.py +++ b/account_credit_control/line.py @@ -153,7 +153,6 @@ class CreditControlLine(models.Model): move_line.credit) data['balance_due'] = open_amount data['policy_level_id'] = level.id - data['company_id'] = move_line.company_id.id data['move_line_id'] = move_line.id return data