From b1c842a668af35e101fb3a3bf1c96af27dec489c Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 6 Apr 2017 14:56:32 +0200 Subject: [PATCH] Do not set multivalue fields on create char properties This ensures that the singleton is created when setting the account properties. Singletons models return the default values when no model exists so the saved multivalues are ignored if the singleton is not created. issue6421 review36301002 --- account.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/account.py b/account.py index 1b05ba9339..8fde970b09 100644 --- a/account.py +++ b/account.py @@ -2010,12 +2010,9 @@ class CreateChart(Wizard): account_receivable = self.properties.account_receivable account_payable = self.properties.account_payable config = Configuration(1) - config.set_multivalue( - 'default_account_receivable', - account_receivable.id if account_receivable else None) - config.set_multivalue( - 'default_account_payable', - account_payable.id if account_payable else None) + config.default_account_receivable = account_receivable + config.default_account_payable = account_payable + config.save() return 'end'