Do not save invoice sequence in set_invoice_sequences tests
This prevents the warning about unsaved relation record as the fiscal year is not yet created.
This commit is contained in:
1 parent
5fa6e8533b
commit
390310d7de
1 file changed
+1
-3
@@ -25,14 +25,12 @@ def set_invoice_sequences(fiscalyear):
|
||||
sequence = Sequence(name=fiscalyear.name, sequence_type=sequence_type)
|
||||
sequence.company = fiscalyear.company
|
||||
sequence.save()
|
||||
fiscalyear.invoice_sequences = []
|
||||
invoice_sequence = InvoiceSequence()
|
||||
invoice_sequence.fiscalyear = fiscalyear
|
||||
invoice_sequence.in_invoice_sequence = sequence
|
||||
invoice_sequence.in_credit_note_sequence = sequence
|
||||
invoice_sequence.out_invoice_sequence = sequence
|
||||
invoice_sequence.out_credit_note_sequence = sequence
|
||||
invoice_sequence.save()
|
||||
fiscalyear.invoice_sequences = [invoice_sequence]
|
||||
return fiscalyear
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user