Friday, June 14, 2024
2 changes · saas-17.2
Resolved issues and error corrections
Products found through barcode lookup can now be saved even when product variants are turned off in settings. The change prevents the system from trying to fill hidden variant details, avoiding an error during product creation or update.
Original PR description
Steps to reproduce : --------------------------- - Install pos and product barcodelookup - Go to settings disable variants - Try to scan a product having variants - Click on save button Issue : -------- Can't save and traceback comes. Cause : ---------- It was trying to set the variants but the variant field was not in the form as it's disabled from settings. Fix : ----- Create and set the attributes only if the variant is enabled.
Uploading an empty XML file to a customer invoice no longer creates an unnecessary error report. The system now records this expected issue as a warning, reducing monitoring noise without changing the user workflow.
Original PR description
Currently, an exception is occurring when the user tries to upload an empty XML file in customer invoices.
Steps to produce:
1) Install `Accounting`
2) Try to upload an empty `XML` file in customer invoices.
3) In the backend a logger exception is encountered.
Error:-
```
ValueError: can only parse strings
File "addons/account/models/ir_attachment.py", line 38, in _decode_edi_xml
xml_tree = etree.fromstring(content)
File "src/lxml/etree.pyx", line 3255, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1912, in lxml.etree._parseMemoryDocument
```
This causes noise in the sentry, So changing the exception to a warning can resolve this issue.
https://github.com/odoo/odoo/blob/14755d586a695df4c350f29e0c99c876c5811e4f/addons/account/models/ir_attachment.py#L40
sentry-4855416823
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr