Prevalidate invoice date on 'in invoice' and 'in credit note'
issue4865 review18401002
This commit is contained in:
1 parent
969e02cf3a
commit
3f0d75766d
1 file changed
+12
+12
@@ -250,9 +250,21 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin):
|
||||
'tryton-go-previous'),
|
||||
},
|
||||
'validate_invoice': {
|
||||
'pre_validate':
|
||||
['OR',
|
||||
('invoice_date', '!=', None),
|
||||
('type', 'not in',
|
||||
['in_invoice', 'in_credit_note']),
|
||||
],
|
||||
'invisible': Eval('state') != 'draft',
|
||||
},
|
||||
'post': {
|
||||
'pre_validate':
|
||||
['OR',
|
||||
('invoice_date', '!=', None),
|
||||
('type', 'not in',
|
||||
['in_invoice', 'in_credit_note']),
|
||||
],
|
||||
'invisible': ~Eval('state').in_(['draft', 'validated']),
|
||||
},
|
||||
'pay': {
|
||||
|
||||
Reference in new issue
Block a user