Skip to content
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

Loyalty default product now filtered by user company #165575

Open
SonoDavid opened this issue May 15, 2024 · 0 comments
Open

Loyalty default product now filtered by user company #165575

SonoDavid opened this issue May 15, 2024 · 0 comments
Labels

Comments

@SonoDavid
Copy link

Impacted versions: v16

Steps to reproduce:
Create multiple companies and go to the Discounts & Loyalty view.
When choosing program type Buy X Get Y, the default chose product is filled in below.

Current behavior:
The product if not filtered by company_id, resulting in products which are not editable because the user has no rights to edit or remove the company-specific product.

Expected behavior:
The product should be filtered by company_id, suggested change:
first_sale_product = self.env['product.product'].search([('sale_ok', '=', True), ("company_id", "in", [False] + self.env.company.ids)], limit=1)
in the file loyalty_program.py in the addon loyalty.

Video/Screenshot link (optional):

Support ticket number submitted via odoo.com/help (optional):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants