Skip to content

sale_attached_product - bug with attached_product_ids domain #4060

@anthonissen-a

Description

@anthonissen-a

Module

sale_attached_product

Describe the bug

The domain of attached_product_ids contains ("id, "=", id) which compares the id of a product.template with the id of a product.product. It works as long as there are no product variants configured in the DB, but makes no sense to me otherwise.

To Reproduce

Affected versions: all

Steps to reproduce the behavior:

  1. Create a product.template with several product variants.
  2. Create another product.template.
  3. Go to the newest product.template form view.
  4. Check the domain of attached_product_ids. It does contain itself and does not contain a random other product.product (the one having the same id).

Expected behavior
Two options:

  1. Remove this domain of attached_product_ids and see all product.products.
  2. Hide all the product.products related to this product.template.

Additional context
See commit : 0b7d83f in PR : #3925

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions