Improve ModelStorage.copy
* Allow callable in copy default * Support dotted notation in copy default * Use setdefault in copy * Copy default when needed * Do not set default state in copy * Use callable and dotted notation in copy default issue5576 issue7648 review72291002
This commit is contained in:
1 parent
b0984bded3
commit
dd32870e40
1 file changed
+1
-1
+1
-1
@@ -101,7 +101,7 @@ class StatementLine(metaclass=PoolMeta):
|
||||
else:
|
||||
default = default.copy()
|
||||
default.setdefault('payment', None)
|
||||
default.setdefault('payment_group')
|
||||
default.setdefault('payment_group', None)
|
||||
return super(StatementLine, cls).copy(lines, default=default)
|
||||
|
||||
@fields.depends('payment', 'party', 'account', '_parent_statement.journal')
|
||||
|
||||
Reference in new issue
Block a user