alsh-odoo d0f9d8cca7 [FIX] l10n_fr_pos_cert: calculate valid previous month date
This traceback arises when the current day of the date is 31 while the
schedule action (Generate Monthly Sales Closing) runs.

Scenarios to produce the issue:
[1]
* Imagine the 'date_stop' value is '31-10-2023'
* When the scheduled action('Generate Monthly Sales Closing') runs
* The value of the 'month_target will be 9' and 'year_target' remains same
* The value of 'interval_from' will be '31-09-2023' (an invalid date).

[2]
* Imagine the 'date_stop' value is '31-03-2023'
* The value of 'interval_from' will be '31-02-2023' (an invalid date)

It leads to the traceback
Error: 'ValueError: day is out of range for month'

See:-
https://github.com/odoo/odoo/blob/5fb9825384895fd303bd15c3e4f8dbc55d35904f/addons/l10n_fr_pos_cert/models/account_closing.py#L124-L134

After applying this commit, it will resolve the issue by giving a valid date
in all scenarios.

sentry-4589899768

closes odoo/odoo#143982

X-original-commit: 836d2dae11b663c54bc47f7bc020bced3f243bf8
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
2023-11-30 10:13:24 +00:00
2023-10-27 08:36:16 +00:00
2023-11-02 21:02:44 +00:00
2023-11-20 04:58:31 +00:00
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%