Set SII records to None when copy an invoice

This commit is contained in:
Sergio Morillo 2017-06-23 10:01:47 +02:00
parent 3aa8e837d6
commit d48b627ce9

View file

@ -147,3 +147,11 @@ class Invoice:
return
for field in _SII_INVOICE_KEYS:
setattr(self, field, getattr(tax.tax, field))
@classmethod
def copy(cls, records, default=None):
if default is None:
default = {}
default = default.copy()
default['sii_records'] = None
return super(Invoice, cls).copy(records, default=default)