odoo/odoo#253964

Created by fw-bot
Merged at a79f7f3fae0d35b7f7824be51563a1cd4bcc22c8

Statuses:

label
odoo-dev:master-19.0-website-opw-5892402-nle-507703-fw
head
385685118743ef895705a2a439238276b488c4cc
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: #253683
Forward-Port-Of: #250611