Commercial Days Calculator (360-day Year Method)
by Initium Services ITS S.A.S. https://start.initium.cloud$ 20.89
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
Lines of code | 162 |
Technical Name |
strx_commercial_days_360 |
License | OPL-1 |
Website | https://start.initium.cloud |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
Lines of code | 162 |
Technical Name |
strx_commercial_days_360 |
License | OPL-1 |
Website | https://start.initium.cloud |
Financial Calendar: 360-Day Year Calculator (DAYS360)
Accurate commercial day calculations for financial operations
Implement Excel's DAYS360 function in Odoo to calculate days between dates using the 30/360 day count convention, essential for:
- Interest calculations
- Loan amortizations
- Bond calculations
- Payment periods
- HR working days calculations
- Consumption trend analysis
- 360-day based projections and forecasting
Module Highlights:
✓ Accurate implementation of both US and European methods
✓ Easy integration with other Odoo modules
✓ Wizard interface for quick calculations
✓ Company-level default method configuration
✓ Compatible with Odoo 14.0, 15.0, 16.0

Key Features
Complete Implementation of DAYS360
Accurately calculates the number of days between two dates based on a 360-day year (twelve 30-day months), just like the DAYS360 function in Excel.
Two Calculation Methods
Supports both US (NASD) and European calculation methods, allowing you to choose the convention that matches your accounting standards.
Flexible Implementation
Multiple Ways to Access
The module provides several ways to access the calculation functionality:
# Recommended approach: Through the company model
days = self.env.company.days360('2025-01-01', '2025-12-31')
# or with your model, as account.move.line or sale.order
days = self.env["model"].company_id.days360('2025-01-01', '2025-12-31')
# Advanced usage: Through the dedicated model
days = self.env['days360.function'].calculate_days360(
'2025-01-01', '2025-12-31', 'US')
Applications Beyond Finance: While commonly used in financial calculations, the 360-day year convention is also valuable for:
- Human Resources: Calculate working days between dates for leave management, attendance tracking, and payroll.
- Analytics: Analyze consumption trends with standardized monthly periods (30 days each) for more consistent comparisons.
- Forecasting: Create projections and models based on the 360-day calendar for simplified business planning.
Calculation Methods Explained
US Method (NASD)
- If the start date is the last day of the month, it becomes day 30
- If the end date is the last day of the month and the start date is before day 30, the end date becomes day 30
European Method
- If any date is the 31st, it becomes the 30th
Expected Results
The calculation results will differ between methods. Below is a table showing the expected results when calculating from different start dates to December 31, 2024:

As shown in the table, the US method consistently returns one more day than the European method for the same date range. These results can be verified using Microsoft Excel's DAYS360 function.
Easy to Use

User-Friendly Interface
The module includes a simple wizard interface for performing calculations directly from the Odoo interface. Just enter the start and end dates, select the calculation method, and instantly see the results.
Technical Information
Formula
The module implements the DAYS360 function using the formula:
(Y2 - Y1) × 360 + (M2 - M1) × 30 + (D2 - D1)
Where:
- Y1, M1, D1 are the year, month, and day of the start date
- Y2, M2, D2 are the year, month, and day of the end date
The day values are adjusted according to the selected method.
Dependencies
- Base Odoo modules (base, account)
- No external Python libraries required
Compatibility
- Odoo Community
- Odoo Enterprise
Installation and Configuration
Installation
- Download the module from Apps.Odoo marketplace
- Install the module from the Odoo Apps menu
Note: This module is exclusively available through the official Odoo Apps marketplace.
Configuration
- Navigate to Settings → Companies
- Select your company
- Go to the "Commercial Days Settings" tab
- Choose between US Method (NASD) or European Method

Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module