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)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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)
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
Thanks for ypur reply @Niyas
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
write method in odoo 12
Opgelost
|
|
1
jul. 19
|
4456 | |
|
1
sep. 18
|
2741 | ||
|
1
mrt. 15
|
5199 | ||
update draft Invoice line unit price
Opgelost
|
|
2
dec. 21
|
6795 | |
|
1
nov. 20
|
2539 |