Skip to Content
Menu
This question has been flagged

Hello,


need when validate customer invoice i want to check the product quantity on invoice line if the quantity more than the quantity on hand create a warning that the quantity in the invoice line more than quantity on hand .


Thanks.


Avatar
Discard

what is the validation ?


Best Answer

Hi ,

To achieve this you can super the function of the validate button and can add the validations.

class AccountInvoiceInherit(models.Model):
_inherit = 'account.invoice'

@api.multi
def action_invoice_open(self, vals):
# check here and add the validations
res = super(AccountInvoiceInherit, self).action_invoice_open(vals)
return res
Avatar
Discard
Related Posts Replies Views Activity
2
Jun 23
3828
1
Jan 17
5567
3
Feb 24
1589
1
Oct 22
2495
2
Sep 21
9725