計劃¶
Odoo Planning allows you to plan your team’s schedule and manage shifts and resources.
Handling your team’s planning comes with specific requirements that may vary widely depending on your business needs. The following concepts were introduced in Odoo Planning to meet those needs:
Shifts are dispatched to resources, which can be either human (employees) or material (e.g., equipment). The resources are assigned roles, which allows for organization of work within the team.
Once the initial configuration is done, planning shifts can be done manually or automated by using the Auto Plan feature.
An integration between the Planning and Sales apps allows the linking of sold services to roles and shifts in Planning. Additionally, integration with Project allows dedicating shifts, and thus time and resources, to specific projects.
配置¶
角色¶
To define the roles your resources perform (e.g., chef, bartender, waiter), go to New, and fill in the Name (e.g., assistant, receptionist, manager). Then, choose the Resources that will perform this role. Resources can be either Employees or Materials.
, then click備註
If the Sales app is installed in your database, the Services field appears, allowing you to specify which roles are needed to perform services so that the shifts are dispatched to the right person.
Roles are taken into account when using the Auto Plan feature.
Property fields and roles¶
Property fields allow you to add custom fields to forms across several Odoo applications. Planning includes the possibility of adding property fields linked to roles to shifts.
To create a property field, switch to the list view from any schedule. From there, click View on the shift that you wish to edit. If the Role field is empty, fill it in with the desired role, then click the cog icon and select Add Properties. Configure the new field according to your needs.

The property field is linked to the role and is included in the shift form of all shifts performed by this role.
Example
Some of the use cases of role property fields include:
Accreditation: for roles that require a specific permit (e.g., driving license)
Location: in companies that operate in multiple locations (e.g., shops or restaurants)
Language: in a multi-lingual environment (e.g., consulting company)
員工¶
All employees can be included in the planning and assigned shifts.
To adapt the employee’s planning settings, go to Work Information tab.
, and choose the employee for whom you want to edit the settings. Then, go to the
小訣竅
You can do the same from the Employees app, which is installed by default along with Planning.
Two sections of the employee’s Work Information tab have an impact on Planning: Schedule (namely, the Working Hours field) and Planning.
工作小时数¶
The Working Hours are taken into account when the Allocated Time and its percentage is calculated for shifts. If the Working Hours field is left blank, the employee is considered to be working flexible hours.
To create individual Working Hours, for example, for employees working part-time, click Search more…, then New.
備註
The Working Hours and the Allocated Time in Planning can impact Payroll, if the employee’s contract is configured to generate work entries based on shifts.
Planning roles¶
一旦员工拥有一个或多个 角色:
为该员工创建班次时,只显示该字段中所选角色的班次模板。
发布日程表时,员工只会收到分配给他们的角色的空缺班次通知。
在自动分配开放班次或计划销售订单时,只会为员工分配其角色的班次。
此外,当定义了:guilabel:默认角色
时:
为员工创建班次时,会自动选择默认角色。
在自动分配开放班次或计划销售订单时,该角色也优先于员工的其他角色。
備註
如果计划角色字段为空,则与员工共享的班次模板和开放班次将不受限制。但是,没有角色的员工无法使用**自动计划**功能。
材料¶
**材料**是可以分配班次和工作时间的资源,但不是员工。例如,建筑公司可以使用材料为共享机器(如起重机、叉车)创建班次。
与员工类似,材料也可以分配角色和工作时间。
班次模板¶
要创建班次模板,请在任意计划表上点击 新建,然后填写 班次详情。要将班次保存为模板,请勾选 保存为模板。

或者,您可以进入 新建。填写 开始时间 和 班次时间。班次的 结束时间 将根据 工作时间 计算,并将工作时间和休息时间考虑在内。
,然后点击Example
员工的工作时间为周一至周五,上午 8 时至下午 5 时,中午 12 时至下午 1 时休息。
创建一个开始时间为上午 9 点、持续时间为 8 小时的班次模板,根据工作时间和 1 小时的休息时间,结束时间为下午 5 点。
创建一个开始时间为上午 10 点、持续时间为 10 小时的轮班模板,结束时间将为第二天上午 10 点,因为根据工作时间,当天下午 5 点已经下班。
此外,您还可以为每个轮班模板进行配置:
角色:将班次与特定角色关联。
项目:记录专门用于项目工作的班次。
计划排班¶
打开排期应用程序后,用户会看到自己的日程安排。管理员角色的用户还可以看到 按资源安排日程、角色、项目 或 销售订单,以及报告和配置菜单。
備註
日程表显示在甘特视图中,您可以通过拖放进行编辑、调整大小、拆分和复制,而无需打开它们。

日程表中的班次使用了以下视觉元素:
Full color: shifts that are planned and published.
Diagonal stripes: shifts that are planned but have yet to be published.
Grayed-out background: employees that are on time off.
Progress bar: currently ongoing shifts with timesheets linked to them.
Grayed-out shift: when copying shifts, the copied shifts are shown in full color, whereas previously existing shifts are temporarily greyed out. The color changes back to full color or diagonal stripes on the next refresh of the page or by removing the filter.
Create a shift¶
To create a shift, go to any schedule, then click New. In the pop-up window that opens, fill in the following details:
Templates: If there is one or more templates existing in your database, they are displayed in the upper section of the pop-up window. Once selected, a template prefills the shift form accordingly.
Resource: Resources can be both employees or materials. If this field is left empty, the shift is considered an open shift.
Role: Select the role that the resource assigned will be performing. This field is used when auto-planning shifts. Once you select a role, the shift templates associated with it are displayed in the upper section of the pop-up window.
Project: If the Project app is installed in your database, this field allows you to link the project to the shift is available, allowing you to plan and track shifts dedicated to work on the selected project.
Sales Order Item: If the Sales app is installed in your database, this field allows you to link a sales order to the shift.
Repeat: Tick the checkbox and configure the Repeat Every field according to your needs. The following rules apply to recurring shifts:
All fields (e.g., Resource, Role, Project) are copied from the original shift except for the date, which is adjusted according to the Repeat Every field.
Recurrences are planned but not published.
By default, planned shifts are created six months in advance, after which they are created gradually. To change the time frame, activate the Developer mode, then go to and edit the Recurring Shifts.
Save as Template: When this option is ticked, a shift template is created with the same Start and End hours, Allocated time, Role, and Project.
Additional note sent to the employee: Click on the field to add a note.
Date: Choose the date and time of your shift. This is the only mandatory field when creating a shift.
分配时间: 根据日期和员工的 工作时间表 计算。请参阅 班次模板 中的更多内容。
点击 :guilabel:`发布并保存`以确认班次,并通过电子邮件将排班表发送给被指派的员工。
備註
草稿在管理员的规划视图中可见,并可通过斜线识别。只有在班次发布后,员工才会收到通知。
根据员工账户配置的不同,系统会发送两种通知:
没有用户账户的员工将被重定向到一个专属的**规划门户**。
拥有用户账户的员工将被重定向到 Odoo 后台的 :guilabel:`我的排期`视图。
空缺班次和自动排期¶
:guilabel:`自动排期`按钮允许您指派**空缺班次**(即没有指派资源的班次),以及创建并指派与销售订单或项目相关联的班次。
以下功能会对自动规划产生影响:
角色:空缺班次只会被分配给拥有相应角色的资源(员工或物料)。对于没有角色的员工,无法使用 :guilabel:`自动规划`功能。
默认角色:分配给资源的默认角色会优先于他们拥有的其他角色。
冲突:不能在同一时间为员工或物料分配多个班次。
休假:员工的休假和公共假期都会被考虑在内。
工作时间:在为员工或物料分配班次时会考虑工作时间。对于采用 弹性工作时间 的员工,无法使用 :guilabel:`自动规划`功能。
合同:如果员工有生效中的合同,他们不会被分配超出其合同期限的班次。
点击 :guilabel:`发布`以确认排班表,并通知员工他们的排班安排。
调换班次和取消指派¶
有两个功能可供员工对他们的排班表进行更改:调换班次**和**取消指派。
備註
这两个功能是互斥的。默认情况下可以调换班次,且此功能无法禁用。但是,一旦启用了**允许取消指派**功能,它将取代调换班次的功能。
调换班次¶
一旦班次被规划并发布,员工会收到一封电子邮件通知。如果员工希望调换某个班次,他们可以点击不想要的班次,然后点击 请求调换。
该班次仍然被指派给原员工,但在排班表上,该班次会显示一条通知,告知被指派的员工希望调换班次。
然后,该班次会显示给拥有相同角色的其他员工,如果他们希望将该班次指派给自己,可以点击 :guilabel:`我来接手`按钮。
備註
以下规则适用:
只有与员工角色匹配的班次,才会作为可用班次显示给他们。
对于已过去的班次,无法进行调换。
取消指派¶
要允许员工自行取消班次的指派,请前往 `允许取消指派`复选框。接着,指定一个天数,规定员工最晚可以在班次开始前几天取消指派。
,然后勾选 :guilabel:一旦班次被规划并发布,员工会收到一封电子邮件通知。如果允许取消班次指派,员工可以点击 :guilabel:`我没空`按钮,然后该班次会变回一个空缺班次。
備註
以下规则适用:
只有与员工角色匹配的班次才会显示在他们的排班表中。
过去的轮班无法取消分配。