When using a date field in the email templates it is important to use it with formatting function for the value to be represented in the format set in the language settings.
The function for formatting a date is format_date
and by default is using the format specified in the language settings. However, it is possible to specify a custom one (using LDML format), if needed.
An example of adding a date in an email template is shown in the example below:
In case it is needed to display datetime
or time
values the functions available for them are: format_datetime
and format_time
.
The module Partner Stock Risk extends the Account Financial Risk module functionality by adding an extra financial risk check on validation of inventory transfers with "Customer" as a destination location.
Once the module is installed, the extra check is enabled without any additional settings. In order to disable the check the module needs to be uninstalled.
The stock financial risk validation is based only on the General Limits, which means at least one General Limit financial risk needs to be enabled for the check to work.
Specific Limits are not taken into consideration for this check, which is expected, knowing that there is no specific option for Stock in the financial risk Specific Limits section.
The module is a great addition to business processes where additional financial risk validation is needed before dispatching the products. For example, if the invoice is generated after the delivery this module will help in preventing products from being shipped in the first place for customers with financial risk issues.
The module is maintained by the Odoo Community Association (OCA).
Sale Financial Risk module extends the Account Financial Risk by providing control of the customer’s credit limit in the sales order. This allows the system to include the financial risk check at the initial phase of the sales process and prevent a quote from being confirmed if the credit limit for the customer is exceeded.
Once the module is installed in the partner’s "Financial Risk" tab can be found two additional fields: “Include Sales Orders” in the General Limits and “Limit Sales Orders” in the Specific Limits.
When the “Include Sales Orders” is selected, the Sales Orders risk amount will be included in the customer’s Total Risk. The sales order risk amount is a sum of the sales orders’ total amount which is not invoiced. On quote confirmation, the system will check if the total risk exceeds the total credit limit specified for that customer. In case it is exceeded a warning message will be shown.
Additionally, it is possible to specify a specific limit for the sales orders in the field “Limit Sales Orders”. If the field is set, on quote confirmation it will be checked if the specific limit exceeds the total of the quote’s total amount and sales orders’ risk amount. If it does a warning message will be shown with info that the sales orders limit is exceeded.
Furthermore, in the Accounting / Invoicing Configuration Settings can be found the option “Include orders in done state”. This option extends the range of orders used in the financial calculations, not only to orders with the state “Sale Order” but it adds the orders with the state “Locked” as well. This option can be very useful for business cases where the "Lock Sales Order" option is used.
The warning message that is shown on quote confirmation, when any of the specified credit limits exceeds, can be overpassed by the Financial Risk Manager user. However, for other users, the confirmation will be blocked while the credit limit issue is not resolved.
Similarly to other Financial Risk limits, this module provides a convenient way of overviewing the financial data that contributes to the sales order financial risk.
By clicking on the total sale order risk amount will open the “Financial Risk Information” view where are listed all commercial partners related to the customer, that have an impact on the total risk amount, with information about their risk amounts and quantities. On click of the risk amount on any of the lines will open a list view with all sales order lines which are part of the calculation.
This module is a great addition to the Account Financial Risk module making the financial risk management for sales orders more convenient to implement by covering a wider range of business cases.
The module is maintained by the Odoo Community Association (OCA).
In the post The importance of correctly setting priority on inherited views we have already discussed the importance of the priority
field in the inherited views and why it needs to have the right value.
However, in some cases, it may be needed to update the priority of an existing view to meet certain requirements. The simplest case for that can be a request to change the primary view for a model that has multiple views from the same type.
The code sample below presents a way to modify the priority for an existing view from the codebase. In the particular example, the priority of the view_order_tree
view in the sale module is updated to value 5
.
That would mean that in the system the list view with the biggest priority for the sale.order
model will be view_quotation_tree
, which has a priority of 4
, and that one will be used always when the list view is not explicitly specified in the action.
In the native version of Odoo, it is possible to set a Credit Limit per customer, however, it is limited only to setting the Credit Limit amount and showing Informative messages on the Sales Order and Invoice in case the limit is exceeded for the selected customer.
This functionality is not sufficient in many cases and a more comprehensive solution is needed. Functionality that will provide more control over the financial risk but at the same time flexibility in setting up and detailed overview of it. The module that allows all these is the Account Financial Risk module.
Security
From a security perspective, the module has two access groups User and Manager. Even though the User group is specified as read-only access to the Financial Risk data we couldn’t find integration of it in the codebase in version 16 at the time of reviewing the module.
The Manager group, on the other side, provides full access to the Financial Risk functionality. Additionally, the users with this group can overpass partner risk exceptions during Invoice confirmation. However, this group is not enough to see the tab Financial Risk in the Customer form view. That means to have full access to the features from this module it is required to have both Financial Risk Manager and Billing Administrator/Accountant groups. The accounting group is controlling the view of the Financial Risk tab.
Financial Risk Tab
Once the module is installed in the system the tab Financial Risk can be found in the Partner form view. The Tab contains a complete overview of the financial risk for the particular customer.
On the left side can be found the General Limits section which contains the type of credit limits that can be included in the Customer’s Financial Risk, together with the current amount for each of them. The available types of credit limits are:
- Draft Invoices
- Open Invoices/Principal Balance
- Unpaid Invoices/Principal Balance
- Other Account Open Amount
- Other Account Unpaid Amount
Unpaid Invoices/Principal Balance type by default includes move lines with account same as the customer’s receivable account which are not reconciled and their due date is passed.
However, the module introduces an option of specifying additional margin before a move line is considered as Unpaid. This configuration is per company and can be found on the accounting configuration page under the name Maturity Margin. The value specified for this setting represents the number of additional days before a move line is considered unpaid.
"Other Account" limit types are move lines with account different than the customer’s receivable account which are with not past date or passed respectively. The Maturity Margin is taken into consideration for the Other Account Unpaid Amount as well.
At the bottom of the General Limits section, there is info about the Risk Remaining and the Total Risk for the customer, which is a sum of all included limits for that customer.
On the right side, can be found the Specific Limits section. In this section can be specified different limits for each type of credit limit.
Additionally, in the Info section it is possible to set a general credit limit per Customer. This limit is overpassed when the total amount that the customer owns from the selected General Limits is bigger than the set credit limit. Furthermore next to the Credit Limit is available the date when it was last updated.
Also in this section can be set the Credit Limit Currency. The available options for it are the following:
- Company Currency
- Receivable Currency
- Pricelist Currency
- Manual Credit Currency.
In case of selecting the Manual Credit Currency, an additional currency field is shown where the needed currency can be selected. Another available field in this section is Credit Policy, which is only informative and is not used anywhere in the system.
Invoice Confirmation
In case a customer exceeds a certain limit on confirmation of an Invoice “Partner risk exceeded” modal is shown. If the user has the Financial Risk Manager group there is an option in the modal to overpass the Risk Exception and continue with the Confirmation. Otherwise, the Confirmation will be blocked until the Financial Risk Exception for the customer is resolved.
Additionally for cases where this type of limitation is not needed there is a setting that allows invoices to be confirmed for customers with exceeded credit limits by all users that have access rights to confirm invoices. This feature can be enabled by selecting the option “Allow invoice validation over the risk” on the invoicing/accounting configuration page.
Financial Data Overview
The module allows a simple way of overviewing the financial data that is contributing to the current financial risk calculation for a customer. By clicking on the number next to each type of general limit will open the “Financial Risk Information” view, from which can be opened the list of Account Move Lines that are contributing to the Financial Risk for each account. This view can be opened by clicking on the number next to the name of the account.
This module is a great addition to the existing accounting features in Odoo. However, It is only related to the accounting part of the system and will not limit any action related to the Sales Order. In case such a feature is needed, a great addition to this module is the Sale Financial Risk module.
The module is maintained by the Odoo Community Association (OCA).
In addition is a short video with the module’s features.