Daily updates from Odoo
Friday, April 29, 2022
12 changes · master
Enhancements to existing features
This update replaces older internal command wording with clearer alternatives in approvals, enterprise mail, and website helpdesk live chat. It helps developers maintain these areas more easily without changing what business users see or do.
Original PR description
*: approvals, website_helpdesk_livechat This commit turns some `link`/`unlink`/`unlinkAll` to `replace`/`clear`. The commands `replace`/`clear` are easier to understand, and also clearly tells what’s the expected resulting value of this field. This change will help turning big and imperative code into smaller declarative code. Task-2834598 community: https://github.com/odoo/odoo/pull/89852
The EC Sales report and Belgian Partner VAT Listing now open with last month selected by default. This better matches the typical reporting period, helping users review and submit recent monthly tax information with fewer manual filter changes.
Original PR description
Default filter for EC Sales report and Partner VAT Listing report should be last month
This update changes several Odoo apps to use a shared messaging communication method behind the scenes. It reduces transition work and risk ahead of upcoming Discuss improvements, with little direct impact on day-to-day users.
Original PR description
*: approvals, documents, documents_spreadsheet, l10n_de_pos_cert, l10n_de_pos_res_cert, pos_l10n_se. This PR prepares the ground for the one introducing the new env in discuss. The signature of the rpc function has changed a lot from the one in the old env. In order to ease the transition and reduce the noise, the discuss models now rely on the messaging's rpc function. task-2582313 community: https://github.com/odoo/odoo/pull/89858
Timesheet reporting now opens in the grid view by default, making billing-type analysis quicker to access. The mobile timer and lock-date settings screens were also cleaned up with clearer labels and simpler controls.
Original PR description
**PURPOSE** Generic improvements for services. **SPECIFICATION** - Reporting > timesheets by billing type: set the grid view as the default view. - For timer on mobile: Removed 'or use a hot key'. Switched the letters for the fa-play icon. - Settings > lock dates feature: Added a line break between the description and the field. Displayed the 'block timesheets older than' label in bold **Related Community PR**: https://github.com/odoo/odoo/pull/85726 **task**-2766164
This update refreshes the spreadsheet component used in Documents and fixes the chart menu so it appears correctly at the top right of charts. Users get a smoother, less confusing experience when working with charts in spreadsheets.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/c838b590 [FIX] chart: context-menu on top-right of chart
Resolved issues and error corrections
This update corrects how Mexican electronic invoice reports display payment term and fiscal position notes. It avoids invalid page structure that could cause notes to appear outside their intended section or render inconsistently in browsers.
Original PR description
Linked to PR https://github.com/odoo/odoo/pull/88660
Current behavior:
The invoice payment term of the report is a p tag with another p tag inside like:
<p name="payment_term">
<span>
<p> This is a payment term note</p>
</span>
</p>
but because nested p tags are not supported in html de result in the browser is something like:
<p name="payment_term">
<span></span>
</p>
<p> This is a payment term note</p>
<p></p>
Similar behavior can be observe for the fiscal position note.
Expected behavior:
The code should respect html format rules and not have nested p tags.
Solution: We replace the parent p tags by div tags, and we modify xml file that have xpath relying
on this tag.
To prevent to breack the xml references we also modified the references from p to div
opw-2804933Miscellaneous changes
If the company's invoice partner's phone number is missing, _raw_phonenumber breaks and the XML report can't be exported. In stable: pass the company's phone number if the partner's phone number is missing. In master: remove the check for the company's phone number and pass an empty string to export the XML. Forward-Port-Of: odoo/enterprise#26294
Original PR description
If the company's invoice partner's phone number is missing, _raw_phonenumber breaks and the XML report can't be exported. In stable: pass the company's phone number if the partner's phone number is missing. In master: remove the check for the company's phone number and pass an empty string to export the XML. Forward-Port-Of: odoo/enterprise#26294
Indicated by the 'shipTo' name in the 'addresses' part in an Avatax transaction API request: ``` { "addresses": { ... "shipTo": { ... } } ... } ``` The sale module adds partner_shipping_id on both account.move and sale.order so always use that if sale is installed. Using `_get_invoice_delivery_partner_id()` like in account_taxcloud was considered but it seems more understandable to directly use the partner on the record rather than sending a child d
Original PR description
Indicated by the 'shipTo' name in the 'addresses' part in an Avatax
transaction API request:
```
{
"addresses": {
...
"shipTo": {
...
}
}
...
}
```
The sale module adds partner_shipping_id on both account.move and
sale.order so always use that if sale is installed.
Using `_get_invoice_delivery_partner_id()` like in account_taxcloud was
considered but it seems more understandable to directly use the
partner on the record rather than sending a child delivery address to
Avatax without the user knowing this.
opw-2834229
Forward-Port-Of: odoo/enterprise#26714**1:/** Error in the test_mrp_avg_cost_calculation because it calls the do_finish() method that isn't defined in the module or its dependencies. The do_finish method is defined in the mrp_workorder module, which isn't part of the dependencies. _**Solution:**_ no need to call the do_finish method in this case **2:/** when the duration is set in the workorder: https://github.com/odoo/enterprise/blob/5572557916fd7133ee6d5bd0aec223de9be72915/mrp_account_enterprise/tests/test_report.py#L174
Original PR description
**1:/** Error in the test_mrp_avg_cost_calculation because it calls the do_finish() method that isn't defined in the module or its dependencies. The do_finish method is defined in the mrp_workorder module, which isn't part of the dependencies. _**Solution:**_ no need to call the do_finish method in this case **2:/** when the duration is set in the workorder: https://github.com/odoo/enterprise/blob/5572557916fd7133ee6d5bd0aec223de9be72915/mrp_account_enterprise/tests/test_report.py#L174 the timer continues to run between the assignment of the duration and the execution of the `button_mark_done`: https://github.com/odoo/enterprise/blob/5572557916fd7133ee6d5bd0aec223de9be72915/mrp_account_enterprise/tests/test_report.py#L178 which changes the total duration and impacts the production cost calculation _**Solution:**_ freeze the date so that the timer does not continue to run Forward-Port-Of: odoo/enterprise#26738 Forward-Port-Of: odoo/enterprise#26726
Steps to reproduce: - Install data_merge & contacts module - Create 2 new contact with same name but different address - Go to Data Cleaning -> Configuration -> Deduplication - Select 'Contact' - Set only `Name (res.partner)` in Deduplication Rules - Click on 'Deduplicate': 1 group with 2 contacts should be display (notice similarity value; let's assume it's 90%) - Go back and set a `Suggestion Threshold` above the similarity value (95% in this case if the c
Original PR description
Steps to reproduce:
- Install data_merge & contacts module
- Create 2 new contact with same name but different address
- Go to Data Cleaning -> Configuration -> Deduplication
- Select 'Contact'
- Set only `Name (res.partner)` in Deduplication Rules
- Click on 'Deduplicate':
1 group with 2 contacts should be display
(notice similarity value; let's assume it's 90%)
- Go back and set a `Suggestion Threshold` above the similarity value
(95% in this case if the contacts' similarity is 90%)
- Click on 'Deduplicate'
Issue:
Groups with similarity less than `Suggestion Threshold` are displayed.
Cause:
Not updating related group when `Suggestion Threshold` is changed.
Solution:
When updating `Suggestion Threshold`, unlink all group that have a
`Similiraty` under the threshold value.
opw-2833074
Forward-Port-Of: odoo/enterprise#26725Steps to reproduce the issue: - Let's consider two companies C1 and C2 - Set Synchronize invoices/bills on C2 - Log in C1 and create a customer invoice I for C2 - Add a line L at 50€ and create an analytic account AA - Validate I Bug: Incompatible companies on records because Odoo tried to create a vendor bill line with company C2 and AA on it. PS: Analytic accounts cannot be shared Same idea for analtic tag opw:2792301 Forward-Port-Of: odoo/enterprise#25668
Original PR description
Steps to reproduce the issue: - Let's consider two companies C1 and C2 - Set Synchronize invoices/bills on C2 - Log in C1 and create a customer invoice I for C2 - Add a line L at 50€ and create an analytic account AA - Validate I Bug: Incompatible companies on records because Odoo tried to create a vendor bill line with company C2 and AA on it. PS: Analytic accounts cannot be shared Same idea for analtic tag opw:2792301 Forward-Port-Of: odoo/enterprise#25668
opw-2789340 See also: - https://github.com/odoo/odoo/pull/89635 Forward-Port-Of: odoo/enterprise#26695 Forward-Port-Of: odoo/enterprise#26590
Original PR description
opw-2789340 See also: - https://github.com/odoo/odoo/pull/89635 Forward-Port-Of: odoo/enterprise#26695 Forward-Port-Of: odoo/enterprise#26590