Friday, January 24, 2020
26 changes · master
Enhancements to existing features
The sales stock availability popover was reorganized so similar information popups can be created more easily in the future. This is mainly an internal improvement that keeps the current quantity-at-date behavior while making future enhancements faster and more consistent.
Original PR description
Purpose ======= Use an abstract class for the popover widget, so we can create later others similar widgets. How === The child widget inherit from "PopoverAbstract", and can add some attributes - icon: icon displayed in the button - title: title of the popover - trigger: how the popover is triggered - color: class used as color for the button - popoverTemplate: name of the template used for the popover content - hide: if true, the button is invisible - placement: where the popover will spawn Trick ===== The method ``_willRender`` is call before rendering the widget. If you want to implement some logic behind the color, icon, etc... It's the method you search. e.g.: In ``qty_at_date_widget``, the color depends on the ``virtual_available_at_date``. We cannot do that in the ``init`` method, because in the ``one2many`` widget, the widget is created, and then we can change the record... Task #2153126
The company switcher menu now limits long company names and shortens overflowing text with an ellipsis. This helps keep the top menu tidy and usable on smaller screens or when extra debug information is visible.
Original PR description
purpose There is no max width on the company name of the 'switch company menu' of the systray (o_switch_company_menu). On smaller screens, and when in debug mode, it quickly either linebreaks the systray of crops the menu items. task-1985500 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
Resolved issues and error corrections
Clicking a boolean toggle in a list will no longer dim the entire row when the value is turned off. This keeps row styling consistent and prevents custom list highlights from being overwritten.
Original PR description
Task:https://www.odoo.com/web#id=2179066&action=333&active_id=1251&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.86ee306b0608309862cf02f31cb8c1bb -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Bug in ace-editor is present since that we update in 1.3.1. Because diff between 1.3.2 and 1.3.1 is big (-1288 +4661) with new feature... We prefer just patch the library in stable branch applying part of commit: https://github.com/ajaxorg/ace/commit/1890598a5da2259cfb0ceac38fed7bca582765db To do in master? : upgrade ace.js How to reproduce: > create ir.ui.view > be sure to empty all the content > type '<xpath expr=""' > Now if you type the > it will crash - Can
Original PR description
Bug in ace-editor is present since that we update in 1.3.1.
Because diff between 1.3.2 and 1.3.1 is big (-1288 +4661) with new feature...
We prefer just patch the library in stable branch applying part of commit:
https://github.com/ajaxorg/ace/commit/1890598a5da2259cfb0ceac38fed7bca582765db
To do in master? : upgrade ace.js
How to reproduce:
> create ir.ui.view
> be sure to empty all the content
> type '<xpath expr=""'
> Now if you type the > it will crash
- Cannot read property 'type' of null
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#43927The mail chatter now avoids showing the “show older messages” link when there are no older messages to load. This prevents users from clicking a link that does nothing and ensures all relevant messages are loaded after ticket creation.
Original PR description
Description of the issue/feature this PR addresses: the 'show older messages' button is displayed even though there are no older messages as a result, nothing happens when clicking on it Current behavior before PR: after creating a ticket from the 'convert to ticket' button, it shows 'show older messages' link in the chatter. But nothing happens when clicking on it. It loads the messages only after reloading the page (even if 'show older..' link clicked or not) Desired behavior after PR is merged: It will not show the 'show older messages' link. It will load all the messages after the ticket creation. Task: https://www.odoo.com/web#id=2168287&action=327&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.2b9623d7f102a106de0598303b9743a4 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Before this commit executing m2m commands in batch would lead to undesired results, such as duplicating the related records on every subsequent record of the batch. Indeed since [1] the `create` and `unlink` are called in a loop, but their content was not reset at each iteration. [1] 9920f20e4c7753bc17bea71dea3a90f7de687196 Forward-Port-Of: odoo/odoo#43795
Original PR description
Before this commit executing m2m commands in batch would lead to undesired results, such as duplicating the related records on every subsequent record of the batch. Indeed since [1] the `create` and `unlink` are called in a loop, but their content was not reset at each iteration. [1] 9920f20e4c7753bc17bea71dea3a90f7de687196 Forward-Port-Of: odoo/odoo#43795
### Description of the issue/feature this PR addresses: These documents where not usable: Liquidaciones A (63) and Liquidaciones B (64): 1. They where active `False` 2. They do not have `doc_code_prefix` which actually is making that when we create an invoice/vendor bill of these document types do not save properly the sequence of the document. ### Current behavior before PR:  and Liquidaciones B (64): 1. They where active `False` 2. They do not have `doc_code_prefix` which actually is making that when we create an invoice/vendor bill of these document types do not save properly the sequence of the document. ### 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#43799
The tour had been fixed for running headless, however that was only checked in enterprise, and community turns out to have a more complex loading sequence, and thus higher likelihood of dangling request: when logging in, on enterprise the user lands on the applications screen which performs no further RPC. On community however the homepage triggers the Chatter action which can take some time to load after we already see the user menu. Add a community-only step which waits for chatter to
Original PR description
The tour had been fixed for running headless, however that was only checked in enterprise, and community turns out to have a more complex loading sequence, and thus higher likelihood of dangling request: when logging in, on enterprise the user lands on the applications screen which performs no further RPC. On community however the homepage triggers the Chatter action which can take some time to load after we already see the user menu. Add a community-only step which waits for chatter to load. Forward-Port-Of: odoo/odoo#43890
If the oldest problematic layer cannot be fixed, no need to try to fix later one. Forward-Port-Of: odoo/odoo#43855
Original PR description
If the oldest problematic layer cannot be fixed, no need to try to fix later one. Forward-Port-Of: odoo/odoo#43855
Pedals plugged in the IoT Box were not sending any data to the connected Odoo DB. The name of the device couldn't be retrieved, and the pedals were given the default name "Unknown keyboard or scanner". Since this default name included "scanner", the device was recognized as a barcode scanner and no data was sent until Enter was pressed, which never happened. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged:
Original PR description
Pedals plugged in the IoT Box were not sending any data to the connected Odoo DB. The name of the device couldn't be retrieved, and the pedals were given the default name "Unknown keyboard or scanner". Since this default name included "scanner", the device was recognized as a barcode scanner and no data was sent until Enter was pressed, which never happened. 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#43853
### Description of the issue/feature this PR addresses: When create an invoice for a foreign customer, the document types are not showed and filtered. This is happening because there is not journal defined for exportation operations. Once this one is created all the proper filters for the document types and journals are working ok. This PR add a redirect warning when trying to create an invoice for a foreign partner when we do not have defined the expo sale journal. This also alert the use
Original PR description
### Description of the issue/feature this PR addresses: When create an invoice for a foreign customer, the document types are not showed and filtered. This is happening because there is not journal…
### Description of the issue/feature this PR addresses: When create an invoice for a foreign customer, the document types are not showed and filtered. This is happening because there is not journal defined for exportation operations. Once this one is created all the proper filters for the document types and journals are working ok. This PR add a redirect warning when trying to create an invoice for a foreign partner when we do not have defined the expo sale journal. This also alert the user that is a missing configuration that is affecting to the compute of the available document types. I applied the same for the local/intern case ### Current behavior before PR: 1. Create a sale journal 2. Go to Invoices 3. Select a foreign customer (could be Odoo Inc). 4. No document type information is auto selected and if we try to select one not document type is showed. ### Desired behavior after PR is merged: 1. Create a sale journal 2. Go to Invoices 3. Select a foreign customer (could be Odoo Inc). 4. A raise Redirect warning is showind telling the user that need to configure the proper journal in order to continue. the redirect button leave him in the journals list view. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#41080
### Issue - Install Surveys & Website - Create a survey with a datetime question - Install Spanish lang & set it up on website as the only language - Surveys > Your survey > Test Traceback ### Cause There is a format mismatch because of field_utils.format.datetime but it's needed for timezone offsets. ### Solution Format the field_utils.format.datetime result's into the datetimepicker format. I re-organized this part because it wa
Original PR description
### Issue
- Install Surveys & Website
- Create a survey with a datetime question
- Install Spanish lang & set it up on website as the only language
- Surveys > Your survey > Test
Traceback
### Cause
There is a format mismatch because of field_utils.format.datetime
but it's needed for timezone offsets.
### Solution
Format the field_utils.format.datetime result's into
the datetimepicker format.
I re-organized this part because it was a bit confusing and
it handles error now.
**OPW-2167397**
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#43867
Forward-Port-Of: odoo/odoo#43712Steps to reproduce: - install sales - install a language with rtl support - set the installed language as preferred language for current user - preview any sale order/quotation on the portal Previous behavior: the portal is not showed right to left Current behavior: rtl is working a intended opw-2167151 Forward-Port-Of: odoo/odoo#43722
Original PR description
Steps to reproduce: - install sales - install a language with rtl support - set the installed language as preferred language for current user - preview any sale order/quotation on the portal Previous behavior: the portal is not showed right to left Current behavior: rtl is working a intended opw-2167151 Forward-Port-Of: odoo/odoo#43722
Printed receipts are transformed into images by placing them into a hidden `div`. When trying to print multiple orders, we did not wait correctly between rendering the different receipts. Receipts were then overriding one another while they were being rendered, resulting in errors and missing receipts. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43887
Original PR description
Printed receipts are transformed into images by placing them into a hidden `div`. When trying to print multiple orders, we did not wait correctly between rendering the different receipts. Receipts were then overriding one another while they were being rendered, resulting in errors and missing receipts. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43887
- Create hundreds of SO with a Customer Reference set - Select them all - Click on Action Create Invoices The following error is raised: ``` psycopg2.OperationalError: index row size 5480 exceeds maximum 2712 for index "account_move_line_partner_id_ref_idx" ``` The issue is similar to c545783b95b15f65a9798003b614f75685dc434e, so is the solution. opw-2180139 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merge
Original PR description
- Create hundreds of SO with a Customer Reference set - Select them all - Click on Action Create Invoices The following error is raised: ``` psycopg2.OperationalError: index row size 5480 exceeds maximum 2712 for index "account_move_line_partner_id_ref_idx" ``` The issue is similar to c545783b95b15f65a9798003b614f75685dc434e, so is the solution. opw-2180139 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#43885
- Create a picking type for operation 'Manufacturing Operation' - From the dashboard, click on 'Production Order' The picking type set on the MO is not correct. This is because the current picking type is not used when choosing a default value. We set it in the context to do so. opw-2171977 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 guideli
Original PR description
- Create a picking type for operation 'Manufacturing Operation' - From the dashboard, click on 'Production Order' The picking type set on the MO is not correct. This is because the current picking type is not used when choosing a default value. We set it in the context to do so. opw-2171977 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#43860 Forward-Port-Of: odoo/odoo#43842
…change Steps to reproduce: - install contacts and purchase - go to purchase > configuration > settings > activate "purchase agreements" - go to general settings and activate multi-currency - go to contacts > select a contact > edit > sale & purchase > change the currency - go to purchase > purchase agreements > create - change the agreement to a blanket order > add your modified contact as the vendor Previous behavior: the currency is not updated Current behavior: the currency
Original PR description
…change Steps to reproduce: - install contacts and purchase - go to purchase > configuration > settings > activate "purchase agreements" - go to general settings and activate multi-currency - go to contacts > select a contact > edit > sale & purchase > change the currency - go to purchase > purchase agreements > create - change the agreement to a blanket order > add your modified contact as the vendor Previous behavior: the currency is not updated Current behavior: the currency is updated on vendor change opw-2177431 Forward-Port-Of: odoo/odoo#43851
Forward-Port-Of: odoo/odoo#43773
Original PR description
Forward-Port-Of: odoo/odoo#43773
Description of the issue/feature this PR addresses: Spelling mistake: You cannot change the ratio of this unit of mesure as some Current behavior before PR: Desired behavior after PR is merged: Fixed spelling: You cannot change the ratio of this unit of measure as some -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43441
Original PR description
Description of the issue/feature this PR addresses: Spelling mistake: You cannot change the ratio of this unit of mesure as some Current behavior before PR: Desired behavior after PR is merged: Fixed spelling: You cannot change the ratio of this unit of measure as some -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43441
Improve handling of JS logging in headless runner in order to avoid losing logs and errors e.g. the issue fixed by odoo/odoo#41231 passed because it occurred during module loading, which happens during initial page loading (browser_js > navigate_to > _websocket_wait_event), which ignored logs (and exceptions though here it's a console.error log), and as a result reported no failure (and would simply miss that specific test as well as every test following it). This requires additional mod
Original PR description
Improve handling of JS logging in headless runner in order to avoid losing logs and errors e.g. the issue fixed by odoo/odoo#41231 passed because it occurred during module loading, which happens…
Improve handling of JS logging in headless runner in order to avoid losing logs and errors e.g. the issue fixed by odoo/odoo#41231 passed because it occurred during module loading, which happens during initial page loading (browser_js > navigate_to > _websocket_wait_event), which ignored logs (and exceptions though here it's a console.error log), and as a result reported no failure (and would simply miss that specific test as well as every test following it). This requires additional modifications as we have a fair amount of silent failures (exceptions or logging.error calls) at the moment: - downgrade one error to a warning (which becomes an info at the python level) - cleanup some synthetic / mock errors to better match what comes over RPC (and avoid transient or setup failures) - tours which end in an action, leading to JS code executing during browser cleanup (and blowing up) - if the last step triggers a default (implicit) run, replace by a no-op - fix tours for which that does not work by either modifying the last step or adding an additional check step Forward-Port-Of: odoo/odoo#43567 Forward-Port-Of: odoo/odoo#41334
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43836
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#43836
### Issue - Install Employees & Studio - Configuration > Check Skills Management - Go on an employee form - Remove all data in Experience, Education & Skills - Open Studio - Click in the blank space before Skills - Edit Form View Traceback ### Cause The ORM tries to get the parent fields because the generated datapoint includes them. (45bc7c9) Normally the parent model is the same than the child model but not in studio. ##
Original PR description
### Issue
- Install Employees & Studio
- Configuration > Check Skills Management
- Go on an employee form
- Remove all data in Experience, Education & Skills
- Open Studio
- Click in the blank space before Skills
- Edit Form View
Traceback
### Cause
The ORM tries to get the parent fields because the generated
datapoint includes them. (45bc7c9)
Normally the parent model is the same than the child model
but not in studio.
### Solution
Merging the fields in the datapoint only if the models are the same.
**OPW-2125214**
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#41317Task: https://www.odoo.com/web#id=2029019&action=327&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.293bf9564d12cf3995c4e75211c86459 Forward-Port-Of: odoo/enterprise#6074
Original PR description
Task: https://www.odoo.com/web#id=2029019&action=327&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.293bf9564d12cf3995c4e75211c86459 Forward-Port-Of: odoo/enterprise#6074
- Create a new quotation from field service; - Change the salesperson in the quotation (to send an invitation email). Before this commit, an error was raised. This occurs because in the function that creates the new quotation, the 'draft' value was specified as default for the status field (in the context). This is correct, when creating the sale.order model, but it generates an error when creating the mail.mail model that don't accept 'draft' as value for its status field. Now, the
Original PR description
- Create a new quotation from field service; - Change the salesperson in the quotation (to send an invitation email). Before this commit, an error was raised. This occurs because in the function that creates the new quotation, the 'draft' value was specified as default for the status field (in the context). This is correct, when creating the sale.order model, but it generates an error when creating the mail.mail model that don't accept 'draft' as value for its status field. Now, the 'draft' value for the status field was removed from the context, this doesn't change the behaviour because in the model sale.order the default for the status field is already the 'draft' value. opw-2177751 Forward-Port-Of: odoo/enterprise#7915 Forward-Port-Of: odoo/enterprise#7905
Cf odoo/odoo#41334 Forward-Port-Of: odoo/enterprise#7802 Forward-Port-Of: odoo/enterprise#7771
Original PR description
Cf odoo/odoo#41334 Forward-Port-Of: odoo/enterprise#7802 Forward-Port-Of: odoo/enterprise#7771
Studio test for https://github.com/odoo/odoo/commit/5b7455e61a Forward-Port-Of: odoo/enterprise#7179
Original PR description
Studio test for https://github.com/odoo/odoo/commit/5b7455e61a Forward-Port-Of: odoo/enterprise#7179