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
This commit is contained in:
Sergi Almacellas Abellana committed 2017-04-06 14:56:32 +02:00
1 parent b1e320e204
commit b1c842a668
1 file changed
+3 -6
+3 -6
View File
@@ -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'