Add default invoice state on Invoice Lines

This is required for creating invoice lines not linked to any
invoice

issue6226
review27071002
This commit is contained in:
Sergi Almacellas Abellana committed 2017-02-01 10:24:50 +01:00
1 parent c5f9b34082
commit 8a262e7d15
1 file changed
+4
+4
View File
@@ -1654,6 +1654,10 @@ class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin):
def default_type():
return 'line'
@classmethod
def default_invoice_state(cls):
return 'draft'
@fields.depends('invoice', '_parent_invoice.state')
def on_change_with_invoice_state(self, name=None):
if self.invoice: