Daily updates from Odoo
Wednesday, January 30, 2019
4 changes · master
Enhancements to existing features
Stock quantity views no longer force a fixed grouping on users. The grouping is still suggested by default, but users can now change it to match how they want to review inventory information.
Original PR description
Task: 1910855 Task:https://www.odoo.com/web#id=1910855&action=333&active_id=131&model=project.task&view_type=form&menu_id=4720 Pad:https://pad.odoo.com/p/r.5328c068b66fdd16a9f4d89c8bcdd8a8 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change lets companies mark calendar-wide bank holidays and automatically create matching employee time off entries for staff on that calendar. It also keeps future holiday entries aligned when employees are created or moved to a different working calendar, reducing manual HR administration.
Original PR description
1/ Add a boolean 'generate_hr_leaves' field on the resource.calendar.leaves. Add a button under global leaves tab. When clicking on the button, generate hr.leaves for all the employees under this calendar. 2/ If the global leave is set to generate hr.leaves, then on the create method for an employee, create the hr.leave if the global leave is planned in the future. 3/ If the calendar is changed on an employee (on the write method), unlink the hr.leaves (into the future) and regenerate them for the new calendar. 4/ rename "Global Leaves" into "Bank Holidays" in resource.calendar 5/ add a field date (date_from and date_to are computed from this new field), because a Bank holidays must be one day id=48672 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Required relationship fields will now default to blocking deletion instead of trying to leave an empty value, which avoids inconsistent data rules. If a required relationship is explicitly configured to be cleared on deletion, the system will reject that setup early so issues are caught during setup rather than later in use.
Original PR description
A many2one field that is required means that its column cannot contain null values, however the default ondelete policy for all m2o fields is `set null`, which contradicts `required=True`. This patch will, by default, apply the `restrict` policy to required m2o fields unless the ondelete attribute is explicitly specified. However, if the policy specified is `set null`, a ValueError will be raised whenever the registry registers the field as this makes no sense. The default ondelete policy remains unchanged for non-required m2o fields (set null)
The dashboard app has been adjusted to work better on mobile devices with a simpler single-column layout and less clutter. Pivot tables also use tighter spacing, making dashboard information easier to read and navigate on smaller screens.
Original PR description
Improve mobile UI for dashboard app: - Improve pivot integration - Hide change layout button - Force one column view layout Task ID: 1904747