Skip to content
Snippets Groups Projects
Commit 01160ee5 authored by Nicolas Galler's avatar Nicolas Galler
Browse files

[FIX] product: archiving last variant must archive product template


Behavior prior to this fix:

When archiving the last variant on a template, the product template
stays active (contrary to the comment indicating that `toggle_active`
will archive the related product.template if there is only one active
`product.product`).

Behavior after the fix:

When archiving the last variant on a template, the product template is
archived.  When un-archiving that variant, the product template is
unarchived as well, without un-archiving the other variants.

Note: this is a remake of a fix implemented in 77e5472c, as that fix
did not correctly count the inactive variants.

opw-2349862

closes odoo/odoo#60536

Signed-off-by: default avatarNicolas Galler <nicocrm@users.noreply.github.com>
parent bd139d49
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment