Thursday, September 12, 2024
8 changes · 17.0
Resolved issues and error corrections
Users were unable to close the share panel in the Knowledge application once it was opened. This fix resolves the issue by refining the logic that prevents the panel from closing—now it only stays open when a modal dialog is active, rather than blocking closure whenever any element has focus. This restores the expected behavior where users can easily toggle the share panel open and closed.
Original PR description
Currently, the share panel cannot be closed once it has been opened. This commit resolves the issue by preventing the share panel from closing only when the active element is a modal. Steps to…
Currently, the share panel cannot be closed once it has been opened. This commit resolves the issue by preventing the share panel from closing only when the active element is a modal. Steps to reproduce the issue: 1. Open Knowledge. 2. Click on the share button to open the share panel. 3. Click on the share button again to close the share panel. => The share panel remains open. TO BE: The share panel should close. Details: In the `KnowledgeTopbar` component, we added external event listeners to detect when the dropdown menu is opened, closed, or about to close. When the dropdown is about to close (i.e., when the `hide.bs.dropdown` event is triggered), we check if the active element is the HTML document. If the focus is on another element, we prevent the dropdown from closing. This mechanism was added to prevent the dropdown from closing when users are adding new members through the invite modal. Using the `useActiveElement` hook, the active element can change when a component is mounted. When the web editor in Knowledge is mounted, the active element becomes the editor toolbar. As a result, the active element is no longer the HTML document, and the event listener always prevents the dropdown from closing. To resolve this issue, we will now check if the active element is a modal before preventing the dropdown from closing. This ensures that the dropdown behaves as expected and the share panel can be closed when necessary. Reference: https://github.com/odoo/odoo/pull/175880 task-4179706
This fix resolves an issue where creating a new article from the Knowledge editor would incorrectly display the article in both the "workspace" and "private" sections of the sidebar. The fix prevents unnecessary updates to temporary records, ensuring new articles appear only in the "private" section as intended.
Original PR description
When the no-content helper is shown and the user clicks on the "New" button to create a new article, the sidebar lists the newly created article in the "workspace" and in the "private" section. This…
When the no-content helper is shown and the user clicks on the "New" button to create a new article, the sidebar lists the newly created article in the "workspace" and in the "private" section. This is an undesirable behavior as the newly created article should only appear in the "private" section. When no record is passed to the form view, the form view creates a virtual record. When the user clicks on the "New" button, the system will create a new article and open it using the `openArticle` function defined in the component environment. When calling the `openArticle` function, the function will check if the article has a title and, if it hasn't, it will fetch the first heading of the article and use it as title (see: `ensureArticleName`). If the record is not virtual, the function `openArticle` will then persist the changes made on the current record before opening the new record. For its part, the sidebar listens to the changes made on the loaded record (using a record observer) and updates its state based on the record changes. When calling the `ensureArticleName`, the title of the virtual record changes and the sidebar detects that change and adds a new entry for the virtual record. The sidebar will then add another entry for the newly created record. To fix the issue, the `openArticle` function will no longer call the `ensureArticleName` function when the current record is virtual. The virtual record state will hence no longer be updated when opening a new article. As a result, the sidebar will not detect any change and will no longer create an entry for the virtual record. Note that there was actually no reason to update the title of the virtual record as it gets discarded when leaving Knowledge. Steps to reproduce the issue: 1. Delete all articles from the database 2. Open the Knowledge editor (you should see the no-content helper) 3. Click on the "New" button => There is two entries for the new article: one in the "workspace" section and one in the "private" section. TO BE: There should only be one entry in the "private" section. task-4160386
This fix restores the ability to renew and upsell subscriptions that have been transferred to another company. Previously, a check was preventing renewal orders from being generated because the system couldn't access invoices from the original company. This update removes that problematic check, allowing subscriptions to continue functioning properly after company transfers.
Original PR description
This reverts commit 8bd19ee1dbba0c8dce36a20bdd1e99922084ea24. This fix prevented a valid use case from functioning: when transferring a subscription to another company, we lose access to the invoices made by the original company. Because of this we would incorrectly prevent the generation of renewal and upsell orders (The subscription was invoiced but invoice_ids does not reflect it). Other alernatives are also problematic like using invoice_status (which fluctuates for subscriptions) or last_invoice_date (Which could break if the next invoice date is changed manually). opw-4116538
This update fixes a crash that occurs when the Kenya eTIMS system attempts to fetch tax notices but the API returns an error. Previously, the system would fail with an error message instead of handling the situation gracefully. Now it properly manages API errors so the automated process can continue running without interruption.
Original PR description
When ```KE eTIMS: Fetch KRA notices from eTIMS``` cron runs and eTIMS API returns an error, a traceback will appear. Steps to reproduce the error: - Install ```l10n_ke_edi_oscu``` - Set up Kenya…
When ```KE eTIMS: Fetch KRA notices from eTIMS``` cron runs and eTIMS API returns
an error, a traceback will appear.
Steps to reproduce the error:
- Install ```l10n_ke_edi_oscu```
- Set up Kenya eTIMS Integration
- Run ```KE eTIMS: Fetch KRA notices from eTIMS``` cron
Traceback:
```
KeyError: 'noticeList'
File "odoo/tools/safe_eval.py", line 391, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "ir.actions.server(909,)", line 1, in <module>
File "home/odoo/src/enterprise/saas-17.4/l10n_ke_edi_oscu/models/l10n_ke_edi_oscu_notice.py", line 35, in _cron_l10n_ke_oscu_get_notices
notice_map = {notice['noticeNo']: notice for notice in data['noticeList']}
ValueError: <class 'KeyError'>: "noticeList" while evaluating
'model._cron_l10n_ke_oscu_get_notices()'
File "odoo/addons/base/models/ir_cron.py", line 562, in _callback
self.env['ir.actions.server'].browse(server_action_id).run()
File "home/odoo/src/custom/trial/saas_trial/models/sentry.py", line 33, in run
res = super().run()
File "odoo/addons/base/models/ir_actions.py", line 989, in run
res = runner(run_self, eval_context=eval_context)
File "addons/website/models/ir_actions_server.py", line 61, in _run_action_code_multi
res = super(ServerAction, self)._run_action_code_multi(eval_context)
File "odoo/addons/base/models/ir_actions.py", line 821, in _run_action_code_multi
safe_eval(self.code.strip(), eval_context, mode="exec", nocopy=True, filename=str(self)) # nocopy allows to return 'action'
File "odoo/tools/safe_eval.py", line 405, in safe_eval
raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr))
```
https://github.com/odoo/enterprise/blob/019a7cdd5a3071c0948656bdcacc95b63c2e8842/l10n_ke_edi_oscu/models/l10n_ke_edi_oscu_notice.py#L35 When eTIMS API returns an error, data will be empty,
So, it will lead to the above traceback.
sentry-5804573762, 5809459581This fix resolves a bug where the name of a time off allocation would be reset whenever the allocation type was changed. The issue occurred because the system was relying on an automatic field update that would overwrite the user's custom name. The fix ensures that custom names are preserved when users modify the allocation type.
Original PR description
### NOT FOR MASTER **17.0 -> Master - 0.1** Steps to reproduce the bug: - Go to Time Off -> Allocation -> Create - put a name - change the allocation type -> the name is reset Expected result: The name should not be reset to the old value Reason: The displayed name is relies on the private_name field to get its value. And thus every time an onchange is triggered the name is reset. Fix: Put the private_name field in the form view instead of the name field. Because we rely on the onchange of name on the dashboard to task-3713656 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix removes the date granularity selection option from relative and from/to date filters in spreadsheets, where it was not applicable. The granularity option now only appears for period-based filters, making the interface cleaner and less confusing for users.
Original PR description
[FIX] *_spreadsheet_*: useless filter date granularity option In task 3887844 we added the possibilty to select which date granularities were available for a given period global filter. But this options was also displayed for relative and from/to global filters, where it made no sense. Task: [4176679](https://www.odoo.com/odoo/2328/tasks/4176679)
A recent update removed a method that older client views still depend on, causing errors when selecting printers. This fix restores the method to prevent system errors and ensure printer selection works smoothly for all users.
Original PR description
We removed the ```select_iot``` method here https://github.com/odoo/enterprise/pull/68325 Since, the client's non-updated views still call it, and get a traceback. ```AttributeError: The method 'select_iot' does not exist on the model 'select.printers.wizard'``` We add it again to fix the issue. Sentry-5804153543
The Journal Report was crashing when automatically expanding journals on first load if the system encountered dividers or journal groups instead of actual journals. This fix ensures the report only auto-expands valid journal entries, preventing crashes when the report is reopened or used with multiple companies.
Original PR description
options['journals'] contains a list of dictionaries. In the typical case, they each will correspond to a selectable account.journal. Though, they can also contain journal groups, and in multicompany,…
options['journals'] contains a list of dictionaries. In the typical case, they each will correspond to a selectable account.journal. Though, they can also contain journal groups, and in multicompany, some of them may serve as dividers between companies (for ease of rendering in the template). Those latter elements will then have 'divider' under their 'id' key, instead of a model id. The Journal Report, when being opened for the first time unfolds the first available journal, by default, taking therefore the first element from options['journals'], generating a report line id from it, and adding this id under the 'unfolded_lines' of the options in its _custom_options_initializer. The thing is, doing so, no check was done that the id being used was indeed an account.journal's. A journal group id or 'divider' could also be used. When 'divider' was added, the report crashed as soon as the options were used as previous_options in a subsequent call to get_options, since it tried to parse it as an integer. We fix that by properly filtering the available journal ids to only contain actual account.journal ids.