Skip to Content
Menu
This question has been flagged
2 Replies
3964 Views

1x Invoice line becomes 4x account move lines (tax account, sale goods, etc) in order to be balanced (credit-debit)

But API do not let creates multiple records, just single record , single account move line at a time
wonder how can do

I have found I have to set ..., {context={check_move_validity=false}}

Avatar
Discard

I'm altering invoice lines in Python code and have to use with_context(check_move_validity=False). Is there any way to make invoice move lines (tax/payment items) automatically balanced afterwards?

Best Answer

Yes, you can simply use  with_context(check_move_validity=False) to create unbalanced account moves,  but you should use it carefully.

Avatar
Discard
Best Answer

@sami there is a function _recompute_dynamic_lines you can trigger it

Avatar
Discard

Thanks for your answer! But _recompute_dynamic_lines exists in Odoo 15 but not in Odoo 16. How to balance things in Odoo 16?

Related Posts Replies Views Activity
2
Sep 24
1399
0
Sep 24
720
2
Jul 24
1180
2
Mar 24
3396
1
May 23
2429