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.