Daily updates from Odoo
Monday, January 15, 2024
8 changes · master
Enhancements to existing features
Appointment visibility rules were tightened so internal users only see appointment types and slots they are allowed to access, while appointment users can read all published appointment types. This reduces accidental over-access and makes appointment listings rely on consistent permission checks.
Original PR description
Purpose ======= Improve the appointment types and slots access rules as the internal users had, by default, higher access than the appointment users. Specifications ============== Create an access…
Purpose ======= Improve the appointment types and slots access rules as the internal users had, by default, higher access than the appointment users. Specifications ============== Create an access rule to restrict the internal user access to only have read access on the: - published appointment types - resource based appointment types - user based appointment types, if there is no staff user or if the user is in the staff users. The same logic is applied for the appointment slot. The appointment users now have read access on every published appointment types. Cleaning the fetching of the appointment types by the "_fetch_and_check_private_appointment_types" method to make use of the ACLs. Cleaning the "_prepare_appointments_cards_data" method in website_appointment to avoid filtering the data twice (indeed most of the filtering is already done by the "_fetch_and_check_private_appointment_types" method). In the appointment_hr module, due to the new rule, the staff_user_bxls internal user no longer had read access to the test_apt_type. Setting the 'is_published' to True for the user to have a read access. This generates a few more queries when calling _get_appointment_slots() with this appointment type. Task-3544915 Co-authored-by: amdi-odoo <amdi@odoo.com> Co-authored-by: jeh-odoo <jeh@odoo.com>
Planning views now show only shifts and projects relevant to the active company, reducing cross-company clutter and potential confusion. Material resources are easier to understand because their default role appears beside the material name, and the public wizard has a cleaner resource display without the tooltip.
Original PR description
Before this commit: - tooltip was there for resource in public wizard - in shift template project_id field was company dependent - all shifts and projects were visible for all companies - in progress bar default role was not visible next to material name IMP After this commit: - Removed the tooltip for resource within the wizard. - In the shift template made the 'project_id' field independent of the company - Only shifts and projects with either no associated company or same company are visible within that particular company. - The progress bar will now display the default role for materials next to the material name in muted. task- 3459979
Employees can now request time off even when the related leave has already been paid. This removes an unnecessary restriction because payroll officers will handle any leaves marked to defer during their normal payroll process.
Original PR description
Since the payroll officer will need to resolve all 'to defer' leaves, there is no point anymore to keep the restriction. task-3599267
The shop floor app now makes manufacturing priorities and worker assignments easier to see, and lets users open related manufacturing orders from work orders. This helps production teams quickly identify urgent work, know who is assigned, and navigate more efficiently.
Original PR description
This pr is a back to basics and has several points that are detailed in the task and the commits. odoo: https://github.com/odoo/odoo/pull/145267 task-id: 3624567
Odoo Studio now lets users control whether 'View' buttons appear in editable list views. This makes it easier to configure list behavior directly in Studio when records can be edited from the top or bottom of the list.
Original PR description
This commit adds the open_form_view attribute support in the sidebar of the List editor. The option is only visible when edition is enabled on the view (top or bottom). A test has also been added to the list view tests. task-3605574
Mexican electronic invoicing for Point of Sale now follows the updated refund flow where each refund is tied to a single original order. This improves invoice consistency and reduces errors when issuing refunds and global invoices.
Original PR description
In the corresponding community pr we adapt pos such that only items from 1 order can be refunded in any one order. In this commit we adapt the l10n_mx_edi_pos module acordingly. https://github.com/odoo/odoo/pull/125780 Task: 3376828
The Field Service task planning view now shows only the current user when viewing “my tasks” in Gantt mode. This removes unnecessary rows for other users, making scheduling simpler and easier to read.
Original PR description
In the tasks gantt view of the field service app, there is a line for every registered user in the DB, because the _group_expand_user_ids method selects every user in the DB. What we want now is to have a single line for the current user. The _group_expand_user_ids was edited so that only the current user is returned if the tasks gantt view is in FSM mode and that the search mode is "my tasks" only. task-3621032
Appointment availability slots are now automatically updated when eligible staff members or resources change. This avoids blocking configuration changes and helps keep booking options consistent for customers and schedulers.
Original PR description
Before, there was a constraint raising when changing staff_users on an appointment_type if the ones restricted to slots were not in staff_users anymore. Instead of raising, and in order to have a similar behavior for resources, when changing a staff_user or a resource, synchronize the slots to match that user / resource domain. The fields of restricted users / resources fields are made into computed stored fields depending on the appointment values. A test is added to ensure this behavior. Task-3549573