odoo/odoo#237756

Created by fw-bot
Merged at 002bc70f6b0e96216cbc34fc91db75e57645ef8a

Statuses:

label
odoo-dev:saas-18.2-18.0-fix_product_compute_write_date-mle-480203-fw
head
731c3038bfa6a054de3a0cddbb03d188bce2a9af
merged
3 days ago by Sales, Victor Feyens (vfe)
odoo/odoo
18.0 #237523
saas-18.2 #237756
saas-18.3 #238010 missing r+
saas-18.4 #238027 missing r+
19.0 #238032 missing r+
master #238035 missing r+

[18.0] [FIX] product: _compute_write_date when launched on product template NewId

If _compute_write_date is launched when creating a product.product without starting from an existing product.template, the compute may be launched before the product.template is created, hence record.product_tmpl_id.write_date is False, and comparing datetime and bool leads to an error.

This completes the fix proposed #138177

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #237523