Friday, November 29, 2024
6 changes · saas-17.4
Resolved issues and error corrections
This update fixes a problem that could prevent Point of Sale data from being saved correctly in the browser. It improves reliability for cashiers and sales operations by reducing errors when the system stores local sales data.
Original PR description
Before this commit, data stored in IndexedDB could fail to serialize correctly due to Proxy-wrapped objects, resulting in errors when saving data. opw-4367293 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix improves the email template editing experience in marketing campaigns by ensuring the fullscreen editor appears correctly above campaign dialogs. It also keeps the snippets sidebar aligned with the dialog header while scrolling, making campaign email design easier and less confusing.
Original PR description
This PR fixes multiple issues related to the mass_mailing_html_field used in `marketing_automation` and in `mass_mailing` modules. This PR is the continuation of https://github.com/odoo/odoo/pull/187134 1) The edition dialog for the marketing campaign overlaps the fullscreen editor of the mail template destined to that marketing campaign. - concerns: marketing_automation 2) The snippets sidebar in a dialog does not stick to the dialog title when scrolling the dialog - concerns: marketing_automation See individual commits for further explanation. task-4178640 Co-authored-by: Astik Singh <assi@odoo.com> Co-authored-by: Damien Abeloos <abd@odoo.com> Co-authored-by: Mahdi Cheikh Rouhou <macr@odoo.com> Co-authored-by: Shubham Thanki <shut@odoo.com>
This fixes an error that could stop users from sending and printing customer invoices after an invoice report setting was disabled. The accounting workflow now recognizes the relevant invoice report correctly, preventing a crash and keeping invoice delivery reliable.
Original PR description
Currently, a traceback is occurring when the user disabled the `is_invoice_report` for an invoice report and try to send and print an invoice. To reproduce this issue: 1) Install `Accounting` and…
Currently, a traceback is occurring when the user disabled the `is_invoice_report`
for an invoice report and try to send and print an invoice.
To reproduce this issue:
1) Install `Accounting` and enable debug mode
2) Open the `report_invoice_with_payments` report from
`settings/technical/actions/report`
3) Disable the `Invoice Report`
4) Now create a customer invoice and try to send and print
Error:-
```
TypeError: a bytes-like object is required, not 'dict'
```
When the user disabled the invoice report it directly returns content as a dict, eventually the raw values will be
```
raw: {
attachment: None,
stream: <_io.BytesIO object at 0x7fd38f10e3e0>
}
```
This leads to a traceback when `io.BytesIO(pdf_values['raw'])` is used to
on raw value
https://github.com/odoo/odoo/blob/330a3efbd09ea84ab44c64751087afcc19cee9d6/addons/account/models/ir_actions_report.py#L66-L68
https://github.com/odoo/odoo/blob/330a3efbd09ea84ab44c64751087afcc19cee9d6/addons/account/wizard/account_move_send.py#L417-L422
when the user disabled the is_invoice, and has the model `account.move`
We can consider that an invoice report. By doing this we can resolve this issue
sentry-5762537325Batch invoice emails now correctly choose the invoice PDF template, using the selected wizard template when available or the default template otherwise. This prevents missing or incorrect invoice attachments when sending multiple invoices at once.
Original PR description
In 431003bc0dadbca2a9aa2953483f6f3381b41df9 was added back the possibility to add dynamic reports and send then along side the invoice. In said commit, the invoice template was obtained using the field `[account.move.send].pdf_template_id. However, when sending mail in a batch, there is no record account.move.send in self (unlike when mailing a single record) and thus, no `pdf_template_id`. To remedy this problem, we can use the wizard value, when there is one, otherwise, we simply use `_get_default_pdf_template_id` which returns the default template. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a migration issue where blank spreadsheets created in older versions could stop database upgrades when the Documents app was installed. Empty spreadsheet content is now treated as a valid blank spreadsheet, helping migrations complete reliably.
Original PR description
Issue: ------ When migrating a database having 'Documents' module installed and also having empty/blank spreadsheets created in version saas-17.2 or lower will lead to a JSON decoder error. This…
Issue:
------
When migrating a database having 'Documents' module installed and also having empty/blank spreadsheets created in version saas-17.2 or lower will lead to a JSON decoder error. This happens when the 'spreadsheet_data' value become an empty `b''` because of empty spreadsheets.
Here :
https://github.com/odoo/enterprise/blob/17.0/spreadsheet_edition/models/spreadsheet_mixin.py#L224
Solution:
-----------
Passing an empty dictionay '{}' if it gets empty quotes as `b''` during processing.
Steps to reproduce:
------------------------
1. Create a database in version 17.2 or lower and install Documents module.
2. Create empty/blank spreadsheets (we can manually upload an empty spreadsheet).
3. Migrate the database to version saas~17.4 or above.
4. Finally, during testcases one of the test case will fail. Because of empty quotes.
Traceback:
```
File "/home/odoo/src/enterprise/saas-17.4/spreadsheet_edition/models/spreadsheet_mixin.py", line 44, in _compute_current_revision_uuid
snapshot = spreadsheet._get_spreadsheet_snapshot()
File "/home/odoo/src/enterprise/saas-17.4/spreadsheet_edition/models/spreadsheet_mixin.py", line 234, in _get_spreadsheet_snapshot
return json.loads(self.spreadsheet_data)
File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```
UPG - 2263261
TBG - 1416Expense and revenue budgets now include relevant credit notes and other analytic entries based on the linked account type, rather than relying only on whether amounts are positive or negative. This makes budget reports more accurate after bills, refunds, and credit notes, helping teams track actual spending and income more reliably.
Original PR description
**Steps to reproduce:** - Install Accounting - Activate "Budget Management" in Accounting settings - Create an analytic account: * Plan: [any] - Create a Budget: * Budget Type: Expense * Period: [the…
**Steps to reproduce:**
- Install Accounting
- Activate "Budget Management" in Accounting settings
- Create an analytic account:
* Plan: [any]
- Create a Budget:
* Budget Type: Expense
* Period: [the current month]
* A budget line with the created analytic account and any
budgeted amount
- Open the budget
- Create a bill:
* Vendor: [any]
* Bill Date: [a date in the current month]
* An invoice line with the analytic account
- Confirm the bill
- Check the Budget Report
=> The committed and achieved amounts of the budget is correctly set to the amount of the bill
- Create a credit note
- Check the Budget Report again
**Issue:**
The amount is unchanged.
The credit note is not taken into account.
**Cause:**
The computation is only taking into account the analytic lines with a negative amount for an expense budget and those with a
positive amount for a revenue budget, which is not correct.
In this case, the credit note has positive amount and therefore it is excluded from the expense budget.
**Solution:**
1) An expense budget should take into account all the analytic lines in an expense account and a revenue budget should do the same with all the analytic lines in an income account.
2) Analytic lines with an account that is not an income or an expense one should be ignored.
3) Analytic lines without an account should be taken into account for an expense-type budget if:
- the category is not "other" (the default category)
- the category is "other" and the amount is negative
4) Analytic lines without an account should be taken into account for a revenue-type budget if the category is "other" and the amount is positive.
opw-4214599