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

Hi everyone, I am using automated actions to add an invoice line when edited a field but the problem is an error of showing unbalanced credit and debit.

I there anyway to work around that. What do I need to do?


Thanks in advance.


My addition code looks like this:



if record.type == 'out_refund' and record.invoice_origin == False:
 
  amount=-record.x_studio_special_discount_amount_i

   for lines in record.line_ids:
    if lines.account_id.code == '100010':
 
      lines.write({'credit':lines.credit+amount})
   
    if lines.name == 'Special Discount':
      lines.write({'credit':-amount})
 


アバター
破棄
最善の回答

Hi, if you add credit, need to be added debit. entry have to be balanced, credit=debit.

アバター
破棄
関連投稿 返信 ビュー 活動
4
3月 25
26219
3
7月 18
4110
0
1月 24
3814
3
3月 15
5483
2
7月 24
1098