Pre-validate invoice address when confirming purchase
The invoice address is only required from confirmation. Closes #12499
This commit is contained in:
1 parent
536d95a219
commit
0a6e049de2
1 file changed
+5
-5
@@ -283,16 +283,16 @@ class Purchase(
|
||||
'depends': ['state'],
|
||||
},
|
||||
'quote': {
|
||||
'pre_validate': [
|
||||
If(~Eval('invoice_address'),
|
||||
('invoice_address', '!=', None),
|
||||
()),
|
||||
],
|
||||
'invisible': Eval('state') != 'draft',
|
||||
'readonly': ~Eval('lines', Eval('untaxed_amount', 0)),
|
||||
'depends': ['state'],
|
||||
},
|
||||
'confirm': {
|
||||
'pre_validate': [
|
||||
If(~Eval('invoice_address'),
|
||||
('invoice_address', '!=', None),
|
||||
()),
|
||||
],
|
||||
'invisible': Eval('state') != 'quotation',
|
||||
'depends': ['state'],
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user