-
Notifications
You must be signed in to change notification settings - Fork 30.6k
[18.0] [FIX] product: _compute_write_date when launched on product template NewId #237756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[18.0] [FIX] product: _compute_write_date when launched on product template NewId #237756
Conversation
|
@marielejeune @Feyensv cherrypicking of pull request #237523 failed. stdout: Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?). In the former case, you may want to edit this PR message as well. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
|
I believe commit 7ba64a8 already handled the issue in 18.2 and next versions. |
|
@Feyensv No this is not handled. Please check code in 18.2 and next versions. There were some modifications, hence the merge conflict, but the bug is not fixed. |
…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. X-original-commit: 8097b67
615e02b to
731c303
Compare
|
Well, I believe the main (only?) case of template absence is when the product doesn't exist already (and therefore has no id, entering the robodoo r+ |
|
@Feyensv indeed, thanks! |
…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. closes #237756 X-original-commit: 8097b67 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>

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