Monday, September 16, 2024
6 changes · saas-17.4
Resolved issues and error corrections
This update fixes two export templates so they use the correct fields for services and project cost/revenue exports. This helps users get cleaner, more accurate exported data without needing manual corrections.
Original PR description
This PR will edit some export templates. - Services: change "invoice_policy" to "service_policy" - Projects Costs & Revenues: change "so_line/product_id" to "product_id"
Internal users will once again see the “View Project” button in project-related emails. The button remains hidden only from customer portal users when the project is private, helping employees access project details while preserving customer privacy.
Original PR description
Before this commit, due to 715d6be, the `View Project` button in the email sent even if the receiver is an internal user, which is not really expected. This commit makes sure the button is only hidden for the customer portal when the project is private. X-Original-Commit: 715d6be Forward-port of #180257
Users now see a proper validation message when an invalid company is entered on a contact, instead of the system showing a technical error. This improves reliability and makes the issue easier for users to correct without support intervention.
Original PR description
After the below commit, a traceback arises because of the exception is directly raised instead from the BaseException. Error:- ``` TypeError: exceptions must derive from BaseException File…
After the below commit, a traceback arises because of the exception is directly raised instead from the BaseException.
Error:-
```
TypeError: exceptions must derive from BaseException
File "odoo/http.py", line 2383, in __call__
response = request._serve_db()
File "odoo/http.py", line 1913, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1976, 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 1943, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2187, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 227, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 757, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 35, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 459, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 71, in web_save
self.write(vals)
File "addons/snailmail/models/res_partner.py", line 26, in write
return super(ResPartner, self).write(vals)
File "addons/partner_autocomplete/models/res_partner.py", line 229, in write
res = super(ResPartner, self).write(values)
File "addons/mail_plugin/models/res_partner.py", line 44, in write
res = super(ResPartner, self).write(vals)
File "odoo/addons/base/models/res_partner.py", line 754, in write
result = result and super(Partner, self).write(vals)
File "addons/mail/models/mail_activity_mixin.py", line 249, in write
return super(MailActivityMixin, self).write(vals)
File "addons/mail/models/mail_thread.py", line 331, in write
result = super(MailThread, self).write(values)
File "odoo/models.py", line 4582, in write
real_recs._validate_fields(vals, inverse_fields)
File "odoo/models.py", line 1513, in _validate_fields
check(self)
File "odoo/addons/base/models/res_partner.py", line 473, in _check_partner_company
raise (_('The company assigned to this partner does not match the company this partner represents.'))
```
Commit:- https://github.com/odoo/odoo/pull/177221/commits/060f7240d8711b90073fdd1339ed43d6fa59249d
After this commit a `ValidationError` is raised instead of a direct exception to prevent the traceback.
sentry-5850002187This fix prevents an upgrade crash when a customized accounting form has had a visibility setting removed. It makes the invoice extraction module handle that customization safely, helping businesses complete upgrades without manual troubleshooting.
Original PR description
**Steps to reproduce:**
- Make studio view of account journal entry form view (account.journal.form).
- Find the node that exists on xpath "//field[@name='partner_id'][@widget='res_partner_many2one']"
and remove the invisible attribute from it.
- Upgrade database to saas-17.4
**Traceback:**
```
File "/home/odoo/src/enterprise/saas-17.4/account_invoice_extract/models/account_invoice.py", line 900, in _get_view
node.set('invisible', f"{placeholder_condition} or ({node.attrib.pop('invisible')})")
File "src/lxml/etree.pyx," line 2464, in lxml.etree._Attrib.pop
KeyError: 'invisible'
```
**Solution:**
- This occurs because when checking the invisible attribute of a node, we are not checking if an invisible attribute exists or not, so added a condition for checking.The spreadsheet pivot menu now hides the reinsert option when the selected pivot range is invalid. This prevents users from encountering an error screen and keeps spreadsheet editing smoother.
Original PR description
## Description: Previously, attempting to reinsert a pivot with an invalid range resulted in a traceback error. This commit resolves the issue by hiding the menu item when the specified pivot range is invalid. Task: [4137926](https://www.odoo.com/odoo/project/2328/tasks/4137926)
Budget lines now show the red over-budget warning only when an expense budget exceeds its planned amount. This prevents revenue or mixed budgets from being incorrectly flagged as negative when higher-than-planned performance is actually favorable.
Original PR description
Before this commit: - When the achieved amount exceeds the budgeted amount, it is displayed in red. This indicates an over-budget status, which is misleading for `revenue` and `both` budget types where exceeding the budget is actually a positive sign. After this commit: - When the achieved amount exceeds the budgeted amount, the red color will be applied only to the expense budget. Task-4167662