diff --git a/content/applications/sales/subscriptions.rst b/content/applications/sales/subscriptions.rst index a1327477d..33fce312f 100644 --- a/content/applications/sales/subscriptions.rst +++ b/content/applications/sales/subscriptions.rst @@ -20,6 +20,7 @@ etc. - :doc:`/applications/sales/subscriptions/renewals` - :doc:`/applications/sales/subscriptions/closing` - :doc:`/applications/sales/subscriptions/automatic_alerts` + - :doc:`/applications/sales/subscriptions/scheduled_actions` - :doc:`/applications/sales/subscriptions/reports` .. _subscriptions/quotations: @@ -84,4 +85,5 @@ invoice manually. subscriptions/renewals subscriptions/closing subscriptions/automatic_alerts + subscriptions/scheduled_actions subscriptions/reports diff --git a/content/applications/sales/subscriptions/scheduled_actions.rst b/content/applications/sales/subscriptions/scheduled_actions.rst new file mode 100644 index 000000000..f0a891fb1 --- /dev/null +++ b/content/applications/sales/subscriptions/scheduled_actions.rst @@ -0,0 +1,185 @@ +================= +Scheduled actions +================= + +*Scheduled actions* are pre-configured processes that allow users to automate certain tasks within a +database, based on a designated schedule or number of occurrences. These tasks can include sending +emails, generating invoices, data clean-up, and so much more. + +In Odoo, some scheduled actions are active, by default, to ensure that certain functions are +triggered automatically, however there are *also* many scheduled action options that appear in the +database that are **not** activated by default. + +In Odoo *Subscriptions*, there are two scheduled actions that initiate the billing process for +active recurring subscriptions, as well as when billing should stop due to subscription expiration. + +They are turned on, by default and can be deactivated at any time in order to manage subscriptions +manually. + +Access scheduled actions +======================== + +.. important:: + In order to access scheduled actions, :ref:`developer mode ` **must** be + activated. + +With developer mode activated, navigate to :menuselection:`Settings app --> Technical --> Scheduled +Actions`. + +.. image:: scheduled_actions/scheduled-actions-technical-settings-page.png + :align: center + :alt: The scheduled actions option under the technical menu in the Odoo Settings application. + +Doing so reveals a dedicated :guilabel:`Scheduled Actions` dashboard. On this page, there is a +complete list of scheduled actions for the entire database. + +From here, enter `Subscription` in the search bar. Doing so provides three subscription-specific +results. The following documentation focuses on the last two results in the list: + +- :guilabel:`Sale Subscription: generate recurring invoices and payments` +- :guilabel:`Sale Subscription: subscriptions expiration` + +.. image:: scheduled_actions/scheduled-actions-page-subscription-results.png + :align: center + :alt: The subscription-related results on the scheduled actions page in Odoo Settings. + +Determine if a scheduled action is active by looking under the :guilabel:`Active` column, in the +it's corresponding row on the :guilabel:`Scheduled Actions` dashboard, for a ticked checkbox; if +the checkbox is green with a check mark, the scheduled action is active. + +If a scheduled action needs to be activated, click into the desired scheduled action from the list. + +.. image:: scheduled_actions/scheduled-action-form.png + :alt: The scheduled action form in the Odoo Settings application. + +Then, from the scheduled action form, toggle the switch in the :guilabel:`Active` field to the +right. Doing so turns the switch green, indicating that the scheduled action is now `Active`. + +The ability to set up how often the scheduled action runs is also available on the scheduled action +form, in the :guilabel:`Execute Every` field. + +.. important:: + The scheduled action does **not** function correctly if the execution time is less than five + minutes. This is a general rule for all scheduled actions. + + For more information, read the :doc:`Frequent Technical Questions + ` documentation. + +Generate recurring invoices and payments +======================================== + +In order for the :guilabel:`Sale Subscription: generate recurring invoices and payments` scheduled +action to properly generate recurring invoices and payments on subscriptions, the *Deferred Expense* +and *Deferred Revenue* accounts **must** be set up, in order for Odoo to process various invoices +and payments related to subscriptions. + +To set up *Deferred Expense* and *Deferred Revenue* accounts, navigate to :menuselection:`Accounting +app --> Configuration --> Settings`. Both accounts can be configured in the :guilabel:`Default +Accounts` section. + +.. image:: scheduled_actions/deferred-settings-accounting.png + :align: center + :alt: The necessary deferred account settings in the Odoo Accounting app's settings page. + +Once the correct accounts are entered in the :guilabel:`Deferred Expense` and :guilabel:`Deferred +Revenue` drop-down menu fields, click :guilabel:`Save` in the upper-left corner. + +Create invoice +-------------- + +Elements related to the :guilabel:`Sale Subscription: generate recurring invoices and payments` +scheduled action can be found on confirmed subscription sales orders. + +To examine these elements, open any confirmed sales order in the *Subscriptions* application to +reveal the subscription sales order form. + +On a confirmed subscription sales order form, focus on the :guilabel:`Recurring Plan` and +:guilabel:`Date of Next Invoice` fields. + +.. image:: scheduled_actions/confirmed-subscription-sales-order-fields.png + :align: center + :alt: A confirmed subscription sales order in the Odoo Subscriptions application. + +The scheduled action creates an invoice when today's date is the same date as the :guilabel:`Date of +Next Invoice`. + +Odoo uses the information in the :guilabel:`Recurring Plan` field to update the next invoice date +accordingly. + +.. warning:: + If there is no payment provider set up, 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 :guilabel:`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 :guilabel:`Payment Token` on the account. + +To check if there is a :guilabel:`Payment Token`, open the :guilabel:`Other Info` tab, and look at +the :guilabel:`Payment Token` field, under the :guilabel:`Subscription` section. + +.. image:: scheduled_actions/payment-token-field.png + :align: center + :alt: The Payment Token field under the Other Info tab on a subscription sales order form. + +If there is no :guilabel:`Payment Token` (i.e. payment provider is `Bank Transfer`), the invoice is +created and sent to the customer. The payment **must** be registered manually in this case. + +Closing invoices +---------------- + +The :guilabel:`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 :guilabel:`Payment Token`, create and post the invoice. +- If the subscription has a :guilabel:`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. + +Subscriptions expiration +======================== + +The :guilabel:`Sale Subscription: subscriptions expiration` scheduled action checks for all other +conditions that may cause a subscription to close automatically. If certain conditions are met, the +scheduled action closes that subscription. + +First, the :guilabel:`Sale Subscription: subscriptions expiration` scheduled action checks to see if +the end date has passed, which is configured on the subscription sales order. + +.. image:: scheduled_actions/subscription-expiration-date.png + :align: center + :alt: The expiration date on a subscription sales order in Odoo Subscriptions. + +Then, the :guilabel:`Sale Subscription: subscriptions expiration` scheduled action checks if the +invoice has not been paid within the payment terms deadline. + +To access the invoices attached to a subscription, access the sales order for the subscription +product, and click the :guilabel:`Invoices` smart button. Then, look at the :guilabel:`Invoice Date` +column. + +.. image:: scheduled_actions/invoices-invoice-date-column.png + :align: center + :alt: The Invoice Date column on subscriptions invoice page in Odoo Subscriptions app. + +Unpaid subscriptions with an :guilabel:`Invoice Date` that are past the determined number of days in +the :guilabel:`Automatic Closing` field of a :guilabel:`Recurring Plan` are automatically closed by +the :guilabel:`Sale Subscription: subscriptions expiration` scheduled action. + +.. image:: scheduled_actions/automatic-closing-field.png + :align: center + :alt: The Automatic Closing field on a Recurring Plan form in Odoo Subscriptions. + +For example, if the next invoice date is July 1st, and the :guilabel:`Automatic Closing` is set to +'30 Days', the scheduled action would close the subscription on August 1st. + +.. seealso:: + - :doc:`../subscriptions` + - :doc:`plans` + - :doc:`products` + - :doc:`automatic_alerts` diff --git a/content/applications/sales/subscriptions/scheduled_actions/automatic-closing-field.png b/content/applications/sales/subscriptions/scheduled_actions/automatic-closing-field.png new file mode 100644 index 000000000..b482af4ec Binary files /dev/null and b/content/applications/sales/subscriptions/scheduled_actions/automatic-closing-field.png differ diff --git a/content/applications/sales/subscriptions/scheduled_actions/confirmed-subscription-sales-order-fields.png b/content/applications/sales/subscriptions/scheduled_actions/confirmed-subscription-sales-order-fields.png new file mode 100644 index 000000000..0a46e55e7 Binary files /dev/null and b/content/applications/sales/subscriptions/scheduled_actions/confirmed-subscription-sales-order-fields.png differ diff --git a/content/applications/sales/subscriptions/scheduled_actions/deferred-settings-accounting.png b/content/applications/sales/subscriptions/scheduled_actions/deferred-settings-accounting.png new file mode 100644 index 000000000..a9dadf586 Binary files /dev/null and b/content/applications/sales/subscriptions/scheduled_actions/deferred-settings-accounting.png differ diff --git a/content/applications/sales/subscriptions/scheduled_actions/invoices-invoice-date-column.png b/content/applications/sales/subscriptions/scheduled_actions/invoices-invoice-date-column.png new file mode 100644 index 000000000..e3f8b611e Binary files /dev/null and b/content/applications/sales/subscriptions/scheduled_actions/invoices-invoice-date-column.png differ diff --git a/content/applications/sales/subscriptions/scheduled_actions/payment-token-field.png b/content/applications/sales/subscriptions/scheduled_actions/payment-token-field.png new file mode 100644 index 000000000..f1f8b3580 Binary files /dev/null and b/content/applications/sales/subscriptions/scheduled_actions/payment-token-field.png differ diff --git a/content/applications/sales/subscriptions/scheduled_actions/scheduled-action-form.png b/content/applications/sales/subscriptions/scheduled_actions/scheduled-action-form.png new file mode 100644 index 000000000..afcf687bd Binary files /dev/null and b/content/applications/sales/subscriptions/scheduled_actions/scheduled-action-form.png differ diff --git a/content/applications/sales/subscriptions/scheduled_actions/scheduled-actions-page-subscription-results.png b/content/applications/sales/subscriptions/scheduled_actions/scheduled-actions-page-subscription-results.png new file mode 100644 index 000000000..20b3c42ee Binary files /dev/null and b/content/applications/sales/subscriptions/scheduled_actions/scheduled-actions-page-subscription-results.png differ diff --git a/content/applications/sales/subscriptions/scheduled_actions/scheduled-actions-technical-settings-page.png b/content/applications/sales/subscriptions/scheduled_actions/scheduled-actions-technical-settings-page.png new file mode 100644 index 000000000..b6b5bbe4b Binary files /dev/null and b/content/applications/sales/subscriptions/scheduled_actions/scheduled-actions-technical-settings-page.png differ diff --git a/content/applications/sales/subscriptions/scheduled_actions/subscription-expiration-date.png b/content/applications/sales/subscriptions/scheduled_actions/subscription-expiration-date.png new file mode 100644 index 000000000..5198ff1cd Binary files /dev/null and b/content/applications/sales/subscriptions/scheduled_actions/subscription-expiration-date.png differ