Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3704 Zobrazení

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
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
4
bře 25
26245
3
čvc 18
4123
0
led 24
3827
3
bře 15
5491
2
čvc 24
1109