Monday, May 4, 2020
24 changes · master
Enhancements to existing features
This update simplifies the main control panel by keeping search filters visible, removing extra dropdown indicators, and moving import into the favorites menu. It also adjusts export visibility so users only see it when no records are selected, reducing clutter and making actions clearer.
Original PR description
PURPOSE 1) show export button only when no records are selected. 2) remove advanced search option from controlpanel searchbar. 3) remove dropdown caret from controlpanel and change the icon of action buttons 4) remove import button and add it in favorites dropdown. SPECIFICATIONS 1) export button should only show when no records are selected. 2) searchbar should only show normal search icon. And filters, groupbys should always show. 3) dropdown icon should be removed from filters, groupbys, etc.., and change the icon of action buttons 4) import button should be removed and add it in to the favorites dropdown. LINKS PR https://github.com/odoo/odoo/pull/49793 Task 2234547 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update lets Odoo create purchase order lines, sales order lines, and CRM leads in batches across related apps. This improves consistency between modules and can make high-volume operations smoother and more efficient.
Original PR description
Ensure main Odoo models supports batch record creation. * `purchase.order.line` supports multi creation in `purchase`, but not anymore when `purchase_stock` is installed. * `sale.order.line` supports multi creation in `sale`, but not anymore when `sale_purchase` is installed. * `crm.lead` doesn't support batch creation atm, but it doesn't cost anything to support it. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The control panel search area has been simplified by removing the advanced search option from the sample interface and hiding dropdown carets on search menus. This makes filters, grouping, and favorites feel cleaner and more consistent, with added mobile coverage for the import action in favorites.
Original PR description
PURPOSE 1) remove advanced search option from controlpanel searchbar sample UI. 2) remove dropdown caret from controlpanel sample UI. SPECIFICATIONS 1) removed advanced search option from sample UI. 2) dropdown icon removed from sample filter, groupby and favorite etc.. 3) added a mobile testcase for import button in favorite dropdown. LINKS PR https://github.com/odoo/enterprise/pull/10059 Task 2234547
Resolved issues and error corrections
This fix stops users from saving an action configuration that lists the same view type more than once. It prevents a web client crash that could make the interface unusable when opening affected Inventory transfer screens.
Original PR description
Description of the issue/feature this PR addresses: * connect to runbot with debug mode enabled * go to Inventory -> Operations -> Transfers * using the debug mode, edit the action and set the view mode to "tree,kanban,calendar,tree" * go back to the main menu, press Ctrl-F5 to force reload * go to Inventory -> Operations -> Transfers Current behavior before PR: You get a crash and the web client becomes unusable (can't click anywhere) Desired behavior after PR is merged: It is not possible to save the action with twice "tree" in view_mode. This is reported as OPW 2241415 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
This happens far too often (daily quota exceded, event already deleted (?)). This is a big source of support tickets. The sync will be retried next time. Task 2169121 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#49401
Original PR description
This happens far too often (daily quota exceded, event already deleted (?)). This is a big source of support tickets. The sync will be retried next time. Task 2169121 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#49401
Fixed an issue where interface views loaded from files in developer XML mode could appear untranslated. This keeps the user experience consistent across normal and developer modes, while avoiding accidental storage of translated view definitions.
Original PR description
When computing the `arch` from the arch_db, the field gets translated as a matter of course as `arch_db` is a stored field with a translation method. This means `arch` is assumed to be in the proper…
When computing the `arch` from the arch_db, the field gets translated as a matter of course as `arch_db` is a stored field with a translation method. This means `arch` is assumed to be in the proper language in the cache. However when reading from the filesystem this is not the case, and the view XML ends up untranslated:  (left is without dev=xml, right is with) Fix the issue by applying the translation function from arch_db onto the stuff we got from the filesystem. Note: under the assumption that we *do not* want to store translated archs in arch_db, explicitly set the lang to None when resetting views. For `_compute_arch_diff` however I left it in place, such that the diff is in whatever language the user has selected as other `arch` fields are accessed directly. That aside, I don't know how well the view reset thing deals with not being in the default language as arch_prev and friend don't really seem to take language into account. Second half of task 2059557
This fixes an error that could occur when creating invoices for Chinese companies without entering a Fapiao number. Businesses using China localization can now save invoices more reliably when that optional field is left blank.
Original PR description
Steps
1) install l10n_cn
2) create a company in china
3) create invoice and no set Fapiao NumberCurrently, the menu are only translated for installed language when we create a new website. When we create a new menu (eg. by installing a module) or install a new language we will only translate menu without website_id set, so the menu are not translated. With this changeset, we try to match translation of menu without website_id to menu with website_id when translations are updated: - when a language is installed/updated - when a module is installed/updated opw-2209864 Forward-Port-Of: o
Original PR description
Currently, the menu are only translated for installed language when we create a new website. When we create a new menu (eg. by installing a module) or install a new language we will only translate menu without website_id set, so the menu are not translated. With this changeset, we try to match translation of menu without website_id to menu with website_id when translations are updated: - when a language is installed/updated - when a module is installed/updated opw-2209864 Forward-Port-Of: odoo/odoo#50477 Forward-Port-Of: odoo/odoo#48031
_onchange_product_id() used to always (re)set hr_expense analytic_account_id & analytic_tag_ids to default values. Or set those to false if no default values are found. Installing account_analytic_default_hr_expense made odoo/addons/hr_expense/tests/test_expenses.py tests fail - changed function name (no need to be a _onchange_product_id override) - removed super() & return - only set default value to var if var is False Task: 2205544 Forward-Port-Of: odoo/odoo#46449
Original PR description
_onchange_product_id() used to always (re)set hr_expense analytic_account_id & analytic_tag_ids to default values. Or set those to false if no default values are found. Installing account_analytic_default_hr_expense made odoo/addons/hr_expense/tests/test_expenses.py tests fail - changed function name (no need to be a _onchange_product_id override) - removed super() & return - only set default value to var if var is False Task: 2205544 Forward-Port-Of: odoo/odoo#46449
The error will raise if the origin bill is in the format of the image. The problem can be fixed by using another BytesIO object as the output 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#50416 Forward-Port-Of: odoo/odoo#50313
Original PR description
The error will raise if the origin bill is in the format of the image. The problem can be fixed by using another BytesIO object as the output 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#50416 Forward-Port-Of: odoo/odoo#50313
### Issue - Install CRM - CRM > Reports > Activities - Add a custom filter > Created on - Select the date You can't, the date picker is not shown ### Cause Actually, the date picker is shown but very quickly and it is closed by a scroll event thrown by Chart.js. ### Solution Close the date picker only if the user scrolls manually. **OPW-2245019** -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo
Original PR description
### Issue - Install CRM - CRM > Reports > Activities - Add a custom filter > Created on - Select the date You can't, the date picker is not shown ### Cause Actually, the date picker is shown but very quickly and it is closed by a scroll event thrown by Chart.js. ### Solution Close the date picker only if the user scrolls manually. **OPW-2245019** -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#50434
An attribute 'disable_counters' on fields of the search panel is supported in case performance issues would be encountered with counters. The commit dd7022eccd99b5ba9688f63b517d23c405f23797 allowing to use the search panel in other views than the kanban views has also introduced the search panel arch validation and the attribute 'disable_counters' was forgotten, so that it was impossible to use it in practice. With the present commit, 'disable_counters' is now recognized as a valide attr
Original PR description
An attribute 'disable_counters' on fields of the search panel is supported in case performance issues would be encountered with counters. The commit dd7022eccd99b5ba9688f63b517d23c405f23797 allowing to use the search panel in other views than the kanban views has also introduced the search panel arch validation and the attribute 'disable_counters' was forgotten, so that it was impossible to use it in practice. With the present commit, 'disable_counters' is now recognized as a valide attribute. 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#50525
Forward-Port-Of: odoo/odoo#50535
Original PR description
Forward-Port-Of: odoo/odoo#50535
Forward-Port-Of: odoo/odoo#50217 Forward-Port-Of: odoo/odoo#50059
Original PR description
Forward-Port-Of: odoo/odoo#50217 Forward-Port-Of: odoo/odoo#50059
Side effect of commit 6d7bbd3074e6b3771b582bf544624cef59e1c6a3. In case we are coming from public route /shop/address, we are in superuser mode and method _get_default_team_id can return a sales team from another company. We should force the domain to avoid creating inconsistent records. Description of the issue/feature this PR addresses: opw-2246026 Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guideline
Original PR description
Side effect of commit 6d7bbd3074e6b3771b582bf544624cef59e1c6a3. In case we are coming from public route /shop/address, we are in superuser mode and method _get_default_team_id can return a sales team from another company. We should force the domain to avoid creating inconsistent records. Description of the issue/feature this PR addresses: opw-2246026 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#50503
In some situations it is important to protect the Odoo service from direct access from the internet, or to protect internal network resources from the Odoo server itself. This is heavily dependent on deployment requirements, and for standard installations on a public cloud system, this may not be necessary. Yet it seems useful to mention it in the deployment recommendations, as it may not be obvious to our users. Our thanks to Ameya Darshan for raising this concern! Forward-Port-Of: odoo/
Original PR description
In some situations it is important to protect the Odoo service from direct access from the internet, or to protect internal network resources from the Odoo server itself. This is heavily dependent on deployment requirements, and for standard installations on a public cloud system, this may not be necessary. Yet it seems useful to mention it in the deployment recommendations, as it may not be obvious to our users. Our thanks to Ameya Darshan for raising this concern! Forward-Port-Of: odoo/odoo#50417
Create a service product [DEMO] with service tracking 'Create a task in a new project' Create a sale order SO1 with User 1 with [DEMO] product Create a sale order SO2 with User 2 with [DEMO] product SO1 will create a task in a project, edit this task and assign as parent task the one created by SO2 The action will be blocked by security rules, because user 1 cannnot see the sale order data of user 2 but the action should be allowed. Fixing the error with a sudo call opw-2243370
Original PR description
Create a service product [DEMO] with service tracking 'Create a task in a new project' Create a sale order SO1 with User 1 with [DEMO] product Create a sale order SO2 with User 2 with [DEMO] product SO1 will create a task in a project, edit this task and assign as parent task the one created by SO2 The action will be blocked by security rules, because user 1 cannnot see the sale order data of user 2 but the action should be allowed. Fixing the error with a sudo call opw-2243370 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#50487
Description of the issue/feature this PR addresses: Action name is not translatable Current behavior before PR: action = { 'name': 'Translate', Desired behavior after PR is merged: action = { 'name': _('Translate'), Closes https://github.com/odoo/odoo/issues/50373 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#50553
Original PR description
Description of the issue/feature this PR addresses:
Action name is not translatable
Current behavior before PR:
action = {
'name': 'Translate',
Desired behavior after PR is merged:
action = {
'name': _('Translate'),
Closes https://github.com/odoo/odoo/issues/50373
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#50553Use `warnings.warn` to log a warning entry on usage of deprecated import hook instead of `logging.warning`. The `warnings` can be more easily configured to show/hide class of warnings or to limit warning emission, plus it is possible to log a single stack entry whereas logging can just log the entire call stack. Task: 2234749 Forward-Port-Of: odoo/odoo#49588 Forward-Port-Of: odoo/odoo#49575
Original PR description
Use `warnings.warn` to log a warning entry on usage of deprecated import hook instead of `logging.warning`. The `warnings` can be more easily configured to show/hide class of warnings or to limit warning emission, plus it is possible to log a single stack entry whereas logging can just log the entire call stack. Task: 2234749 Forward-Port-Of: odoo/odoo#49588 Forward-Port-Of: odoo/odoo#49575
Before this commit, for an incoming call, only the phone number was shown, even if the contact is registered as a contact. The phone number used to search the contact, has the standard USA formatting domestic numbers convention '1 (are code) extension', without international call prefix. The numbers in the contact uses '+' as international call prefix. For example: 12686152726 call and a contact using this phone number is searched instead of +12686152726 (which is the value stored in th
Original PR description
Before this commit, for an incoming call, only the phone number was shown, even if the contact is registered as a contact. The phone number used to search the contact, has the standard USA formatting domestic numbers convention '1 (are code) extension', without international call prefix. The numbers in the contact uses '+' as international call prefix. For example: 12686152726 call and a contact using this phone number is searched instead of +12686152726 (which is the value stored in the db). Fine-tunning of aabdb279e24be696bcd48d3b79703bdfb2c6c56f opw-2244047 Forward-Port-Of: odoo/enterprise#10348
- Install `documents_sign` - Set the access rights of the Demo user to 'Documents > User' and 'Sign > User: Own and Shared Templates' - Connect as Demo - Upload a PDF file - Choose 'Create signature template(s)' An `AccessError` is raised. The following record rules are applied: https://github.com/odoo/enterprise/blob/5b3624540eeadf5fcd19d79f8f3c8bfcfdcf854c/sign/security/security.xml#L22-L36 Since the default `privacy` is `invite` and no `favorited_ids` is set, the user does
Original PR description
- Install `documents_sign` - Set the access rights of the Demo user to 'Documents > User' and 'Sign > User: Own and Shared Templates' - Connect as Demo - Upload a PDF file - Choose 'Create signature template(s)' An `AccessError` is raised. The following record rules are applied: https://github.com/odoo/enterprise/blob/5b3624540eeadf5fcd19d79f8f3c8bfcfdcf854c/sign/security/security.xml#L22-L36 Since the default `privacy` is `invite` and no `favorited_ids` is set, the user doesn't have access to the record he is creating. We set the `favorited_ids` if the `documents_sign` and also add the default value for the field to prevent further issues. opw-2240423 Forward-Port-Of: odoo/enterprise#10311
This commit translate the mails sent through the sign app in the receiver language. It includes sign request + followers and sign done + followers. I added some lines in _message_send_mail in order to translate the complete layout and not only the body. Forward-Port-Of: odoo/enterprise#10340 Forward-Port-Of: odoo/enterprise#9909
Original PR description
This commit translate the mails sent through the sign app in the receiver language. It includes sign request + followers and sign done + followers. I added some lines in _message_send_mail in order to translate the complete layout and not only the body. Forward-Port-Of: odoo/enterprise#10340 Forward-Port-Of: odoo/enterprise#9909
https://github.com/odoo/enterprise/commit/f47bb368e804652174787d9ced7a854089faed01 changed the computation of gross profit to have it become income - cost of revenue, so other income + operating income - cost of revenue. It also changed net profit so that it gets computed as gross profit - expenses. https://github.com/odoo/enterprise/pull/8294/commits/b837ac64d9c56cc931438421e32ec6bba9b04ef9 reverted the way gross profit is computed (it is now operating income - cost of revenue again) and now
Original PR description
https://github.com/odoo/enterprise/commit/f47bb368e804652174787d9ced7a854089faed01 changed the computation of gross profit to have it become income - cost of revenue, so other income + operating income - cost of revenue. It also changed net profit so that it gets computed as gross profit - expenses. https://github.com/odoo/enterprise/pull/8294/commits/b837ac64d9c56cc931438421e32ec6bba9b04ef9 reverted the way gross profit is computed (it is now operating income - cost of revenue again) and now computes income as gross profit + other income. Yet, it did not change the way net profit is computed ; so net profit does not take other income into account, which is wrong (and leads to an unbalanced balance sheet). opw 2236522 Forward-Port-Of: odoo/enterprise#10279 Forward-Port-Of: odoo/enterprise#10276
When we set an ir.config.parameter, the cache is invalidated. Checking the value of the parameter before changing it helps reduce the number of invalidations. Forward-Port-Of: odoo/enterprise#10205
Original PR description
When we set an ir.config.parameter, the cache is invalidated. Checking the value of the parameter before changing it helps reduce the number of invalidations. Forward-Port-Of: odoo/enterprise#10205