コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
7247 ビュー

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

関連投稿 返信 ビュー 活動
1
7月 19
4526
1
9月 18
2795
1
3月 15
5251
2
12月 21
6852
1
11月 20
2592