تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3852 أدوات العرض

I would like to create two additional Journal Line entries on Vendor Bills for each Invoice Line.

Creating 1 Invoice Line currently creates 2 Journal Items.


example: 
1 Invoice Line For $20 From Account A would create 2 Journal Lines, a $20 credit to Accounts Payable and a $20 debit from Account A.
If I add an additional Invoice Line for $30 from Account B, that creates a $30 debit Journal Item from Account B and changes the credit to Accounts Payable to $50 (so everything balances out).


For each Invoice Line, I simply want to add two new Journal Lines that balance out that credit and debit other accounts.  I can do this manually from the Journal Items tab, but I want to do this automatically.

I've tried intercepting the @onchange for 'invoice_line_ids' and add new lines to 'line_ids', which WORKS, but it won't update existing lines because of the NewId/One2many issue, so it just keeps multiplying them.  

I'm not sure how to solve this.




الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
أكتوبر 24
7656
3
سبتمبر 24
6097
3
سبتمبر 24
3625
1
سبتمبر 24
1994
0
ديسمبر 24
1707