Odoo - Modify Journal items in invoice

Job ID: 37508738

Budget: €30 – €250 EUR

Hello,

ONLY ODOO EXPERIENCE DEVELOPERS. THIS MUST BE DONE IN ONE DAY.

I need to modify the journal items in my invoices only for the tax REBU ( sales ).

Check screenshots:
1º invoice lines, no modification needed. they are good.
2º invoice journal items: modification needed, as follows:

CONDITION: ONLY when the item is taxed with tax called "REBU (sales)"

TASK:
Separate the "base" of the tax into two bases following this formula:

base 1 = item purchase cost ( the field is already created : "lot.x_serial_purchase_precio" )
base 2 = ( item sale price - item purchase cost ) / 1.21
tax = ( item sale price - item purchase cost ) - base 2

That is it.

I am using Odoo v15 Enterprise hosted on odoo.sh .
Related categories: Python ERP Odoo