Wednesday, July 29, 2020
20 changes · master
New functionality added to Odoo
This update lets users run actions directly from list views, either on selected records or on the full filtered list. It makes common workflows faster across areas such as Accounting, CRM, Expenses, Inventory, Manufacturing, Purchasing, and Lunch by reducing the need to open individual records.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Enhancements to existing features
The point of sale customer list and customer editing screens have been updated to make the workflow smoother and more consistent with the rest of Odoo. This helps staff find, review, and update customer information more easily during sales operations.
Original PR description
Improve the flow of the customer list and edit to fit better with odoo. task-id: 2294251 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
Editing product matrices on unsaved sales orders now uses the correct current data instead of reusing stale values from previous edits. This prevents errors, avoids duplicate order lines, and makes quantity updates behave as expected.
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Enter keypress browser event were removed in 3c372d1da8b for some navigation by keypress changes. It was reintroduced in text fields with d2f024d2543 and this PR do the same and reintroduce it for source editor of FieldHtml (html widget). opw-2302605 Forward-Port-Of: odoo/odoo#55066
Original PR description
Enter keypress browser event were removed in 3c372d1da8b for some navigation by keypress changes. It was reintroduced in text fields with d2f024d2543 and this PR do the same and reintroduce it for source editor of FieldHtml (html widget). opw-2302605 Forward-Port-Of: odoo/odoo#55066
Several accounting-related list views have been adjusted so their action buttons work better with the updated control panel layout. This makes common actions easier to access and keeps the user experience more consistent across affected screens.
Original PR description
task-2246383
Point of Sale customer screens now show loyalty points during customer editing. Managers can adjust these points when needed, while regular cashiers can view them without making changes.
Original PR description
Add loyalty points to the client edit view in the front end. Allows the manager to change it but not normal cashier. task-id: 2294251
When sending a test email for a mass mailing, it was using the default server, ignoring the one that could have been set on the mailing object. This commit fixes this issue, so that the way the test emails are sent is even closer to the real process. Forward-Port-Of: odoo/odoo#55041
Original PR description
When sending a test email for a mass mailing, it was using the default server, ignoring the one that could have been set on the mailing object. This commit fixes this issue, so that the way the test emails are sent is even closer to the real process. Forward-Port-Of: odoo/odoo#55041
1) Create a stockable product > Add some quantities on hand 2) Edit this product > set it as a consumable or service 3) Create an inventory adjustment on all products Error will raise "Something went wrong! You can only adjust storable products. This occur because when switching product type the available quantity was not cleared, so it will get in the next inventory, but only storable products can have inventory. So the product should to have no quantity left before switching type
Original PR description
1) Create a stockable product > Add some quantities on hand 2) Edit this product > set it as a consumable or service 3) Create an inventory adjustment on all products Error will raise "Something went wrong! You can only adjust storable products. This occur because when switching product type the available quantity was not cleared, so it will get in the next inventory, but only storable products can have inventory. So the product should to have no quantity left before switching type opw-2300478 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#55042 Forward-Port-Of: odoo/odoo#54631
Allow user that have a employee in a company A and that is allowed on company A and B to timesheet on company B Problem: A user have access on company A and B but is link to an employee that belong to company A. He want to timesheet on a project from the company B. He gets an error "Incompatible companies on records". Since most users are linked to only one employee that belongs to one company. It's impossible to have consistent companies. Solution: The employee shouldn't be c
Original PR description
Allow user that have a employee in a company A and that is allowed on company A and B to timesheet on company B Problem: A user have access on company A and B but is link to an employee that belong to company A. He want to timesheet on a project from the company B. He gets an error "Incompatible companies on records". Since most users are linked to only one employee that belongs to one company. It's impossible to have consistent companies. Solution: The employee shouldn't be checked on the timesheet -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#55065 Forward-Port-Of: odoo/odoo#54999
Forward-Port-Of: odoo/odoo#55033
Original PR description
Forward-Port-Of: odoo/odoo#55033
`_compute_total_amount_company` calls `currency_id._convert`, for which it's required to pass a company in the args However, the field `company_id` is not required on the model `hr.expense`, which mean it's not impossible to have an `hr.expense` without a company set. Though, `_compute_total_amount_company` will only call `_convert` when the expense `company_currency_id` is set. ```python if expense.company_currency_id: ``` `company_currency_id` is a related field to the expense s
Original PR description
`_compute_total_amount_company` calls `currency_id._convert`, for which it's required to pass a company in the args However, the field `company_id` is not required on the model `hr.expense`, which…
`_compute_total_amount_company` calls `currency_id._convert`,
for which it's required to pass a company in the args
However, the field `company_id` is not required on the model `hr.expense`,
which mean it's not impossible to have an `hr.expense` without a company set.
Though, `_compute_total_amount_company` will only call `_convert`
when the expense `company_currency_id` is set.
```python
if expense.company_currency_id:
```
`company_currency_id` is a related field to the expense sheet:
```python
related='sheet_id.currency_id'
```
On the sheet, the currency is filled by default with the user company currency:
```python
default=lambda self: self.env.user.company_id.currency_id
```
On the expense sheet, it's the same strategy to fill by default the company:
```python
default=lambda self: self.env.user.company_id
```
So, when `company_currency_id` is set on the `hr.expense`,
there are pretty good chances `company_id` is set on the expense sheet,
and we can therefore fallback to the sheet company when
the expense company is not set correctly.
Migration request 44751
```
File "/src/odoo/12.0/odoo/addons/base/maintenance/migrations/hr_expense/saas~11.1.2.0/post-compute-fields.py", line 12, in migrate
util.recompute_fields(cr, 'hr.expense', ['total_amount_company'], ids=ids)
File "/src/odoo/12.0/odoo/addons/base/maintenance/migrations/util.py", line 3895, in recompute_fields
records.recompute()
File "/src/odoo/12.0/odoo/models.py", line 5301, in recompute
vals = {n: rec[n] for n in ns}
File "/src/odoo/12.0/odoo/models.py", line 5301, in <dictcomp>
vals = {n: rec[n] for n in ns}
File "/src/odoo/12.0/odoo/models.py", line 5148, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/src/odoo/12.0/odoo/fields.py", line 1016, in __get__
self.determine_value(record)
File "/src/odoo/12.0/odoo/fields.py", line 1105, in determine_value
self.compute_value(recs)
File "/src/odoo/12.0/odoo/fields.py", line 1083, in compute_value
self._compute_value(records)
File "/src/odoo/12.0/odoo/fields.py", line 1074, in _compute_value
getattr(records, self.compute)()
File "/src/odoo/12.0/addons/hr_expense/models/hr_expense.py", line 115, in _compute_total_amount_company
expense.company_id, date_expense or fields.Date.today())
File "/src/odoo/12.0/odoo/addons/base/models/res_currency.py", line 200, in _convert
assert company, "convert amount from unknown company"
AssertionError: convert amount from unknown company
```
Forward-Port-Of: odoo/odoo#55112task-2248307 Forward-Port-Of: odoo/odoo#54888
Original PR description
task-2248307 Forward-Port-Of: odoo/odoo#54888
task-2299330 Forward-Port-Of: odoo/odoo#55107
Original PR description
task-2299330 Forward-Port-Of: odoo/odoo#55107
Forward-Port-Of: odoo/odoo#55137
Original PR description
Forward-Port-Of: odoo/odoo#55137
`_compute_total_amount_company` calls `currency_id._convert`, for which it's required to pass a company in the args However, the field `company_id` is not required on the model `hr.expense`, which mean it's not impossible to have an `hr.expense` without a company set. Though, `_compute_total_amount_company` will only call `_convert` when the expense `company_currency_id` is set. ```python if expense.company_currency_id: ``` `company_currency_id` is a related field to the expense s
Original PR description
`_compute_total_amount_company` calls `currency_id._convert`, for which it's required to pass a company in the args However, the field `company_id` is not required on the model `hr.expense`, which…
`_compute_total_amount_company` calls `currency_id._convert`,
for which it's required to pass a company in the args
However, the field `company_id` is not required on the model `hr.expense`,
which mean it's not impossible to have an `hr.expense` without a company set.
Though, `_compute_total_amount_company` will only call `_convert`
when the expense `company_currency_id` is set.
```python
if expense.company_currency_id:
```
`company_currency_id` is a related field to the expense sheet:
```python
related='sheet_id.currency_id'
```
On the sheet, the currency is filled by default with the user company currency:
```python
default=lambda self: self.env.user.company_id.currency_id
```
On the expense sheet, it's the same strategy to fill by default the company:
```python
default=lambda self: self.env.user.company_id
```
So, when `company_currency_id` is set on the `hr.expense`,
there are pretty good chances `company_id` is set on the expense sheet,
and we can therefore fallback to the sheet company when
the expense company is not set correctly.
Migration request 44751
```
File "/src/odoo/12.0/odoo/addons/base/maintenance/migrations/hr_expense/saas~11.1.2.0/post-compute-fields.py", line 12, in migrate
util.recompute_fields(cr, 'hr.expense', ['total_amount_company'], ids=ids)
File "/src/odoo/12.0/odoo/addons/base/maintenance/migrations/util.py", line 3895, in recompute_fields
records.recompute()
File "/src/odoo/12.0/odoo/models.py", line 5301, in recompute
vals = {n: rec[n] for n in ns}
File "/src/odoo/12.0/odoo/models.py", line 5301, in <dictcomp>
vals = {n: rec[n] for n in ns}
File "/src/odoo/12.0/odoo/models.py", line 5148, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/src/odoo/12.0/odoo/fields.py", line 1016, in __get__
self.determine_value(record)
File "/src/odoo/12.0/odoo/fields.py", line 1105, in determine_value
self.compute_value(recs)
File "/src/odoo/12.0/odoo/fields.py", line 1083, in compute_value
self._compute_value(records)
File "/src/odoo/12.0/odoo/fields.py", line 1074, in _compute_value
getattr(records, self.compute)()
File "/src/odoo/12.0/addons/hr_expense/models/hr_expense.py", line 115, in _compute_total_amount_company
expense.company_id, date_expense or fields.Date.today())
File "/src/odoo/12.0/odoo/addons/base/models/res_currency.py", line 200, in _convert
assert company, "convert amount from unknown company"
AssertionError: convert amount from unknown company
```
Forward-Port-Of: odoo/odoo#55120
Forward-Port-Of: odoo/odoo#55112**PURPOSE** When you hover on the bubble tooltip infobox then sometimes its glitch, and moves left. once you leave the mouse over from the tooltip info then it will be repositioned as before. **SPEC** So with this commit, we have resolved this issue by giving the condition on the repositioning of every time, the _updatePosition methods execute. If the tooltip infobox is open then we are not repositioning the box's position. otherwise, it will be repositioned. Task: 2263600 Forward-
Original PR description
**PURPOSE** When you hover on the bubble tooltip infobox then sometimes its glitch, and moves left. once you leave the mouse over from the tooltip info then it will be repositioned as before. **SPEC** So with this commit, we have resolved this issue by giving the condition on the repositioning of every time, the _updatePosition methods execute. If the tooltip infobox is open then we are not repositioning the box's position. otherwise, it will be repositioned. Task: 2263600 Forward-Port-Of: odoo/odoo#52243
Oversight of d6a23144d5c5b85c2a02097bcbb3e006a9c2c52a Forward-Port-Of: odoo/odoo#55130
Original PR description
Oversight of d6a23144d5c5b85c2a02097bcbb3e006a9c2c52a Forward-Port-Of: odoo/odoo#55130
Message attachments are not yet supported in livechat for website visitors, so the "Add file" button should not be visible. closes #54927 Forward-Port-Of: odoo/odoo#54983 Forward-Port-Of: odoo/odoo#54957
Original PR description
Message attachments are not yet supported in livechat for website visitors, so the "Add file" button should not be visible. closes #54927 Forward-Port-Of: odoo/odoo#54983 Forward-Port-Of: odoo/odoo#54957
Make sure to fallback on the commercial partner name when slicing if no banc account holder name or parter name is defined. opw-2304857 Forward-Port-Of: odoo/enterprise#12090 Forward-Port-Of: odoo/enterprise#12081
Original PR description
Make sure to fallback on the commercial partner name when slicing if no banc account holder name or parter name is defined. opw-2304857 Forward-Port-Of: odoo/enterprise#12090 Forward-Port-Of: odoo/enterprise#12081
Several fixes over the past few months have modified the P&L, making it inconsistent across versions: https://github.com/odoo/enterprise/commit/8c00ab3aaf190e97258b224a8636de6089386d49 https://github.com/odoo/enterprise/commit/c3d1d38a98f7192ce8bdb0ab765a16dc2ec0caeb https://github.com/odoo/enterprise/commit/15fb3af63392f06b3d4bba9abc064be51977f589 https://github.com/odoo/enterprise/commit/f47bb368e804652174787d9ced7a854089faed01 This commit has 2 goals: - make the computation consist
Original PR description
Several fixes over the past few months have modified the P&L, making it inconsistent across versions: https://github.com/odoo/enterprise/commit/8c00ab3aaf190e97258b224a8636de6089386d49 https://github.com/odoo/enterprise/commit/c3d1d38a98f7192ce8bdb0ab765a16dc2ec0caeb https://github.com/odoo/enterprise/commit/15fb3af63392f06b3d4bba9abc064be51977f589 https://github.com/odoo/enterprise/commit/f47bb368e804652174787d9ced7a854089faed01 This commit has 2 goals: - make the computation consistent on all supported versions - expand the formula of the Net Profit to avoid using other computed balances The latter was probably the source of the aforementioned commits: fixing one computation would incorrectly modify another one. opw-2289466 Forward-Port-Of: odoo/enterprise#12068 Forward-Port-Of: odoo/enterprise#11668