Daily updates from Odoo
Friday, November 29, 2019
8 changes · master
Resolved issues and error corrections
This change rolls back a recent update to out-of-office messages because it caused test failures and did not fully handle date and timezone scenarios. The previous behavior is restored for now while a more reliable fix is prepared later.
Original PR description
This reverts commit 802817c92586f87ef6dd431011d8a9615eb4df8c. The new test was crashing when current weekday is Friday. This is easy to fix, but some other considerations are missing in the original commit, like taking into account timezones. We will add a proper fix later, and revert now in the meantime.
This fix prevents task creation from failing when users use the kanban quick-create window without selecting a project first. It improves reliability for teams creating tasks quickly and avoids an avoidable interruption in the workflow.
Original PR description
Task creation was crashing when there was no project selected in the kanban's quickcreate window. TaskID: 2146564 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
Timesheet entry fields now keep the correct company-related filters instead of having them overwritten by automatic field changes. This helps users see and select the right projects or analytic accounts for their company, reducing incorrect entries.
Original PR description
Fixes a bug where `('company_id', '=', company_id)` would pretty much immediately get replaced by the domains from the onchange, so was essentially useless. The conditional could be replicated in two…
Fixes a bug where `('company_id', '=', company_id)` would pretty much immediately get replaced by the domains from the onchange, so was essentially useless.
The conditional could be replicated in two ways: one would be to use a python-level conditional expression:
a if cond else b
this is easier for users to interpret, but harder to analyze: python expressions are currently opaque to view analysis (and probably the eventual domain edition).
The alternative here is to leverage domain simplification:
(OR (= (not cond) 1) section)
if `cond` is true becomes
(OR (= 0 1) section)
and thus `section` itself, while if `cond` is false it becomes
(OR (= 1 1) section)
and thus `true` (so the section doesn't apply).
It works OK though the inversion of the condition itself is a bit bizarre.
And in this specific case since we need both branches the negated condition requires explicitly converting the condition to a boolean if it might not be one: the expression compiler recognizes specifically `(= 0 1)` and `(= 1 1)` (`(= False 1)` and `(= True 1)` also work for Python reasons).
Task 2115472
Also the fix on analytic_account_id is the sort of reasons why we'd want the ability to *edit* domans rather than just replace them.Gamification goal setup now uses simpler field filtering rules by removing unnecessary dynamic checks. This makes the configuration screen slightly more reliable and efficient without changing what business users can do.
Original PR description
The check on `(= model_id False)` seems to have precious little value: model_id is required on ir.model.fields, so `(OR (= model_id False) (in model_id []))` is slightly less efficient (as it needs to be looked up rather than shortcut) but given it's only a possible concern when specifically defining a gamification goal that seems... irrelevant. Task 2115472
The documentation was corrected to remove guidance about an older company-switching option that is no longer supported in the current version. This helps readers follow the right approach and avoid using outdated instructions.
Original PR description
New multi-company guidelines for 13.0 documentation explain the use of force_company. This is still valid in 13.0, but removed in 13.1 and replaced by the with_company mechanism. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes missing or broken icons in the website editor that appeared after a supporting library was updated. Users creating or editing website content should once again see the expected editor controls, reducing confusion during page editing.
Original PR description
Commit https://github.com/odoo/odoo/commit/ff1c35513aecef5fbc30f7c2f3834450e719714e broke some editor icons.
Calendar entries now keep their start and end times separate when events are edited, preventing incorrect end times from appearing. This also avoids related crashes in Planning, improving reliability for users who manage schedules.
Original PR description
Fixes the way record end hours are computed in calendar views. Before this commit: objects `record start` and `record end` properties being copied by reference and being incorrectly rewritten by other functions. This caused incorrect end hour computations (and a SQL crash in the Planning app). Now, objects are copied by value and don't interfere with each other. Task 2072961
The Analytic Report now initializes its hierarchy setting in the way this report requires, rather than relying on logic used by other accounting reports. This helps ensure users see the expected drill-down structure when reviewing analytic reporting data.
Original PR description
Following https://github.com/odoo/enterprise/commit/1789db58dc3fef6358bf2465cfd9ca120bbd6120 The hierarchy on the Analytic Report doesn't depend on account.group, unlike the other reports. This means we have to initialize the option another way.