Tuesday, July 14, 2020
4 changes · master
Enhancements to existing features
Countries can now define whether a postal code or state is required when validating an address. This helps ensure contact addresses are complete enough for deliveries or mailings, while still allowing simple contact records without a street address.
Original PR description
After this commit, you can specify on a country, if zip or state is required to validate an address. We only check the constrains if the street if filled. We consider valid to have a res.partner located in a country without state on the record, if street is empty. The idea, is that we only need zip/state to send something to the contact, so a record withtout street == a contact, while a record with a street is an address and need to be 'valid' and have all information required to send a letter or a parcel. task-2172788 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
Odoo now makes current date and time values more consistently available when evaluating business rules and screen logic. This helps modules such as Manufacturing show time-sensitive visual indicators more accurately, with minimal user disruption.
Original PR description
This PR handles 2 things: 1) the merging of the `py_utils.context()` into the evaluation context returned by `BasicModel._getEvalContext` to access the same time-related keys, 2) the addition of 2 new keys into the `py_utils.context` (thus transmitted to the basic model): `today` (an alias for the already present `current_date`) and `now` which represents the current date and time value. A first use case in the MRP module has also been applied to benefit from the new `now` key. Task 2269697
Users reviewing appraisal survey statistics can now navigate directly back to the related appraisal. This reduces extra clicks and makes the appraisal review flow smoother for HR teams and managers.
Original PR description
taskId 2285655
Resolved issues and error corrections
This update prevents the page editor from crashing when users drag and drop content on pages without a header. It makes the editing experience more reliable across websites and other editor contexts where a standard page header is not present.
Original PR description
Commit [1] introduced the bug by relying on the fact an element with id=top is in the edited DOM. As the website header can be disabled, this induced a crash as soon as the header was indeed disabled. Also, the editor is not meant to edit the website only so we cannot rely at all on the presence of a #top element. [1]: https://github.com/odoo/odoo/commit/6df67a28c2f113572acd4a3db19ab6b1bd37e7da