Friday, June 19, 2020
16 changes · master
Enhancements to existing features
The date range picker now opens in a better position based on available screen space, so it is less likely to be cut off. It also closes automatically when users scroll, preventing it from appearing detached from the input field.
Original PR description
Task: https://www.odoo.com/web#id=2117229&action=333&active_id=1251&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.1801f084f56387a11a27a1e02832543f -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Helpdesk option is now grouped under the Services section on user forms instead of being placed in a generic area. This makes user access settings easier to find and better aligned with other service-related applications.
Original PR description
Purpose of this task is to improve the helpdesk module by various small improvements. In this commit done the below change: - Move 'Helpdesk' under the 'Services' section on res.users LINKS PR: #52043 Task-Id : 2253481 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
Helpdesk receives several small usability updates that make ticket status, SLA deadlines, and team settings clearer for users. Reporting filters are improved so teams can better distinguish ongoing SLA work from successfully met SLA targets, while related website and timesheet flows are made less disruptive.
Original PR description
Purpose of this task is to improve the helpdesk module by various small improvements. In this commit done the below changes: - Change the module description to: "Track, prioritise and solve customer…
Purpose of this task is to improve the helpdesk module by various small
improvements.
In this commit done the below changes:
- Change the module description to: "Track, prioritise and solve customer
tickets"
- Move 'Helpdesk' under the 'Services' section on res.users
- Remove the 'See SLAs' link on teams kanban cards
- Rename 'x tickets to review' into 'x SLA issues'
- Always display the SLA deadline field on tickets kanban cards + use the
'remaining days' widget
- Force a refresh when the settings of a team are saved
- The dahsboard should stick to the top bar
- Helpdesk team relabelling
- Helpdesk Ticket Analysis report:
- rename the 'sla not failed' filter into 'SLA in Progress'
- add an 'SLA Succeeded' filter that returns tickets that passed the SLA
- Only display the timesheet warning when the project or task are modified, not
when it is set for the first time
- SLA policies: transform the exclude_stage_id field into a many2many and rename
it into 'Exclude Stages' (no change of behavior)
LINKS
PR: #10821
Task Id: 2253481Resolved issues and error corrections
Odoo now correctly creates the needed internal identifiers when shared fields from mixins are first used by a real model. This prevents missing field references in module setups that reuse shared model definitions across modules.
Original PR description
We want to create a XMLID for every first exhibition of a field in a model. That is, we just want one XMLID by field by model and not one XMLID by field by class. Previous implementation was…
We want to create a XMLID for every first exhibition of a field in a model. That is, we just want one XMLID by field by model and not one XMLID by field by class. Previous implementation was determining the "first field exhibition" by making sure the field was created and used as part of the same module. This assumption is invalid when we consider mixins. A mixin is an abstract model that define fields and methods to be included in other models. As it is abstract, it does not exhibits the field by itself. The field will only be exhibited when included in a concrete model via inheritance. When it is included in another module, the XMLID creation is discarded. Take a module M1 that defines a model A, take another module M2 that defines a mixin X with a field X1. In a third module M3, extend A to inherit from X. While M3.A is the first model module to exhibit the field X1, the XMLID creation was discarded because `"M2" != "M3"`. See https://github.com/odoo/odoo/issues/49354#issuecomment-614093767 Task: 2235368 Closes #49354
Miscellaneous changes
This reverts commit c43647f085a7f62c9c81db6553be6a6e402943d0. That change was not tested properly and can cause unforeseen errors because it has far-reaching consequences, modifying the fallback language on all requests. One of the consequences is an alteration of the behavior of the translation function `_()` due to the absence of a default language. For users with no language set, it will now translate False/None values as False/None, rather than the empty string fallback. Code that was
Original PR description
This reverts commit c43647f085a7f62c9c81db6553be6a6e402943d0. That change was not tested properly and can cause unforeseen errors because it has far-reaching consequences, modifying the fallback language on all requests. One of the consequences is an alteration of the behavior of the translation function `_()` due to the absence of a default language. For users with no language set, it will now translate False/None values as False/None, rather than the empty string fallback. Code that was not prepared to deal with those non-str translations will now crash. Besides, 'en_US' is a hardcoded default used in many areas of the code, and we cannot get rid of it like this, especially in a stable series. Cfr #52758 Forward-Port-Of: odoo/odoo#53254
This update fixes cases where Odoo methods could behave incorrectly when processing several records at once. It reduces the risk of errors or inconsistent results in affected workflows, even though most standard usage was unlikely to trigger the issue.
Original PR description
Some methods in Odoo codebase look like they work fine even if self is a recordset of len > 1, when in fact it isn't the case (due to the use of `self.field` when looping on `self`). _NB:_ The majority of those methods are not called with a recordset of len > 1, thus not expected to create real bugs (if you only have basic Odoo modules). -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The PDF document catalog is not a dict but an `IndirectObject` so the get method is not defined, we have to use the `in` keyword instead. This is a follow-up commit of fece5ab1bf2fef043b131f1bd0886f0841116103 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#52792
Original PR description
The PDF document catalog is not a dict but an `IndirectObject` so the get method is not defined, we have to use the `in` keyword instead. This is a follow-up commit of fece5ab1bf2fef043b131f1bd0886f0841116103 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#52792
of https://github.com/odoo/odoo/commit/83b8e2d962a2422876b0ed967ebb97f71625301f Forward-Port-Of: odoo/odoo#53174
Original PR description
of https://github.com/odoo/odoo/commit/83b8e2d962a2422876b0ed967ebb97f71625301f Forward-Port-Of: odoo/odoo#53174
Until Werkzeug 0.14, redirect() would resolve all URLs to absolute paths or even absolute URL, because relative paths were not valid according to the HTTP RFCs (though most browsers supported them). However RFC 7231 allows them, so Werkzeug 0.15 removes this rewrite on URLs, and `redirect('foo/bar')` now redirects *relative to the current URL* instead of the old `/foo/bar`. If `code` is not found, the link tracker loops on the current URL (`/r/{code}`) instead of redirecting to `/` as
Original PR description
Until Werkzeug 0.14, redirect() would resolve all URLs to absolute
paths or even absolute URL, because relative paths were not valid
according to the HTTP RFCs (though most browsers supported them).
However RFC 7231 allows them, so Werkzeug 0.15 removes this rewrite on
URLs, and `redirect('foo/bar')` now redirects *relative to the current
URL* instead of the old `/foo/bar`.
If `code` is not found, the link tracker loops on the current
URL (`/r/{code}`) instead of redirecting to `/` as was intended.
Going through uses of redirect() this seems to be the only problematic
call site left, others either use absolute paths or they use URLs
coming from the outside.
Task 2254691
Forward-Port-Of: odoo/odoo#53315- Create a product with traceability per LOT enabled and a barcode; - Enable the option “Delivery Packages” in the inventory settings; - Go to "Barcode" app; - Scan EAN, the product line will be selected; - Scan a LOT, a unit of quantity is incremented at each time the LOT is scanned; - Put in Pack; - Scan again the same EAN to register the next LOT, the product line will be selected with remaining quantities; - Scan a new LOT number. Before this commit, as the product line will
Original PR description
- Create a product with traceability per LOT enabled and a barcode; - Enable the option “Delivery Packages” in the inventory settings; - Go to "Barcode" app; - Scan EAN, the product line will be selected; - Scan a LOT, a unit of quantity is incremented at each time the LOT is scanned; - Put in Pack; - Scan again the same EAN to register the next LOT, the product line will be selected with remaining quantities; - Scan a new LOT number. Before this commit, as the product line will remain with the old LOT number, when the new LOT number is scanned a new line is created. This line will miss the initial quantity and the quantities added to this new line will not decrement the original line quantity. Now, the old LOT number is clean when the Put in Pack function is called. opw-2270781 Forward-Port-Of: odoo/odoo#53309 Forward-Port-Of: odoo/odoo#53281
### Issue - Install website slides - Create a slide with document url = a youtube video URL with params like ?rel=0 - Check it on the website with debugger The iframe url doesn't have ?rel=0 ### Cause We only take the video ID and pass it to a predefined string. We add light theme params too. ### Solution Split the given url in order to get the params and pass it to the predefined string. **OPW-2275928** -- I confirm I have signed the CLA and read the
Original PR description
### Issue - Install website slides - Create a slide with document url = a youtube video URL with params like ?rel=0 - Check it on the website with debugger The iframe url doesn't have ?rel=0 ### Cause We only take the video ID and pass it to a predefined string. We add light theme params too. ### Solution Split the given url in order to get the params and pass it to the predefined string. **OPW-2275928** -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#53266 Forward-Port-Of: odoo/odoo#53195
Since dd139948f004 when saving oe_structure for the first time, for eg. a `<div class="oe_structure" id="oe_structure_part_1"/>` structure, when edited we will create an inheriting view that fills it. But this inheriting view would contain branding data and "data-note-id" which would make this use case erroneous: - edit page and fill oe_structure => data-note-id="1" saved on view - edit page and add link in other oe_structure => error This happen because the data-note-id refers to t
Original PR description
Since dd139948f004 when saving oe_structure for the first time, for eg. a `<div class="oe_structure" id="oe_structure_part_1"/>` structure, when edited we will create an inheriting view that fills…
Since dd139948f004 when saving oe_structure for the first time, for eg. a `<div class="oe_structure" id="oe_structure_part_1"/>` structure, when edited we will create an inheriting view that fills it. But this inheriting view would contain branding data and "data-note-id" which would make this use case erroneous: - edit page and fill oe_structure => data-note-id="1" saved on view - edit page and add link in other oe_structure => error This happen because the data-note-id refers to the editor of the element currently being edited, since we saved it previously we get two elements with `data-note-id="1"` and the code will just get the first one which in reality could have not been in editing. With this change, we strip the branding data on the parent element. Without the change, added test failed with: AssertionError: `'<div class="oe_structure" data-test="1" id="oe_structure_test" test="2">hello</div>' not found in '<t t-name="dummy"><div class="oe_structure" data-test="1" id="oe_structure_test" data-oe-id="55" test="2">hello</div> </t>' `: saved element attributes are saved excluding branding ones opw-2268836 Forward-Port-Of: odoo/odoo#53321
On ir.property model, do get the field_id using the cached result from ir.model.fields _get_id() method instead of issuing a direct SQL query OPW-2067461 Forward-Port-Of: odoo/odoo#53300 Forward-Port-Of: odoo/odoo#41694
Original PR description
On ir.property model, do get the field_id using the cached result from ir.model.fields _get_id() method instead of issuing a direct SQL query OPW-2067461 Forward-Port-Of: odoo/odoo#53300 Forward-Port-Of: odoo/odoo#41694
For invoice_reference_model field with selection add a property in account.journal set ondelete policy that implements the proper cleanup of the corresponding records upon module uninstallation In model account.move type field rename to move_type -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#53313
Original PR description
For invoice_reference_model field with selection add a property in account.journal set ondelete policy that implements the proper cleanup of the corresponding records upon module uninstallation In model account.move type field rename to move_type -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#53313
Forward-Port-Of: odoo/enterprise#11302
Original PR description
Forward-Port-Of: odoo/enterprise#11302
* simplify error hint when the certificate is not authorized for webservice * add more hint messages Forward-Port-Of: odoo/enterprise#11278 Forward-Port-Of: odoo/enterprise#10628
Original PR description
* simplify error hint when the certificate is not authorized for webservice * add more hint messages Forward-Port-Of: odoo/enterprise#11278 Forward-Port-Of: odoo/enterprise#10628