This commit add a new delay_type that will add to the date the nb_days then go the end of the month and finally add a new field called days_next_month. This field is a Char because we want the field to be of size 2. Also, we added a constraint that this field must be numeric and between 0 and 31. Ex of use with Invoice date the 25/11/2023, if we have a payment term with 90 for the nb_days and 10 for the days_next_month: +90 days = 23/02/2024 End of month = 29/02/2024 +10 days = 10/03/2024 (Also, there is a special case handling when the day of the month is 29, 30 or 31 to avoid exceeding the next month's end. For instance, with a payment term of 30 days end of month and using the 31st of a month, prevent calculation from moving beyond the end of the next month (e.g., early March instead of end February) closes odoo/odoo#143758 Task: 3609320 Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
4 lines
97 B
Python
4 lines
97 B
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import models
|