odoo/odoo#162586

Created by fw-bot
Merged at 264c773982f8e4feaee841f55373784265ae2057

Statuses:

label
odoo-dev:saas-17.2-16.0-digest_user-nim-1_tm-fw
head
53da57fb49192f827014121347d174196a994c5e
merged
1 year ago by Infra, Nicolas Martinelli (nim)
odoo/odoo
16.0 #162230
saas-16.3 #162421
saas-16.4 #162434
17.0 #162563
saas-17.1 #162572
saas-17.2 #162586
18.0
saas-18.1
saas-18.2
saas-18.3
master #162612

[FW][FIX] digest: do not write on default digest if not necessary

When a portal user is created (e.g. through the auth_signup module),
an unnecessary write is done on the write_date of the default digest.
This write is unnecessary since a portal user is never subscribed to
the default digest.

In case of a high signup frequency, it can cause concurrent transaction
errors.

We avoid writing if no internal user is being created.

Forward-Port-Of: #162230