Thursday, December 19, 2019
2 changes · master
Enhancements to existing features
Point of Sale customer lists now show only contacts that have previously acted as customers, reducing clutter from unrelated partners. Each paid POS order also increases the customer ranking for the buyer, helping keep customer records accurate over time.
Original PR description
Following the removing of the vendor and customer field, when we wanted to display customer in the pos, we saw all. Now, we only see partner with a customer rank higher than 0. We also increase the customer rank each time a pos order is paid. task-id: 2092483 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Default values are now selected based on the company being set on a new record, rather than always using the current user's company. This improves consistency in multi-company setups and helps avoid records being created with values from the wrong company.
Original PR description
**Description of the issue/feature this PR addresses:** Suppose a model that have "A" and "company_id" fields. In multi-company, the user in company C creates a record of this model with company_id =…
**Description of the issue/feature this PR addresses:** Suppose a model that have "A" and "company_id" fields. In multi-company, the user in company C creates a record of this model with company_id = C2. In the creation of this record, the `default_get` method is executed. If in context doesn't exist a "`default_A`", then A field will have the value obtained in `get_model_defaults` method. But this method will return the default in company C instead of the default in company C2. So, it's not consistent to have a record in company C2 and one of its attributes (subfields) in company C. **Current behavior before PR:** The `get_model_defaults` method always considers the company of the user for finding default values. **Desired behavior after PR is merged:** The `get_model_defaults` method first considers the `default_company_id` context for finding default values, and if doesn't exist this context then finds with the company of the user. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr