Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3675 มุมมอง

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Sending invoice automatically by mail แก้ไขแล้ว
4
มี.ค. 25
26222
3
ก.ค. 18
4111
0
ม.ค. 24
3817
3
มี.ค. 15
5485
2
ก.ค. 24
1098