콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
3680 화면

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
26225
3
7월 18
4111
0
1월 24
3817
3
3월 15
5485
2
7월 24
1098