Thomas Lefebvre (thle) 0728b447a6 [FIX] loyalty: default product for reward in multi company
Steps to reproduce:
-------------------
- being in a multi-company environment;
- have one product made that is first in alphabetical
    order of "Internal Reference" throughout the database (e.g. [AAA]);
- make this product specific to one of the companies
    (set the "Company" field on the product template)
- go into a different company within the database
    (not the one set on this product);
- create a new discount & loyalty record, and set
    the "Program Type" to "Discount Code".

Issue:
------
An access rights error occurs.

Cause:
------
When creating a `promo_code` program, we use the first product
that can be sold in the default reward values.

Solution:
---------
Take into account the company in the domain that retrieves
the default product.

opw-3538516

closes odoo/odoo#139008

X-original-commit: d80c28c78bf3237e2526a6370f9c6c0b0f8dc232
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-10-18 13:39:15 +00:00
…
2023-10-16 13:11:17 +00:00
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%