This error occurs when the user adds a new "Working Schedule" to the resource,
switches to the two-week calendar view, removes all the existing "Working Hours"
lines, and then attempts to add a new line under "Working Hours."
Steps to reproduce:
- Install "resource" module
- Settings -> Technical -> Resource -> Working Schedules
- New -> Switch to 2 week calendar -> Remove all "Working Hours" lines
- Click on Add a line
Traceback: ZeroDivisionError
float division by zero
This commit implements a check for the variable "number_of_days". If the value
of "number_of_days" is zero or not found, the function will return zero.
This ensures that the function behaves appropriately in cases where the number
of days is zero.
https://github.com/odoo/odoo/blob/5177e21aea68959eedc73e0034ed984992392dd7/addons/resource/models/resource_calendar.py#L185
sentry - 5108250957
closesodoo/odoo#159844
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
An error occurs when the user attempts to access a forecast report for the
replenishment product but does not receive the warehouse location ID
(archive/delete).
Steps to reproduce: (without demo data)
- Install "stock_account" module
- Inventory -> Operation -> Procurement -> Replenishment
- Create a new Replenishment product
- Configuration -> warehouse -> Archive warehouse records
- Go to a product made in the replenishment and click on forecast report
Traceback : "IndexError
list index out of range"
This commit will help to open a forecast report if the warehouse location is not
found.
sentry-4998176742
closesodoo/odoo#158017
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Fix race-condition when a directory is created by two processes (python's os.py
handles it for all directories, but not for the last one). Happens sometimes
when generating assets for the first time (CSS, JS); one of the two times might
crash.
sentry-4417110945
closesodoo/odoo#156232
Signed-off-by: Fabien Pinckaers (fp) <fp@odoo.com>