Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda

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
Buang

what is the validation ?


Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
2
Jun 23
4876
1
Jan 17
6277
3
Feb 24
3867
1
Okt 22
4174
2
Sep 21
11275