Skip to Content
Menu
This question has been flagged
1 Atsakyti
7190 Rodiniai

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)  

 

Portretas
Atmesti
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

Portretas
Atmesti
Autorius

Thanks for ypur reply @Niyas

Related Posts Replies Rodiniai Veikla
1
liep. 19
4463
1
rugs. 18
2751
1
kov. 15
5202
2
gruod. 21
6798
1
lapkr. 20
2540