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:
1 parent
c5f9b34082
commit
8a262e7d15
1 file changed
+4
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user