Daily updates from Odoo
Tuesday, November 12, 2019
30 changes
Enhancements to existing features
Demo products and partner records are no longer tied to the administrator's company when they are meant to be shared. This makes multi-company demo setups work more consistently across inventory, manufacturing, purchasing, and point of sale flows.
Original PR description
The same as PR https://github.com/odoo/odoo/pull/21220. I made this PR again just to be able to make changes and updates in order to assure this PR gets green. I have tested locally and there is nothing wrong :S -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This pull request reorganizes and cleans up automated tests across several Odoo areas, especially accounting, CRM, manufacturing, delivery, and HR. It reduces duplicate test runs and separates test-only automation code, helping teams maintain quality checks more efficiently without changing day-to-day product behavior.
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
When creating or editing a task without a selected project, the stage status bar will now stay empty instead of showing unrelated stages. This keeps the task form cleaner and helps users avoid choosing an inappropriate stage before the project context is known.
Original PR description
Purpose ======= If the user creates a task and if the project isn't set, then all the stages that are not linked to a project are displayed, which is polluting the form view. Specifications ============== If no project is set on the task form view, do not display any stages in the statusbar. 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
This update cleans and streamlines internal automated tests across several business areas, mainly by removing outdated comments, renaming shared test helpers, and preventing duplicate payroll-accounting test runs. It improves maintainability and reliability of the test suite without changing customer-facing product behavior.
Odoo Studio now makes it easier to find the correct related field when creating one-to-many fields. Users can search by both display names and technical names for fields and models, reducing confusion from duplicate-looking labels.
Original PR description
Task : https://www.odoo.com/web?#id=2083620&action=327&model=project.task&view_type=form&menu_id=4720 Pad : https://pad.odoo.com/p/openerp-project.task-29VGAW40Z7
Resolved issues and error corrections
The expense screen no longer shows the attachment icon when there are no attachments available. This avoids sending users to an empty attachment page and keeps the interface clearer.
Original PR description
**Description of the issue/feature this PR addresses:** It's better to don't shown attachment icon when there aren't attachments and when supposedly you shouldn't add attachments. **Current behavior before PR:** If there aren't attachments, and you click on the attachment icon, you will go to an empty attachment page. **Desired behavior after PR is merged:** The attachment icon is not shown if there aren't attachments. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes how warning messages appear in Odoo Studio when users add a field inside a restricted group. The messages now stack clearly one after another instead of appearing squeezed into columns, making the warning easier to understand.
Original PR description
Task : https://www.odoo.com/web?#id=2117251&action=327&model=project.task&view_type=form&menu_id=4720 PAD : https://pad.odoo.com/p/openerp-project.task-L1UGO6T39Z
The Website option in Studio has been repositioned from the icon area to the menu section, matching the established layout from Odoo 12. This makes the Studio navigation more consistent and easier for users to recognize.
Original PR description
Task : https://www.odoo.com/web?#id=2095236&action=327&model=project.task&view_type=form&menu_id=4720 PAD : https://pad.odoo.com/p/openerp-project.task-WK8XD1ME4G
Miscellaneous changes
When using the flamegraph module from a parent directory of odoo, the dirname method returns a relative path, leading to a traceback. With this commit, the odoo_path is enforced to be an absolute path. Forward-Port-Of: odoo/odoo#40124 Forward-Port-Of: odoo/odoo#40100
Original PR description
When using the flamegraph module from a parent directory of odoo, the dirname method returns a relative path, leading to a traceback. With this commit, the odoo_path is enforced to be an absolute path. Forward-Port-Of: odoo/odoo#40124 Forward-Port-Of: odoo/odoo#40100
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#40128
Original PR description
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#40128
Commit 5fcf891e07bf61518e6bf0be0dc4f27859d45778 introduced optimizations for `name_search` in several models. However, that produces some counter-intuitive searches. In a DB with project and custom data: >>> Project = self.env['project.task'] >>> Project.search([('user_id', 'ilike', 'demo')]).mapped('user_id.name') ['Marc Demo'] >>> Project.search([('user_id', 'not ilike', 'demo')]).mapped('user_id.name') ['Marc Demo'] The projects returned with 'not ilike' ar
Original PR description
Commit 5fcf891e07bf61518e6bf0be0dc4f27859d45778 introduced optimizations for `name_search` in several models. However, that produces some counter-intuitive searches. In a DB with project and custom…
Commit 5fcf891e07bf61518e6bf0be0dc4f27859d45778 introduced optimizations for `name_search` in several models. However, that produces some counter-intuitive searches.
In a DB with project and custom data:
>>> Project = self.env['project.task']
>>> Project.search([('user_id', 'ilike', 'demo')]).mapped('user_id.name')
['Marc Demo']
>>> Project.search([('user_id', 'not ilike', 'demo')]).mapped('user_id.name')
['Marc Demo']
The projects returned with 'not ilike' are a super-set of those returned with 'ilike':
>>> Project.search([('user_id', 'ilike', 'demo')])
project.task(22, 21, 20, 16, 14, 13)
>>> Project.search([('user_id', 'not ilike', 'demo')])
project.task(22, 21, 29, 28, 27, 26, 25, 20, 16, 14, 13, 31, 30)
This commit fix this behaviour by choosing '!=' instead of '=' whenever the operator is a negation operator.
The 'res.users' is more exposed than the other models touched by 5fcf891e07bf61518e6bf0be0dc4f27859d45778, because user may search for 'Created by' in the web client.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#32561The self don't contain 'interface_protocol'. The 'interface_protocol' is in self.dev because we add this in 'supported' function. Forward-Port-Of: odoo/odoo#40118
Original PR description
The self don't contain 'interface_protocol'.
The 'interface_protocol' is in self.dev because we add this in 'supported' function.
Forward-Port-Of: odoo/odoo#40118commit 89f20d2c297d99d4eb0ded8be78fbf86b8ec45d3 removed thumbnail but didn't adapt the views that used it. Adapt the view and directly use the datas and not the thumbnail. Forward-Port-Of: odoo/odoo#39848
Original PR description
commit 89f20d2c297d99d4eb0ded8be78fbf86b8ec45d3 removed thumbnail but didn't adapt the views that used it. Adapt the view and directly use the datas and not the thumbnail. Forward-Port-Of: odoo/odoo#39848
In 12.3 there was a number of changes in source mode. This was reverted before 13.0 and somehow it seems the source mode was lost between the 12.3 editor changes and its revert. With this changeset, we introduce back source mode as it was in 12. opw-2091649 opw-2116960 Forward-Port-Of: odoo/odoo#40026
Original PR description
In 12.3 there was a number of changes in source mode. This was reverted before 13.0 and somehow it seems the source mode was lost between the 12.3 editor changes and its revert. With this changeset, we introduce back source mode as it was in 12. opw-2091649 opw-2116960 Forward-Port-Of: odoo/odoo#40026
Description of the issue/feature this PR addresses: Fixes https://github.com/odoo/odoo/issues/39358 Current behavior before PR: Before this commit Internal user (With no other Rights) cannot perform any activity on Reminder Popup due to missing rights to set calendar_last_notif_ack field. Desired behavior after PR is merged: With this fix, we are now using `sudo` to write calendar_last_notif_ack -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/s
Original PR description
Description of the issue/feature this PR addresses: Fixes https://github.com/odoo/odoo/issues/39358 Current behavior before PR: Before this commit Internal user (With no other Rights) cannot perform any activity on Reminder Popup due to missing rights to set calendar_last_notif_ack field. Desired behavior after PR is merged: With this fix, we are now using `sudo` to write calendar_last_notif_ack -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39407
Reproduce this issue - Install CRM & Sales - Create 2 sales team in CRM settings - Create some invoices and register payments for the 2 teams - Go in CRM > Sales > Team pipelines The invoicing amount is still 0 for both teams. Cause - The `_compute_invoiced` method in `CrmTeam` models use a SQL query to retrieve the invoices lines but it returns an empty recordset because the dates are not right ordered. - The line balance are negatives val
Original PR description
Reproduce this issue
- Install CRM & Sales
- Create 2 sales team in CRM settings
- Create some invoices and register payments for the 2 teams
- Go in CRM > Sales > Team pipelines
The invoicing amount is still 0 for both teams.
Cause
- The `_compute_invoiced` method in `CrmTeam` models use a SQL
query to retrieve the invoices lines but it returns an empty
recordset because the dates are not right ordered.
- The line balance are negatives values, doing a SUM() will always
returns 0
This commit re-order the dates and invert the sign of line.balance.
OPW-2119819
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
Forward-Port-Of: odoo/odoo#40093- fixed some tax report lines by showing correct amounts - corrected account types - set default receivable/payable/advance tax accounts for tax groups - ~~improved tag names~~ (to be done in master) 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 Forward-Port-Of: odoo/odoo#39191
Original PR description
- fixed some tax report lines by showing correct amounts - corrected account types - set default receivable/payable/advance tax accounts for tax groups - ~~improved tag names~~ (to be done in master) 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 Forward-Port-Of: odoo/odoo#39191
A patched method was not unpatched. Which triggered issues in a staging master branch trying to untie a bit mail tests. 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 Forward-Port-Of: odoo/odoo#40046
Original PR description
A patched method was not unpatched. Which triggered issues in a staging master branch trying to untie a bit mail tests. 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 Forward-Port-Of: odoo/odoo#40046
Install stock and sale. Create a sale with 2+ products, save and confirm. Look for the created picking. There will be no source doument, because of cb618e9a99ea3b86fdeed0295168a1e9fd7cddc3 the behavior has changed when there are multiple source document, possibly to avoid displaying the wrong source if they differ. Adding the possibility to display multiple source documents, eventually truncating the list opw-2117886 -- I confirm I have signed the CLA and read the PR guidelin
Original PR description
Install stock and sale. Create a sale with 2+ products, save and confirm. Look for the created picking. There will be no source doument, because of cb618e9a99ea3b86fdeed0295168a1e9fd7cddc3 the behavior has changed when there are multiple source document, possibly to avoid displaying the wrong source if they differ. Adding the possibility to display multiple source documents, eventually truncating the list opw-2117886 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39957 Forward-Port-Of: odoo/odoo#39923
Purpose ======= Steps to reproduce: - Configure a product of type service to create a task on a sales order validation, without configuring a project template - On the SO confirmation, the project is generated without any stages Additional issue: - go to the Kanban view of the Project - filter on something that doesn't give any result - The kanban switches to edit mode, even if there is a task This commit solves both issues. Description of the issue/feature this PR addr
Original PR description
Purpose ======= Steps to reproduce: - Configure a product of type service to create a task on a sales order validation, without configuring a project template - On the SO confirmation, the project is generated without any stages Additional issue: - go to the Kanban view of the Project - filter on something that doesn't give any result - The kanban switches to edit mode, even if there is a task This commit solves both issues. 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 Forward-Port-Of: odoo/odoo#40040
Task : https://www.odoo.com/web#id=2115206&action=327&model=project.task&view_type=form&menu_id=4720 Pad : https://pad.odoo.com/p/r.f4649029dc270a167ee3684eb4e302c2 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#40006
Original PR description
Task : https://www.odoo.com/web#id=2115206&action=327&model=project.task&view_type=form&menu_id=4720 Pad : https://pad.odoo.com/p/r.f4649029dc270a167ee3684eb4e302c2 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#40006
In 13.0, we use the IoTBox which handle https correctly 12.0 was still a transition version but people should have switched in 13.0 Forward-Port-Of: odoo/odoo#39832
Original PR description
In 13.0, we use the IoTBox which handle https correctly 12.0 was still a transition version but people should have switched in 13.0 Forward-Port-Of: odoo/odoo#39832
In case of a multi-record and multi-page (i.e. 2 pages per PDF) report the assertion is triggered b/c we have 4 pages and only two records with a PDF of 2 pages each, so the outline_page needs to be unique before assertion. len([0, 0, 2, 2]) != len([record_id1, record_id2]) len([0, 2]) == len([record_id1, record_id2]) **Description of the issue/feature this PR addresses:** Traceback for exactly this easily to reproduce use case... @nim-odoo @mart-e May I ask you to take a look an
Original PR description
In case of a multi-record and multi-page (i.e. 2 pages per PDF) report the assertion is triggered b/c we have 4 pages and only two records with a PDF of 2 pages each, so the outline_page needs to be unique before assertion. len([0, 0, 2, 2]) != len([record_id1, record_id2]) len([0, 2]) == len([record_id1, record_id2]) **Description of the issue/feature this PR addresses:** Traceback for exactly this easily to reproduce use case... @nim-odoo @mart-e May I ask you to take a look and merge this for me. Always wonder that I am the first one to find these bugs as it is not out of the world I guess to have more than one page per report and trying to print on multi records to get only one report file. Info: @wt-io-it -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39701
Activate Google Synchronization, create on OE a recurrent event, synchronize the calendar, then delete an event of the recursion on GC, sync again on OE. The event will be deleted from GC but not from OE after sync. This appens because of this "rewrite" rule https://github.com/odoo/odoo/blob/12.0/addons/calendar/models/calendar.py#L918 that occur on event creation from OE, altering the event parameters when is marked "allday". When an "allday" event is deleted from GC the unlink is
Original PR description
Activate Google Synchronization, create on OE a recurrent event, synchronize the calendar, then delete an event of the recursion on GC, sync again on OE. The event will be deleted from GC but not…
Activate Google Synchronization, create on OE a recurrent event, synchronize the calendar, then delete an event of the recursion on GC, sync again on OE. The event will be deleted from GC but not from OE after sync. This appens because of this "rewrite" rule https://github.com/odoo/odoo/blob/12.0/addons/calendar/models/calendar.py#L918 that occur on event creation from OE, altering the event parameters when is marked "allday". When an "allday" event is deleted from GC the unlink is triggered in OE with the default time "00:00:00". During the creation of the exclusion ' _inverse_dates' will be called altering start and stop datetime but not recurrent_id_date, so the new record will not match the event generating the recursion and the exclusion will not occur. The problem require particular carefulness because when a recurrent event is fetched from google the '_inverse_dates' is not called, so in that case the default time is fine. opw-2060526 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#39580
- This test was tagged as external, but mocked all server reponses, so it actually did not test we interpreted the result properly. There is already a generic test doing that by calling the webservice directly. - In 12.0, the test crashed because some of its functions were setting a currency on the company, which was not allowed because of the poste entries created by the demo data. - The EUR test was useless, as the first step of the function it calls was to set MXN as main currency. =
Original PR description
- This test was tagged as external, but mocked all server reponses, so it actually did not test we interpreted the result properly. There is already a generic test doing that by calling the webservice directly. - In 12.0, the test crashed because some of its functions were setting a currency on the company, which was not allowed because of the poste entries created by the demo data. - The EUR test was useless, as the first step of the function it calls was to set MXN as main currency. ==> We don't need theses tests, and don't want to keep them. Forward-Port-Of: odoo/enterprise#6637 Forward-Port-Of: odoo/enterprise#6610
A traceback occurred when the function _create_supplier_from_vat returned False. This happens if the VAT number is invalid or couldn't be matched to a company name. The return value is now checked to avoid that. Forward-Port-Of: odoo/enterprise#6635
Original PR description
A traceback occurred when the function _create_supplier_from_vat returned False. This happens if the VAT number is invalid or couldn't be matched to a company name. The return value is now checked to avoid that. Forward-Port-Of: odoo/enterprise#6635
Before this commit: When we validate a picking, then we validate a task (linked to sale order). The validated line of picking are set to 0. After this commit: If the picking line are in state done, we don't update the quantity. id=2115592 Forward-Port-Of: odoo/enterprise#6569
Original PR description
Before this commit: When we validate a picking, then we validate a task (linked to sale order). The validated line of picking are set to 0. After this commit: If the picking line are in state done, we don't update the quantity. id=2115592 Forward-Port-Of: odoo/enterprise#6569
Recently the SAT adds a new validation, to ensure that emission date of a CFDI is correct according to the emission address of a CFDI. Then, now validates that the date is correct based on the ``LugarExpedicion`` attribute on the CFDI. Then, is necessary to allow use the branch address when it is emitted a payment complement (How in the invoice). For this: 1. Was improved the journal view to allow set the branch address. (Before only in sale journals are possible) 2. Send the issue
Original PR description
Recently the SAT adds a new validation, to ensure that emission date of a CFDI is correct according to the emission address of a CFDI. Then, now validates that the date is correct based on the…
Recently the SAT adds a new validation, to ensure that emission date of a CFDI is correct according to the emission address of a CFDI. Then, now validates that the date is correct based on the ``LugarExpedicion`` attribute on the CFDI. Then, is necessary to allow use the branch address when it is emitted a payment complement (How in the invoice). For this: 1. Was improved the journal view to allow set the branch address. (Before only in sale journals are possible) 2. Send the issued address in the CFDI values 3. In the attribute for ``LugarExpedicion`` check if the issued address is set, and get from that the ZIP, else from the company address. This is the same process in the CFDI for invoices. [SAT reference](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/Guia_comple_pagos.pdf) pag 9  Forward-Port-Of: odoo/enterprise#6532 Forward-Port-Of: odoo/enterprise#6416
See commit messages. Manual forward port. Forward-Port-Of: odoo/enterprise#6322
Original PR description
See commit messages. Manual forward port. Forward-Port-Of: odoo/enterprise#6322
- Install `website_helpdesk_livechat` - Create an helpdesk ticket from the chatter with the shortcut `/helpdesk test` It crashes. `team_id` is `False`, leading to the crash. opw-2120171 Forward-Port-Of: odoo/enterprise#6629
Original PR description
- Install `website_helpdesk_livechat` - Create an helpdesk ticket from the chatter with the shortcut `/helpdesk test` It crashes. `team_id` is `False`, leading to the crash. opw-2120171 Forward-Port-Of: odoo/enterprise#6629