Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3661 Weergaven

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})
 


Avatar
Annuleer
Beste antwoord

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

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
4
mrt. 25
26211
3
jul. 18
4108
0
jan. 24
3812
3
mrt. 15
5481
2
jul. 24
1096