In Odoo 11 I has created some custom fields for sales order lines that addd a quantity multiplier "from each of" to each line.
If the product was ordered quantity:3 fromeachof:2 the total would actually be 6 even if the item quantity was only 3 (the client asked for this and would not budge).
I had this working just fine in 11 and when I moved to 14, the \sales\.order\.line\\ calculations\ still\ worked\ OK\,\ but\ when\ an\ invoice\ was\ created\,\ the\ sales\ tax\ would\ only\ be\ calculated\ based\ on\ the\ quantity\ but\ not\ the\ quantity\ \*\ fromeach\ of\ like\ it\ did\ for\ the\ sales\ order\.\ \ \\
As\ much\ as\ I\ tried\ every\ possible\ angle\ in\ inheriting\ and\ trying\ to\ add\ the\ fromeachof\ multiplier\ like\ I\ did\ in\ version\ 11\,\ since\ \account\.invoice\.line\\ no\ longer\ exists\,\ I\ can\'t\ figure\ out\ how\ to\ do\ the\ same\ calculation\.\\ This\ was\ my\ original\ code\ for\ Odoo11\ that\ worked\:\\ How\ can\ I\ accomplish\ the\ same\ functionality\ in\ Odoo14\?\ \ \(after\ the\ \"accounting\-pocalypse\"\)\\ Sales\ Order\ screen\ in\ 14\:\ \https://pasteboard.co/jQ7OXG31OxpB.pngdef\ _compute_price\(self\)\:\
\ \ \ \ for\ record\ in\ self\:\
\ \ \ \ \ \ \ \ currency\ \=\ record\.invoice_id\ and\ record\.invoice_id\.currency_id\ or\ None\
\ \ \ \ \ \ \ \ price\ \=\ \(\
\ \ \ \ \ \ \ \ \ \ \ \ record\.price_unit\
\ \ \ \ \ \ \ \ \ \ \ \ \*\ \(1\ \-\ \(record\.discount\ or\ 0\.0\)\ \/\ 100\.0\)\
\ \ \ \ \ \ \ \ \ \ \ \ \*\ \record\.fromeachof\\
\ \ \ \ \ \ \ \ \)\
\ \ \ \ \ \ \ \ taxes\ \=\ False\
\ \ \ \ \ \ \ \ if\ record\.invoice_line_tax_ids\:\
\ \ \ \ \ \ \ \ \ \ \ \ taxes\ \=\ record\.invoice_line_tax_ids\.compute_all\(\
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ price\,\
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ currency\,\
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ record\.quantity\,\
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ product\=record\.product_id\,\
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ partner\=record\.invoice_id\.partner_id\,\
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \fromeachof\=record\.fromeachof\\,\
\ \ \ \ \ \ \ \ \ \ \ \ \)\
\ \ \ \ \ \ \ \ record\.price_subtotal\ \=\ price_subtotal_signed\ \=\ \(\
\ \ \ \ \ \ \ \ \ \ \ \ taxes\[\"total_excluded\"\]\ if\ taxes\ else\ record\.quantity\ \*\ price\
\ \ \ \ \ \ \ \ \)\
\ \ \ \ \ \ \ \ record\.price_total\ \=\ taxes\[\"total_included\"\]\ if\ taxes\ else\ record\.price_subtotal\
\ \ \ \ \ \ \ \ if\ \(\
\ \ \ \ \ \ \ \ \ \ \ \ record\.invoice_id\.currency_id\
\ \ \ \ \ \ \ \ \ \ \ \ and\ record\.invoice_id\.currency_id\
\ \ \ \ \ \ \ \ \ \ \ \ \!\=\ record\.invoice_id\.company_id\.currency_id\
\ \ \ \ \ \ \ \ \)\:\
\ \ \ \ \ \ \ \ \ \ \ \ price_subtotal_signed\ \=\ record\.invoice_id\.currency_id\.with_context\(\
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ date\=record\.invoice_id\._get_currency_rate_date\(\)\
\ \ \ \ \ \ \ \ \ \ \ \ \)\.compute\(price_subtotal_signed\,\ record\.invoice_id\.company_id\.currency_id\)\
\ \ \ \ \ \ \ \ sign\ \=\ \ in\ \[\"in_refund\"\,\ \"out_refund\"\]\ and\ \-1\ or\ 1\
\\ \ \ \ \ \ \ \ record\.price_subtotal_signed\ \=\ price_subtotal_signed\ \*\ sign\
record\.invoice_id\.type\\
\\