Sunday, March 31, 2024
5 changes · saas-17.2
Miscellaneous changes
In 2024, Luxembourg has added two new fields in the monthly, quarterly, and annual reports: 769 and 770 (rate of 17%). These fields should be added in our reports too. Part of: task-3814151 See also: https://github.com/odoo/enterprise/pull/58837 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160027 Forward-Port-Of: odoo/odoo#158016
Original PR description
In 2024, Luxembourg has added two new fields in the monthly, quarterly, and annual reports: 769 and 770 (rate of 17%). These fields should be added in our reports too. Part of: task-3814151 See also: https://github.com/odoo/enterprise/pull/58837 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160027 Forward-Port-Of: odoo/odoo#158016
This reverts commit ed651c93ca23c25f7cc3431b62be8f131b3ac9b6. With that commit, the users will have to empty eas/endpoint fields in order to see the checkbox and then they'll see a usererror when trying to download the ubl file. We will fix it differently, showing the checkbox at all times (if edi format is set) and allowing to download the UBL file regardless of the eas/endpoint fields. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-
Original PR description
This reverts commit ed651c93ca23c25f7cc3431b62be8f131b3ac9b6. With that commit, the users will have to empty eas/endpoint fields in order to see the checkbox and then they'll see a usererror when trying to download the ubl file. We will fix it differently, showing the checkbox at all times (if edi format is set) and allowing to download the UBL file regardless of the eas/endpoint fields. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160035 Forward-Port-Of: odoo/odoo#159553
Steps to reproduce: - Setup sendcloud shipping (shipping product 10-30KG) - Enable demo payment - On the website proceed to checkout (customizable desk) - Select sendcloud (Pay button is disabled) - Edit website and add terms and conditions - Now if you uncheck and recheck terms and conditions - Pay button is enabled although carrier is in error Fix: when reenabling the pay button we check that the carrier is ready but we only check if there's pickup point ensure that the shipping me
Original PR description
Steps to reproduce: - Setup sendcloud shipping (shipping product 10-30KG) - Enable demo payment - On the website proceed to checkout (customizable desk) - Select sendcloud (Pay button is disabled) - Edit website and add terms and conditions - Now if you uncheck and recheck terms and conditions - Pay button is enabled although carrier is in error Fix: when reenabling the pay button we check that the carrier is ready but we only check if there's pickup point ensure that the shipping method is avialable before enabling the pay button opw-3698804 Forward-Port-Of: odoo/odoo#159133
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 zer
Original PR description
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…
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
File "odoo/http.py", line 2252, in __call__
response = request._serve_db()
File "odoo/http.py", line 1828, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1848, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1826, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1833, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2058, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 1081, in onchange
snapshot1 = RecordSnapshot(record, fields_spec)
File "addons/web/models/models.py", line 1168, in __init__
self.fetch(name)
File "addons/web/models/models.py", line 1183, in fetch
self[field_name] = self.record[field_name]
File "odoo/models.py", line 6671, in __getitem__
return self._fields[key].__get__(self, self.env.registry[self._name])
File "odoo/fields.py", line 1138, in __get__
self.recompute(record)
File "odoo/fields.py", line 1353, in recompute
apply_except_missing(self.compute_value, recs)
File "odoo/fields.py", line 1326, in apply_except_missing
func(records)
File "odoo/fields.py", line 1375, in compute_value
records._compute_field_value(self)
File "odoo/models.py", line 4984, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 102, in determine
return needle(*args)
File "addons/resource/models/resource_calendar_attendance.py", line 83, in _compute_duration_days
attendance.duration_days = 0.5 if attendance.duration_hours <= attendance.calendar_id.hours_per_day * 3 / 4 else 1
File "odoo/fields.py", line 1138, in __get__
self.recompute(record)
File "odoo/fields.py", line 1353, in recompute
apply_except_missing(self.compute_value, recs)
File "odoo/fields.py", line 1326, in apply_except_missing
func(records)
File "odoo/fields.py", line 1375, in compute_value
records._compute_field_value(self)
File "odoo/models.py", line 4984, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 102, in determine
return needle(*args)
File "addons/resource/models/resource_calendar.py", line 109, in _compute_hours_per_day
calendar.hours_per_day = calendar._get_hours_per_day(attendances)
File "addons/resource/models/resource_calendar.py", line 185, in _get_hours_per_day
return float_round(hour_count / float(number_of_days), precision_digits=2)
```
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
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#159844When installing the module `account_check_printing`, it is possible that a MemoryError is raised during the computation of `_compute_check_number`. To avoid that, the `_auto_init` function is overridden to create the field through SQL. opw-3790729 Forward-Port-Of: odoo/odoo#159499
Original PR description
When installing the module `account_check_printing`, it is possible that a MemoryError is raised during the computation of `_compute_check_number`. To avoid that, the `_auto_init` function is overridden to create the field through SQL. opw-3790729 Forward-Port-Of: odoo/odoo#159499