odoo/odoo#253683

Created by fw-bot
Merged at dfedffa922779c8b8e509f6657002cbc5e530351

Statuses:

label
odoo-dev:saas-19.1-19.0-website-opw-5892402-nle-502125-fw
head
292aec25acb5eea0d5148af959e4f3ffe5ddc277
merged
3 weeks ago by Bugfix, Nicolas Lempereur (nle)
odoo/odoo
19.0 #250611
saas-19.1 #253683
saas-19.2 #253888
master #253964

[FIX] website: save partial AI translation success

Scenario:

Result: you see a message "Connection lost. Trying to reconnect..." and
after waiting 10-20 seconds, no translation are inserted in the page.
In reality the requests after the 3 first ones were cancelled (with
error 429 too many requests) by nginx, and the 3 first ones worked
correctly but their result was not used because of the error of the
other ones.

Fix:

This way even if there is an error, the translation is not totally
blocked and doesn't need to be restarted from zero (making it impossible
in the original scenario).

Side note: the number of text blocks not translated was a multiplication
of the total number of text blocks by the number of failed response.
This fix adapts it to just the total of words substrating the number of
translation applied.

opw-5892402

Forward-Port-Of: #250611