Skip to Content
Menú
This question has been flagged
1 Respondre
7255 Vistes

Hi Community,

See my code

def write(self, vals):

        for i in self:

            if (i.amount_receivable < i.credit_limit): 

                raise UserError("Your Receivable Amount is Less")

            else:

                print("\n \n \n Amount is Greater Than")

        return super(ResPartner1, self).write(vals)  

 

Avatar
Descartar
Best Answer

Hi,

Just removing the iteration of the self over the for loop and see whether it make any difference.

Sample:

def write(self, vals):
res = super(EventEvent, self).write(vals)
if vals.get('organizer_id'):
self.message_subscribe([vals['organizer_id']])
return res


Thanks

Avatar
Descartar
Autor

Thanks for ypur reply @Niyas

Related Posts Respostes Vistes Activitat
1
de jul. 19
4536
1
de set. 18
2800
1
de març 15
5258
2
de des. 21
6857
1
de nov. 20
2594