预订操作

预订操作 是预先配置的流程,允许用户根据指定的时间表或发生次数,自动执行数据库中的某些任务。这些任务包括发送电子邮件、生成发票、数据清理等。

在 Odoo 中,某些预定操作在默认情况下处于激活状态,以确保自动触发某些功能,但数据库中还有许多预定操作选项在默认情况下**未**被激活。

在 Odoo 订阅 中,有两个预定操作可启动活动定期订阅的计费流程,以及在订阅到期时停止计费。

默认情况下,这些操作是开启的;但可以随时停用,以便手动管理订阅。

访问预订操作

重要

要访问预订操作,必须 激活 开发者模式

激活开发者模式后,导航至 设置应用程序 ‣ 技术 ‣ 预订操作

Odoo 设置应用程序技术菜单下的预订操作选项。

执行此操作后,系统会显示一个专门的 预订操作 仪表板。在该页面上,有整个数据库的预定操作的完整列表。

在此处,在搜索栏中输入 “订阅”。这样做会提供三个特定于订阅的结果。以下文档重点介绍列表中的最后两个结果:

  • 销售订阅:生成定期发票和付款

  • 销售订阅:订阅过期

Odoo 设置中,预订操作页面上的订阅相关结果。

预订操作 仪表板的相应行中,通过查看 生效 列下是否有勾选复选框,以确定预订操作是否处于生效状态;如果复选框为绿色并已勾选,则表示该预订操作处于生效状态。

如果需要激活预订操作,请从列表中点击所需的预订操作。

Odoo 设置应用程序中的预订操作表单。

然后,在预订操作表单中,将 生效 字段的开关按钮切换至右侧。执行此操作后,会使开关变成绿色,表明预订操作现在已 生效

在预订操作表单的 执行频率 字段中,还可以设置预订操作的运行频率。

重要

如果执行时间少于五分钟,预订操作将 无法 正常运行。这是所有预订操作的一般规则。

有关更多信息,请阅读:doc:常见技术问题</administration/odoo_sh/advanced/frequent_technical_questions> 文档。

生成周期性发票和付款

为了使 销售订阅:生成周期性发票和付款 预订操作正确生成订阅的周期性发票和付款,必须 设置*递延开支* 和*递延收入* 账户,以便 Odoo 处理与订阅相关的发票和付款。

要设置 递延开支递延收入 账户,请导航至 会计应用程序 ‣ 配置 ‣ 设置。这两个账户可在 默认账户 部分进行配置。

Odoo 会计应用程序的设置页面中必要递延帐户设置。

递延支出 和:guilabel:递延收入 下拉菜单字段中输入正确的账户后,点击左上角的:guilabel:保存

创建结算单

销售订购:生成周期性发票和付款 计划操作相关的元素可在已确认的订阅销售订单中找到。

要检查这些要素,请在 订阅 应用程序中打开任何已确认的销售订单,以显示订阅销售订单表。

在已确认的订购销售订单表单中,请重点关注 续订计划下一张发票日期 字段。

Odoo 订阅应用程序中已确认的订阅销售订单。

The scheduled action creates an invoice when today’s date is the same date as the Date of Next Invoice.

Odoo uses the information in the Recurring Plan field to update the next invoice date accordingly.

警告

If the product invoicing policy is set to Based on Delivered Quantities (Manual), and the delivered quantity is 0, Odoo does not create an invoice, and the customer is not charged.

Instead, the subscription is processed as a free recurring product, and is reflected as such in the chatter of the subscription sales order.

When this occurs, the following message appears: Automatic renewal succeeded. Free subscription. Next invoice:[date]. No email sent.

Once the invoice for the subscription sales order is created, the invoice can be viewed by clicking the Invoices smart button that appears at the top of the subscription sales order.

An email is sent to the customer notifying them of the recurring subscription charge, if there is a Payment Token on the account.

To check if there is a Payment Token, open the Other Info tab, and look at the Payment Token field, under the Subscription section.

The Payment Token field under the Other Info tab on a subscription sales order form.

If there is no Payment Token, the invoice is created, and sent to the customer. The payment must be registered manually in this case.

Closing invoices

The Sale Subscription: generate recurring invoices and payments scheduled action also has the ability to close a subscription, if the following conditions are met:

  • If the subscription has no Payment Token, create and post the invoice.

  • If the subscription has a Payment Token, try to charge.

    • If the charge is successful, create and post the invoice.

    • If the charge fails, send reminders periodically.

      • Close the subscription if it continues to fail for more than fourteen days.

订阅到期

销售订阅:订阅到期 计划的操作会检查所有可能导致订阅自动关闭的其他条件。如果满足特定条件,计划的操作将关闭该订阅。

首先,销售订阅:订阅到期 计划操作会检查订阅销售订单上配置的结束日期是否已过。

Odoo 订阅中订阅销售订单的到期日期。

然后, 销售订阅:订阅到期 计划操作会检查发票是否在付款条件截止日期内未支付。

要访问订阅产品的发票,请访问订阅产品的销售订单,然后点击 发票 智能按钮。然后查看 发票日期 列。

Odoo 订阅应用程序订阅发票页面上的发票日期栏。

Unpaid subscriptions with an Invoice Date that are past the determined number of days in the Automatic Closing field of a Recurring Plan are automatically closed by the Sale Subscription: subscriptions expiration scheduled action.

The Automatic Closing field on a Recurring Plan form in Odoo Subscriptions.

For example, if the next invoice date is July 1st, and the Automatic Closing is set to ‘30 Days’, the scheduled action would close the subscription on August 1st.