Tuesday, June 4, 2024
56 changes · saas-17.3
Enhancements to existing features
Live chat now stores visitor information such as recent operator and page history in browser local storage instead of cookies. This follows modern browser guidance and reduces unnecessary cookie use while keeping the chat experience consistent.
Original PR description
The live chat uses cookies to save information such as the last operator ID or page history. However, the use of cookies as a way to save data is discouraged ([1]). This commit replaces the use of cookies in the live chat module with local storage. [1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#data_storage task-3965140
Appointment-related sales products are now presented more clearly by hiding planning options when they do not apply. Booking type checks are also narrowed to the most relevant products, helping keep appointment sales behavior more accurate and efficient.
Original PR description
### [IMP] sale_project_forecast: hide planning enable for other tracking This commit hide planning enabled field and related content for not project related type from product form view. ### [IMP] website_appointment_sale: improve filter in booking type computation This commit add more condition in booking type field computation so we only do query for product we that is closest to being booking_type. task-3959899
Resolved issues and error corrections
This fixes misplaced tooltips that appear when users hover over graph legends. The correction restores clear, predictable chart interactions so users can read graph details without confusion.
Code cleanup and technical improvements
The web module’s automated hotkey tests were simplified by removing an older helper that is no longer needed. This makes the test suite easier to maintain and helps ensure keyboard shortcut behavior remains reliably checked across operating systems.
Miscellaneous changes
Description of the issue this commit addresses: When creating an invoice line with the analytic module installed, if the analytic field is show, focusing in on a line adds a little height offset to the entire line which makes the view shaky. This is not wanted. --- Steps to reproduce: 1 - Install analytic app 2 - Open a new invoice and display the analytic field in the invoice lines 3 - Add a new line, don't add any data inside it. 4 - Focus out, focus in, focus out, focus in. 5
Original PR description
Description of the issue this commit addresses: When creating an invoice line with the analytic module installed, if the analytic field is show, focusing in on a line adds a little height offset to…
Description of the issue this commit addresses: When creating an invoice line with the analytic module installed, if the analytic field is show, focusing in on a line adds a little height offset to the entire line which makes the view shaky. This is not wanted. --- Steps to reproduce: 1 - Install analytic app 2 - Open a new invoice and display the analytic field in the invoice lines 3 - Add a new line, don't add any data inside it. 4 - Focus out, focus in, focus out, focus in. 5 - You can see that focus in adds a few px and focus out removes them. --- Desired behavior after this commit is merged: This commit adds a fixed default height to the analyti widget to make sure there is no weird height computation when the focus happens. This way, we can make sure that the line height stays constant whether the focus is in or out of the line. --- no task-feedback --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167723
Opening a chat channel now correctly clears its pending action counter. This prevents users from seeing stale unread or action-required indicators after they have already viewed the channel.
Original PR description
Before this PR, needaction counter was not properly cleared when opening a channel. This PR uses the counter value to determine if it needs to be cleared instead of `needactionMessage` value that is updated too early in the process.
A self-ordering test was failing in environments without demo data because the point-of-sale setup lacked a payment method. The change adds the required payment method in the test setup, helping automated checks run reliably without affecting customers.
Original PR description
The test was failing with no-demo because there wad no payment method configured for the pos config. This commit adds a payment method to the pos config. Runbot error ID: 66015, 66010, 66011, 66012, 66013, 66014
This change fixes failing automated tests related to accounting screens and menu navigation. It prevents unnecessary repeated clicks and blocks outside service calls during tests, helping keep nightly validation reliable without changing customer-facing features.
Original PR description
[FIX] account: invoice plus nightly tests With the invoice plus PR, nightly tests have started to fail. - test_01_account_tax_groups_tour: Build Error 66350 - in community, the home icon was clicked twice [FIX] web: click everywhere external calls The click everywhere test will open the accounting dashboard which makes API calls to the odoofin server. This possible fix mocks those calls to avoid the `External requests verboten` warning - test_01_click_apps_menus_as_admin: Build Error 66388
The mail app now shows the new message separator only in the conversation where the unread message actually belongs. This prevents confusing markers from appearing in views like Starred, Inbox, or History when users browse messages outside the original thread.
Original PR description
Before this PR, the new message separator could be displayed in threads other than the one the message belongs to (e.g., Inbox, Starred, and History mailboxes). This PR restricts the new message separator to the thread the message belongs to. Steps to reproduce the issue: - Go to the general channel. - Mark a message as unread and star it. - Go to the Starred mailbox. - The separator is shown.
This update fixes failing automated accounting checks after recent invoice changes. It helps keep bank reconciliation and accountant onboarding flows reliable, reducing the risk of issues reaching users.
Original PR description
with the invoice plus PR, some tours and tests are failing on runbot - test_tour_bank_rec_ui: Build Error 66365 - this tour contained a step that depends on account_reports. patch is added to account reports - test_accountant_tour: Build Error 66371 - The bill guide containing button `action_create_vendor_bill` (create vendor bill from sample) is only available on empty Purchase Journals. A new journal is created in the admin user's company
Issue: ------ In the input of a float factor field, it is not possible to use the ‘,’ as a decimal point, even if this is defined in the localization. This is because the value is calculated via: ```js let factorValue = value / this.props.factor; ``` does not work with `value = ‘x,y’` and will return `NaN`. Solution: --------- Parser the value by calling super to fallback on `parseFloat` which takes localization into account. opw-3932813 Forward-Port-Of: odoo/odoo#166822
Original PR description
Issue: ------ In the input of a float factor field, it is not possible to use the ‘,’ as a decimal point, even if this is defined in the localization. This is because the value is calculated via: ```js let factorValue = value / this.props.factor; ``` does not work with `value = ‘x,y’` and will return `NaN`. Solution: --------- Parser the value by calling super to fallback on `parseFloat` which takes localization into account. opw-3932813 Forward-Port-Of: odoo/odoo#166822
Ubuntu Noble (24.04) now provides [python3-websocket 1.7.0](https://packages.ubuntu.com/noble/python3-websocket). The websocket rate limiting tests asserts that an exception occurs when the code 1013 is returned because this code was not supported in [python3-websocket 1.2.3](https://packages.ubuntu.com/jammy/python3-websocket) provided by Ubuntu Jammy (22.04). Support was added in [websocket 1.3.0](https://github.com/websocket-client/websocket-client/commit/a28a016584f82cfca30a09a59ecd764569
Original PR description
Ubuntu Noble (24.04) now provides [python3-websocket 1.7.0](https://packages.ubuntu.com/noble/python3-websocket). The websocket rate limiting tests asserts that an exception occurs when the code 1013 is returned because this code was not supported in [python3-websocket 1.2.3](https://packages.ubuntu.com/jammy/python3-websocket) provided by Ubuntu Jammy (22.04). Support was added in [websocket 1.3.0](https://github.com/websocket-client/websocket-client/commit/a28a016584f82cfca30a09a59ecd764569c2fa3f) With this commit, presence of the status code in the lib is verified and the test is adapted accordingly. Forward-Port-Of: odoo/odoo#166899
Steps: - Install sale and editor apps. - Click on varient new button. - Add something in the description. - Discard that record. Issue: - Traceback component destroyed. Cause: - `commit_changes` does not had await on it and because of that it was performing other operations before actually commit changes and we are actully destroying record in `commit_changes` so there is no point doing other operations. Fix: - Add await and remove urgent from `commit_changes` method in-order t
Original PR description
Steps: - Install sale and editor apps. - Click on varient new button. - Add something in the description. - Discard that record. Issue: - Traceback component destroyed. Cause: - `commit_changes` does not had await on it and because of that it was performing other operations before actually commit changes and we are actully destroying record in `commit_changes` so there is no point doing other operations. Fix: - Add await and remove urgent from `commit_changes` method in-order to properly unmount component. opw-3892602 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164151
**Steps to reproduce:** - open attendance module - go to overview and create a new attendance within 5:30 AM **Issue:** - Extra hours[overtime_hours] are not calculated accurately[output = 0]. **Cause:** The [SQL Query](https://github.com/odoo/odoo/blob/17.0/addons/hr_attendance/models/hr_attendance.py#L77-L91) [condition : date_trunc('day',att.check_in) = date_trunc('day', ot.date)] compares `att.check_in` time stored in UTC with `ot.date` stored in employee timezone, leading to inco
Original PR description
**Steps to reproduce:** - open attendance module - go to overview and create a new attendance within 5:30 AM **Issue:** - Extra hours[overtime_hours] are not calculated accurately[output = 0].…
**Steps to reproduce:**
- open attendance module
- go to overview and create a new attendance within 5:30 AM
**Issue:**
- Extra hours[overtime_hours] are not calculated accurately[output = 0].
**Cause:**
The [SQL Query](https://github.com/odoo/odoo/blob/17.0/addons/hr_attendance/models/hr_attendance.py#L77-L91)
[condition : date_trunc('day',att.check_in) = date_trunc('day', ot.date)] compares `att.check_in` time stored in UTC with `ot.date` stored in employee timezone, leading to incorrect calculations.
**Solution:**
Modify SQL query to convert `att.check_in` time to employee timezone before comparison with `ot.date`.
In saas-16.4, This [SQL Query](https://github.com/odoo/odoo/blob/saas-16.4/addons/hr_attendance/report/hr_attendance_report.py#L40-L46) is responsible for converting `check_in` time to employee
timezone.
Description of the issue/feature this PR addresses:
**Current behavior before PR:**
RUNBOT-17.0

**Desired behavior after PR is merged:**

UPG - 1573228
TASK - 3900287
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#167574
Forward-Port-Of: odoo/odoo#166302Create a branch company [TEST] With [TEST] selected crete a new expense Issue: Taxes from parent company cannot be selected This occurs because we limit the domain to taxes of the current company, without considering the parent opw-3939722 Forward-Port-Of: odoo/odoo#167572
Original PR description
Create a branch company [TEST] With [TEST] selected crete a new expense Issue: Taxes from parent company cannot be selected This occurs because we limit the domain to taxes of the current company, without considering the parent opw-3939722 Forward-Port-Of: odoo/odoo#167572
Steps to reproduce [17.0]: - Go to website (in "Edit" mode) > Click on the "Contact Us" button - Save the page > The menu will be saved with the "oe_edited_link" class applied to it. Technical explanation (one of many scenarios causing the bug) [1]: After the website headers redesign in [2], two header navbars were added (for the desktop view and mobile). Which means that the "Contact Us" field is duplicated in the DOM. When clicking on the "Contact Us" desktop link, the `LinkPop
Original PR description
Steps to reproduce [17.0]: - Go to website (in "Edit" mode) > Click on the "Contact Us" button - Save the page > The menu will be saved with the "oe_edited_link" class applied to it. Technical…
Steps to reproduce [17.0]: - Go to website (in "Edit" mode) > Click on the "Contact Us" button - Save the page > The menu will be saved with the "oe_edited_link" class applied to it. Technical explanation (one of many scenarios causing the bug) [1]: After the website headers redesign in [2], two header navbars were added (for the desktop view and mobile). Which means that the "Contact Us" field is duplicated in the DOM. When clicking on the "Contact Us" desktop link, the `LinkPopoverWidget` will initialize a popover on it. The bootstrap code is automatically adding `data-original-title` and 'title' attributes to the targeted link (see: [3]), and as a consequence, the field observer will take in consideration the mutations and copy the DOM in the mobile version, leading to save the link in the same state when the BS popover was applied to it (with the `oe_edited_link` class). Remarks: - This behaviour was detected on 17.0, but we target 15.0 here to prevent similar issues linked to duplicated fields with links in the DOM. - The bootstrap attributes mutations (as explained in [1]) are just an example of many possible mutations (filtered by `observerUnactive()` in the main editor observer) that can cause the issue... Since we cannot set filters for all these mutations in the fields' observer, we ignore the `oe_edited_link` (and all editor's rendering classes) when copying the field content to solve the issue here. The field observer logic needs to be refactored to probably disable / enable the fields' synchronization when the editor's observer is disabled / enabled. [2]: https://github.com/odoo/odoo/pull/119650 [3]: https://github.com/odoo/odoo/blob/15.0/addons/web/static/lib/bootstrap/js/tooltip.js#L664 opw-3938383 Forward-Port-Of: odoo/odoo#167619 Forward-Port-Of: odoo/odoo#166736
- Re-using results for domains duplicated - Ordering by id instead of default heavy unused order Opening a POS sessions our SQL profiler shows the following query executed too many times: - <img width="770" alt="Screenshot 2024-05-07 at 8 41 09 a m" src="https://github.com/odoo/odoo/assets/6644187/80d7ac19-a042-40bc-a525-063b4074ec0e"> Checking the PY profilers the following method is reported as slow: https://github.com/odoo/odoo/blob/42f5e84eeb1d649feed5e032d65ff74d148b49b8/addons/po
Original PR description
- Re-using results for domains duplicated - Ordering by id instead of default heavy unused order Opening a POS sessions our SQL profiler shows the following query executed too many times: - <img…
- Re-using results for domains duplicated
- Ordering by id instead of default heavy unused order
Opening a POS sessions our SQL profiler shows the following query executed too many times:
- <img width="770" alt="Screenshot 2024-05-07 at 8 41 09 a m" src="https://github.com/odoo/odoo/assets/6644187/80d7ac19-a042-40bc-a525-063b4074ec0e">
Checking the PY profilers the following method is reported as slow:
https://github.com/odoo/odoo/blob/42f5e84eeb1d649feed5e032d65ff74d148b49b8/addons/pos_coupon/models/coupon_program.py#L80
- <img width="1508" alt="Screenshot 2024-05-07 at 8 42 17 a m" src="https://github.com/odoo/odoo/assets/6644187/e46b60f0-cac2-480b-b588-d681f0bc5607">
The reason it is executing the same query too many times with the same domain
So, I have created this change to re-use the result if the domain is repeated
Also, the query generated has heavy `order by`
`order by "res_partner"."type", coalesce("res_partner"."is_company", false) desc, "res_partner"."display_name", "res_partner"."id"; `
Replacing by `order by "res_partner"."id"` it is faster
Before `Execution Time: 104.256 ms`
Now `Execution Time: 31.802 ms`
So, it is ~4x faster for each query and it is re-using data for the same query using a LRU-Cache locally in the method
Manual Forward-Port-Of: https://github.com/odoo/odoo/pull/164771 since the module was renamed and the python code refactored so the bot was not able to forward-port it automatically from https://github.com/odoo/odoo/pull/166447
Also, i didn't find the part of the partners in this new version
Forward-Port-Of: odoo/odoo#166608see also: https://github.com/odoo/enterprise/pull/63708 Forward-Port-Of: odoo/odoo#167738
Original PR description
see also: https://github.com/odoo/enterprise/pull/63708 Forward-Port-Of: odoo/odoo#167738
For +100 on 5v: 160100 VAT credit For -100 on 4v: 260100 VAT debt task-3940102 opw-3938527 Forward-Port-Of: odoo/odoo#167731
Original PR description
For +100 on 5v: 160100 VAT credit For -100 on 4v: 260100 VAT debt task-3940102 opw-3938527 Forward-Port-Of: odoo/odoo#167731
Removed a work location column in the employee list view that is not relevant when the homeworking module is installed. Task-3933447 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166020
Original PR description
Removed a work location column in the employee list view that is not relevant when the homeworking module is installed. Task-3933447 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166020
Adds a bit more information regarding one option for hotkeys. Forward-Port-Of: odoo/odoo#167716
Original PR description
Adds a bit more information regarding one option for hotkeys. Forward-Port-Of: odoo/odoo#167716
Steps to reproduce: - Install Time off module - Create a public holiday with Working Hours 'calendar_id' - Go to env user Time off dashboard Current behavior before PR: The public holidays that has 'calendar_id' assigned to it will not be shown in Legend when checking the dashboard of the env user. This is happening because we assign the self 'hr.employee' with the employee_id in context https://github.com/odoo/odoo/blob/c6142d9f1432cfabedcaa7264af9e5bc8e538c20/addons/hr_holidays/model
Original PR description
Steps to reproduce: - Install Time off module - Create a public holiday with Working Hours 'calendar_id' - Go to env user Time off dashboard Current behavior before PR: The public holidays that has…
Steps to reproduce:
- Install Time off module
- Create a public holiday with Working Hours 'calendar_id'
- Go to env user Time off dashboard
Current behavior before PR:
The public holidays that has 'calendar_id' assigned to it will not be shown in Legend when checking the dashboard of the env user. This is happening because we assign the self 'hr.employee' with the employee_id in context https://github.com/odoo/odoo/blob/c6142d9f1432cfabedcaa7264af9e5bc8e538c20/addons/hr_holidays/models/hr_employee.py#L313 and in '_get_contextual_employee' we just check if employee_id exists in ctx or not
https://github.com/odoo/odoo/blob/17.0/addons/hr_holidays/models/hr_employee.py#L388:L392
but we don't check the value so if ctx is like {'employee_id': None} it will return None.
Desired behavior after PR is merged:
We are now checking if the 'employee_id' in ctx
has a valid value as if it is not we need to return the employee object of the env user.
Other solution that we can add in this line https://github.com/odoo/odoo/blob/c6142d9f1432cfabedcaa7264af9e5bc8e538c20/addons/hr_holidays/models/hr_employee.py#L313 to check if the self._get_contetxtual_employee is None we assign self to self.env.user.employee_id
opw-3863947
Forward-Port-Of: odoo/odoo#166548Steps: - Create a database on SaaS - Activate debug mode - Load demo data if not enabled - Install one of the module that use this template Actual result: - Module X installed - Demo data not loaded properly, traceback Expected result - Module X installed - Demo data loaded Initial PR on enterprise: https://github.com/odoo/enterprise/pull/63328 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167696
Original PR description
Steps: - Create a database on SaaS - Activate debug mode - Load demo data if not enabled - Install one of the module that use this template Actual result: - Module X installed - Demo data not loaded properly, traceback Expected result - Module X installed - Demo data loaded Initial PR on enterprise: https://github.com/odoo/enterprise/pull/63328 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167696
Currently, an exception is generated when the user tries to access embed view of slides by following the steps: - Install "eLearning" with a demo data - Open external embed view of slide 1 by "/slides/embed_external/1" in url Stack Trace: ``` AttributeError: 'slide.channel' object has no attribute 'website_share_url' File "<1405>", line 313, in template_1405 File "<1405>", line 151, in template_1405_content File "<1405>", line 18, in template_1405_t_call_0 QWebException: Error
Original PR description
Currently, an exception is generated when the user tries to access embed view of slides by following the steps: - Install "eLearning" with a demo data - Open external embed view of slide 1 by…
Currently, an exception is generated when the user tries to access embed view of slides by following the steps: - Install "eLearning" with a demo data - Open external embed view of slide 1 by "/slides/embed_external/1" in url Stack Trace: ``` AttributeError: 'slide.channel' object has no attribute 'website_share_url' File "<1405>", line 313, in template_1405 File "<1405>", line 151, in template_1405_content File "<1405>", line 18, in template_1405_t_call_0 QWebException: Error while render the template AttributeError: 'slide.channel' object has no attribute 'website_share_url' Template: ir.ui.view(1405,) Path: /t/html/body/div/div[2]/t[1]/t/t[4] Node: <t t-set="include_embed" t-value="True"/> ``` This error is because commit [1] added code that tries to access the 'website_share_url' field in the 'slide.channel' model in template 'embed_slide' , but it actually belongs to 'slide.slide'. This commit resolved the above issue by accessing "website_share_url" with "slide" instead of "slide.channel". [1] - https://github.com/odoo/odoo/commit/db63c03af9932ae4d9b786620e88e62ce938589a sentry-5095823727 Forward-Port-Of: odoo/odoo#159561 Forward-Port-Of: odoo/odoo#159238
Ensures that the exhibitor level badge is correctly displayed, as it was shown on a separate column for longer sponsor names. Now, it always appears inline, after the name of the sponsor. Task-3874059 Forward-Port-Of: odoo/odoo#162987
Original PR description
Ensures that the exhibitor level badge is correctly displayed, as it was shown on a separate column for longer sponsor names. Now, it always appears inline, after the name of the sponsor. Task-3874059 Forward-Port-Of: odoo/odoo#162987
[FIX] base_import_module: fix the tree view Steps to Reproduce: When we click on tree view of industry its showing the error that can't fetch record they might have been deleted. Issue: In Kanban, it works because we passed the context on the xml side, however in the tree view, we can't access those contexts, and because the modules aren't stored, we only get the resId as -1. Fix: So we restricted the click and no redirect on the tree view, and as an alternative, we introduc
Original PR description
[FIX] base_import_module: fix the tree view Steps to Reproduce: When we click on tree view of industry its showing the error that can't fetch record they might have been deleted. Issue: In Kanban, it works because we passed the context on the xml side, however in the tree view, we can't access those contexts, and because the modules aren't stored, we only get the resId as -1. Fix: So we restricted the click and no redirect on the tree view, and as an alternative, we introduced a More Info button that redirects us to the form view. Task - 3834095 Forward-Port-Of: odoo/odoo#166470
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156944
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156944
Current behaviour before commit: When background color is applied on text, the text becomes somewhat invisible in dark mode. Desired behaviour after commit: Now, when background color is applied on text, opacity of 60% is applied to the color. Due to this text becomes somewhat visible. task-3273315 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166325 Forward-Port-Of: odoo/odoo#129700
Original PR description
Current behaviour before commit: When background color is applied on text, the text becomes somewhat invisible in dark mode. Desired behaviour after commit: Now, when background color is applied on text, opacity of 60% is applied to the color. Due to this text becomes somewhat visible. task-3273315 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166325 Forward-Port-Of: odoo/odoo#129700
Problem -------- https://github.com/odoo/odoo/pull/156655 hides the miscellaneous entry total if there is a discrepancy between the journal currency and journal's default account currency. This fix is not ideal as the total is the sum of the balance field (company currency), while the displayed total uses the journal currency. Since this could be a foreign bank account, the journal currency is correct. Solution -------- Sum the `amount_currency` field instead of the `balance` field.
Original PR description
Problem -------- https://github.com/odoo/odoo/pull/156655 hides the miscellaneous entry total if there is a discrepancy between the journal currency and journal's default account currency. This fix is not ideal as the total is the sum of the balance field (company currency), while the displayed total uses the journal currency. Since this could be a foreign bank account, the journal currency is correct. Solution -------- Sum the `amount_currency` field instead of the `balance` field. Extra ------- A test was mistakenly removed in https://github.com/odoo/odoo/pull/158014, take this opportunity to bring it back https://github.com/odoo/odoo/commit/7ef468402d327855ee6323b6a7f82ac6989ee28a#r141889189 opw-3767010 Forward-Port-Of: odoo/odoo#165441
How to reproduce the issue: - create a leave type that allows negative amounts - create an accrual plan (demo seniority plan works) - create an accrual allocation for an employee on the leave type - set the number of days to 1 - go on the employee dashboard for time off - create a leave in the near future (in the current month) - create a second leave in the same period - ensure with the balance on the day of the latest leave that the balance is negative - run the cron "Time Off: Cance
Original PR description
How to reproduce the issue: - create a leave type that allows negative amounts - create an accrual plan (demo seniority plan works) - create an accrual allocation for an employee on the leave type - set the number of days to 1 - go on the employee dashboard for time off - create a leave in the near future (in the current month) - create a second leave in the same period - ensure with the balance on the day of the latest leave that the balance is negative - run the cron "Time Off: Cancel invalid leaves" Behaviour prior to this commit: The latest leave is cancelled. Intended behaviour: Since the leave is valid according to the leave type configuration, it should not have been cancelled. The leave cancelled should only be made in the case of an excess over the limit in negatives. task-3879156 Forward-Port-Of: odoo/odoo#166929 Forward-Port-Of: odoo/odoo#162643
With the popup-styled cookies bar, the cookies policy page is unreadable. It is also the case with all cookies bar with a backdrop. The "discrete" and "classic" bars can also potentially hide the last paragraph(s) of the page. To avoid that, this commit adds a button to toggle the bar on that page. Note that the cookies policy page could be on any URL, but it has to be referenced in the `a.o_cookies_bar_text_policy` link within the cookies bar. task-3733860 Forward-Port-Of: odoo/odo
Original PR description
With the popup-styled cookies bar, the cookies policy page is unreadable. It is also the case with all cookies bar with a backdrop. The "discrete" and "classic" bars can also potentially hide the last paragraph(s) of the page. To avoid that, this commit adds a button to toggle the bar on that page. Note that the cookies policy page could be on any URL, but it has to be referenced in the `a.o_cookies_bar_text_policy` link within the cookies bar. task-3733860 Forward-Port-Of: odoo/odoo#167331 Forward-Port-Of: odoo/odoo#162386
VAT should be accounted for on gift card rewards (when necessary). To allow that, we will start considering the taxes set on the reward product. As it is enforced that no taxes are set on that product on creation, we are sure that if a tax is set on the product, it can safely be applied on the reward line. opw-3817604 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164391
Original PR description
VAT should be accounted for on gift card rewards (when necessary). To allow that, we will start considering the taxes set on the reward product. As it is enforced that no taxes are set on that product on creation, we are sure that if a tax is set on the product, it can safely be applied on the reward line. opw-3817604 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164391
Since #152894, newly-created accounts are automatically assigned the account tags of their closest preceding account in the CoA. Unfortunately, the tags that get automatically assigned to the transfer, suspense and outstanding accounts are incorrect: * Suspense account and outstanding accounts get tags (ABIV, 2780), but should have tags (ABIV, 2300). * Transfer account gets tags (ABII4, 2885) but should have tags (ABIV, 2885). As such, we need to set the tags to the correct ones. Ta
Original PR description
Since #152894, newly-created accounts are automatically assigned the account tags of their closest preceding account in the CoA. Unfortunately, the tags that get automatically assigned to the transfer, suspense and outstanding accounts are incorrect: * Suspense account and outstanding accounts get tags (ABIV, 2780), but should have tags (ABIV, 2300). * Transfer account gets tags (ABII4, 2885) but should have tags (ABIV, 2885). As such, we need to set the tags to the correct ones. Taskid: 3060790 Forward-Port-Of: odoo/odoo#166995
Before this commit, the "open/close persisted channel" test was sometimes failing. The test checks that a persisted channel can be closed. The issue occurs because the test does not make sure that the channel is persisted before closing the chat window. This PR fixes the issue. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submi
Original PR description
Before this commit, the "open/close persisted channel" test was sometimes failing. The test checks that a persisted channel can be closed. The issue occurs because the test does not make sure that the channel is persisted before closing the chat window. This PR fixes the issue. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167335
Problem: In kiosk, when a person has a command with a price of 0.00, he doesn't have an order number Steps to reproduce: - Install "Point of Sale" app - In POS settings, create a kiosk shop and set "Self Ordering" to "Kiosk" - Go to product and set a price of 0.00 to a product - Open the kiosk session and order the product with the price of 0.00 - Click on "Pay" and you'll be back to the reception page without having your order number opw-3877596 --- I confirm I have signed t
Original PR description
Problem: In kiosk, when a person has a command with a price of 0.00, he doesn't have an order number Steps to reproduce: - Install "Point of Sale" app - In POS settings, create a kiosk shop and set "Self Ordering" to "Kiosk" - Go to product and set a price of 0.00 to a product - Open the kiosk session and order the product with the price of 0.00 - Click on "Pay" and you'll be back to the reception page without having your order number opw-3877596 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166406 Forward-Port-Of: odoo/odoo#165556
For version 17.0 only Problem: In restaurant, in the product page, we don't have anything to remind which table is selected Steps to reproduce: - Install "Point of Sale" app and "pos_restaurant" module - Open a restaurant session - Click on a table, the product page is loaded and we don't see the table number in the navbar Note: Solution copied from version 17.1 opw-3929069 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Po
Original PR description
For version 17.0 only Problem: In restaurant, in the product page, we don't have anything to remind which table is selected Steps to reproduce: - Install "Point of Sale" app and "pos_restaurant" module - Open a restaurant session - Click on a table, the product page is loaded and we don't see the table number in the navbar Note: Solution copied from version 17.1 opw-3929069 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166595 Forward-Port-Of: odoo/odoo#165578
We prepare the following fix by adding a modelParam getter that can be overridden by sub-classes. How to reproduce: 1. Schedule an activity for a document. 2. Go to activity view. 3. Select the document to preview in the inspector. 4. Rename the document. 5. Refresh the page. The document name is not renamed. In the kanban and list view, the document is updated because multiEdit model parameter is enabled. It is not the case for the activity view. Similarly to what is done in li
Original PR description
We prepare the following fix by adding a modelParam getter that can be overridden by sub-classes. How to reproduce: 1. Schedule an activity for a document. 2. Go to activity view. 3. Select the document to preview in the inspector. 4. Rename the document. 5. Refresh the page. The document name is not renamed. In the kanban and list view, the document is updated because multiEdit model parameter is enabled. It is not the case for the activity view. Similarly to what is done in list and kanban controller, we add a modelParam getter to the activity controller to allow to override the parameters in subclasses which will allows to enable the multiEdit parameter in the document activitty controller. Task-3817795 Forward-Port-Of: odoo/odoo#166430 Forward-Port-Of: odoo/odoo#158874
Steps to reproduce: =============== - Create new POS - Tick Is a Bar/Restaurant option - Create new floor - Add a table Issue: ===== On adding a new table, table is added but does not reflect on the floor. Cause: ====== On adding new floor the length of floor was not updated which leads to the issue. Fix: === After this commit floor length is currently updated. task-3888097 Forward-Port-Of: odoo/odoo#167035 Forward-Port-Of: odoo/odoo#163708
Original PR description
Steps to reproduce: =============== - Create new POS - Tick Is a Bar/Restaurant option - Create new floor - Add a table Issue: ===== On adding a new table, table is added but does not reflect on the floor. Cause: ====== On adding new floor the length of floor was not updated which leads to the issue. Fix: === After this commit floor length is currently updated. task-3888097 Forward-Port-Of: odoo/odoo#167035 Forward-Port-Of: odoo/odoo#163708
With an Uganda company setup Create an invoice to Uganda customer Try to register a payment Error "You can't register payments for both inbound and outbound moves at the same time" This occurs because the Taxes payable account type is set to Liability Payable, so the tax line will be detected as possible receivable by the payment wizard creating the issue opw-3944574 Forward-Port-Of: odoo/odoo#166556
Original PR description
With an Uganda company setup Create an invoice to Uganda customer Try to register a payment Error "You can't register payments for both inbound and outbound moves at the same time" This occurs because the Taxes payable account type is set to Liability Payable, so the tax line will be detected as possible receivable by the payment wizard creating the issue opw-3944574 Forward-Port-Of: odoo/odoo#166556
Description of the issue/feature this PR addresses: If the user has two invoices/bills selected where one falls within the parameters of a discounted payment and the other does not, the calculated payment total and payment difference will be wrong. Current behavior before PR: If I have two Bills, both for $25.00 where one falls within the parameters of a discount for 2% in 10 Days and the other doesn't, and I select both of them and click register payment, and the select "Group Payments" (g
Original PR description
Description of the issue/feature this PR addresses: If the user has two invoices/bills selected where one falls within the parameters of a discounted payment and the other does not, the calculated…
Description of the issue/feature this PR addresses: If the user has two invoices/bills selected where one falls within the parameters of a discounted payment and the other does not, the calculated payment total and payment difference will be wrong. Current behavior before PR: If I have two Bills, both for $25.00 where one falls within the parameters of a discount for 2% in 10 Days and the other doesn't, and I select both of them and click register payment, and the select "Group Payments" (group_payment), the "Amount" (amount) will be $0.50 and the Payment Difference (payment_difference) will be $49.50. Desired behavior after PR is merged: In the same scenario, I would expect the "Amount" to be $49.50 and the "Payment Difference" to be $0.50 To Reproduce: - Create Payment Term "2% 10, Net 30" this payment term should be configured to have a discount of 2% if paid in the first 10 days, and then 100% of the bill is due in 30 Days. - Create two Purchase Orders (doesn't matter which products you purchase), receive products, and create bills. Make sure one has the new payment term you created and its bill date puts it within the discount parameters. The other bill should either have a different payment term that doesn't have a discount or the same term but not be within the parameters to have the discount apply (bill is older than 10 days in this case) - Go to Accounting --> Vendors --> Bills and select both of these new bills and click "Register Payment" - In the wizard, click "Group Payments" and you will see the amount and payment difference are incorrect. **This process can also be done with sale orders instead, you will get the same result with two invoices for customers. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167214 Forward-Port-Of: odoo/odoo#165539
To facilitate the usage of the router in custom webclients like the Knowledge portal, `url-state` conversion functions are attached to the router object to allow patching them, in order to handle a custom router state. task-3743416 Forward-Port-Of: odoo/odoo#166994
Original PR description
To facilitate the usage of the router in custom webclients like the Knowledge portal, `url-state` conversion functions are attached to the router object to allow patching them, in order to handle a custom router state. task-3743416 Forward-Port-Of: odoo/odoo#166994
Issue ---- Demo company data contains a phone number of a real person, who receives phone calls from peolple asking to buy stuff :) Steps ---- Number is available on website footer. Cause ---- A real number is used in demo data. opw-3853066 Forward-Port-Of: odoo/odoo#164545
Original PR description
Issue ---- Demo company data contains a phone number of a real person, who receives phone calls from peolple asking to buy stuff :) Steps ---- Number is available on website footer. Cause ---- A real number is used in demo data. opw-3853066 Forward-Port-Of: odoo/odoo#164545
The Early Payment Discount (EPD) functionality is designed to work only with payment terms that include a single 100% line. A validation error is correctly displayed if a user attempts to create an EPD with multiple term lines. However, a bug existed where users could create a regular payment term with multiple lines, save it, and then enable the EPD, bypassing the validation. This allowed the record to be saved without error, leading to a traceback when the system later attempted to process
Original PR description
The Early Payment Discount (EPD) functionality is designed to work only with payment terms that include a single 100% line. A validation error is correctly displayed if a user attempts to create an EPD with multiple term lines. However, a bug existed where users could create a regular payment term with multiple lines, save it, and then enable the EPD, bypassing the validation. This allowed the record to be saved without error, leading to a traceback when the system later attempted to process the EPD, as it does not support multiple term lines. opw-3945596 Forward-Port-Of: odoo/odoo#167732
Issue ----- When a partner has a valid peppol endpoint set but no bank account or country set, the user may not realize that the automatic generation for an electronic document has failed. For example when creating an invoice automatically for a subscription, there will only be an error note from odoobot, but no warning for the user like when creating an invoice manually. Fix ----- Display a warning to the user if some information is missing that would result in failling to generate the e
Original PR description
Issue ----- When a partner has a valid peppol endpoint set but no bank account or country set, the user may not realize that the automatic generation for an electronic document has failed. For example when creating an invoice automatically for a subscription, there will only be an error note from odoobot, but no warning for the user like when creating an invoice manually. Fix ----- Display a warning to the user if some information is missing that would result in failling to generate the expected electronic document. opw-3720730 Forward-Port-Of: odoo/odoo#163724
Steps to reproduce: - Open project and create a task with some allocated time - Create a sub task and log some time sheets in both main task and sub-task - Share the main task to portal user - Open show the portal view and open the task Issue: - You can see that total time is missing. Cause: - Non existent constraint in the condition Solution: - Removing the constraint and changing with the correct constraint - The constraint is changed in the PR - https://github.com/o
Original PR description
Steps to reproduce: - Open project and create a task with some allocated time - Create a sub task and log some time sheets in both main task and sub-task - Share the main task to portal user - Open show the portal view and open the task Issue: - You can see that total time is missing. Cause: - Non existent constraint in the condition Solution: - Removing the constraint and changing with the correct constraint - The constraint is changed in the PR - https://github.com/odoo/odoo/pull/128407 - from timesheets_by_subtask to task.subtask_effective_hours task-3862095 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161816
**Current behavior:** When editing an email template with a link, it will get removed when switching in/out of the codeview editor even if it has some useful value. **Expected behavior:** These links will not be removed. **Steps to reproduce:** *Install sale_stock* 1. Go to email templates, select `Shipping: Send by Email` 2. Select the body content, activate the codeview editor mode 3. Some content has been removed, while codeview editor is open, reset the template and o
Original PR description
**Current behavior:**
When editing an email template with a link, it will get removed
when switching in/out of the codeview editor even if it has some
useful value.
**Expected behavior:**
These links will not be removed.
**Steps to reproduce:**
*Install sale_stock*
1. Go to email templates, select `Shipping: Send by Email`
2. Select the body content, activate the codeview editor mode
3. Some content has been removed, while codeview editor is open,
reset the template and observe the change
4. This results in a delivery order email not having the
tracking link in its body
**Cause of the issue:**
On codeview save, we remove empty links- however some links may
have a t-out value and are still lost.
**Fix:**
Check for a t-attribute in the link node's attributes before
removing it.
opw-3919379
Forward-Port-Of: odoo/odoo#167150This will fix the file exported for the eco voucher with Monizze. Task: 3895296 Forward-Port-Of: odoo/enterprise#62189
Original PR description
This will fix the file exported for the eco voucher with Monizze. Task: 3895296 Forward-Port-Of: odoo/enterprise#62189
Before this change we were always setting document type for the debit note by default, but this should only apply if from Peru LATAM 1198 Forward-Port-Of: odoo/enterprise#63655 Forward-Port-Of: odoo/enterprise#63099
Original PR description
Before this change we were always setting document type for the debit note by default, but this should only apply if from Peru LATAM 1198 Forward-Port-Of: odoo/enterprise#63655 Forward-Port-Of: odoo/enterprise#63099
[FIX] account_reports: adapt pil usage for ubuntu noble The `getsize` method on a FreeTypeFont object was deprecated [0] in Pillow 9.2.0. Ubuntu Noble provides Pillow 10.2.0. They advise to use `getbbox` which is already available in Pillow 9.0.1 provided by Ubuntu Jammy. See: https://pillow.readthedocs.io/en/stable/releasenotes/9.2.0.html#font-size-and-offset-methods [FIX] account_report: adapt xlsxwriter usage for ubuntu noble The `col_sizes` attribute
Original PR description
[FIX] account_reports: adapt pil usage for ubuntu noble
The `getsize` method on a FreeTypeFont object was deprecated [0] in Pillow
9.2.0. Ubuntu Noble provides Pillow 10.2.0. They advise to use `getbbox`
which is already available in Pillow 9.0.1 provided by Ubuntu Jammy.
See: https://pillow.readthedocs.io/en/stable/releasenotes/9.2.0.html#font-size-and-offset-methods
[FIX] account_report: adapt xlsxwriter usage for ubuntu noble
The `col_sizes` attribute on an worksheet was removed in xlsxwriter
version 3.0.6 [0]. Ubuntu Noble provides xlsxwriter 3.1.9.
The xlsxwriter author advises [1] to use the `col_info` attribute
instead, but this attribute appeared in 3.0.6 too (rename of `colinfo`).
With this commit, the version is checked in order to use the right
attribute.
See: jmcnamara/XlsxWriter@860f4a2404549aca1eccf9bf8361df95dc574f44
and jmcnamara/XlsxWriter#937
Forward-Port-Of: odoo/enterprise#63515The tariff fraction catalog has been updated on April 2024: https://www.snice.gob.mx/cs/avi/snice/ligie.info22.mod24.html opw-3921546 Forward-Port-Of: odoo/enterprise#62638
Original PR description
The tariff fraction catalog has been updated on April 2024: https://www.snice.gob.mx/cs/avi/snice/ligie.info22.mod24.html opw-3921546 Forward-Port-Of: odoo/enterprise#62638
See also: https://github.com/odoo/odoo/pull/167738 Forward-Port-Of: odoo/enterprise#63708
Original PR description
See also: https://github.com/odoo/odoo/pull/167738 Forward-Port-Of: odoo/enterprise#63708
If we upload a Soda and an account is not mapped, we'll fall back on the Suspense Account. However, when modifying the entry line with the Suspense Account, the general Soda Mapping is not updated. For UX reasons, we should update the general Soda Mapping too so that the user doesn't have to modify it twice. However, we shouldn't do the reverse. I.e. when modifying the general Soda Mapping, we shouldn't modify the existing entries. taks-id: 3954585 Forward-Port-Of: odoo/enterprise#6
Original PR description
If we upload a Soda and an account is not mapped, we'll fall back on the Suspense Account. However, when modifying the entry line with the Suspense Account, the general Soda Mapping is not updated. For UX reasons, we should update the general Soda Mapping too so that the user doesn't have to modify it twice. However, we shouldn't do the reverse. I.e. when modifying the general Soda Mapping, we shouldn't modify the existing entries. taks-id: 3954585 Forward-Port-Of: odoo/enterprise#63356
Create a branch company In the parent company: - Create a [tax] of type "Group of Taxes" and add a child tax - add [tax] to a [product] record In the branch company: - Create an invoice with [product] - Open journal Reports KeyError will raise It occurs because we fetch the tax data by SQL selecting data belonging to the current company only, without considering parent companies opw-3874824 Forward-Port-Of: odoo/enterprise#63004
Original PR description
Create a branch company In the parent company: - Create a [tax] of type "Group of Taxes" and add a child tax - add [tax] to a [product] record In the branch company: - Create an invoice with [product] - Open journal Reports KeyError will raise It occurs because we fetch the tax data by SQL selecting data belonging to the current company only, without considering parent companies opw-3874824 Forward-Port-Of: odoo/enterprise#63004
The problem is that the message ``` This invoice will be paid using direct debit and is only sent for informative purposes. sent for informative purposes ``` is displayed even in invoices that doesn't use Direct Debit after a studio change. Steps: - install `account_sepa_direct_debit` - install `web_studio` - Edit `Invoices` report on studio - Save - Try to print an invoice report - SDD (Sepa Direct Debit) message will be displayed even if this invo
Original PR description
The problem is that the message ``` This invoice will be paid using direct debit and is only sent for informative purposes. sent for informative purposes ``` is displayed even in invoices that…
The problem is that the message
```
This invoice will be paid using direct debit and is only sent for
informative purposes. sent for informative purposes
```
is displayed even in invoices that doesn't use Direct Debit after a studio change.
Steps:
- install `account_sepa_direct_debit`
- install `web_studio`
- Edit `Invoices` report on studio
- Save
- Try to print an invoice report
- SDD (Sepa Direct Debit) message will be displayed
even if this invoice doesn't use SDD
This inconsistency was due to two errors in the report generated by SDD
```xml
<p t-if="o.sdd_mandate_id">
<span>
<p>
This invoice will be paid using direct debit and is only
sent for informative purposes.
</p>
<p>
Please do not pay it manually, the payment will be asked to your bank to be processed
automatically.
</p>
</span>
</p>
```
A `<p>`/`<span>` can't contains another `<p>`
as defined here https://html.spec.whatwg.org/#the-p-element or https://html.spec.whatwg.org/#the-span-element `<P>`/`<span>` can only contains "Phrasing content" (https://html.spec.whatwg.org/#phrasing-content-2) `<div>` and `<p>` for example are not phrasing content
opw-3908411
Forward-Port-Of: odoo/enterprise#63345Bug 1: How to reproduce: 1. Schedule an activity for a document. 2. Go to activity view. 3. Select the document to preview in the inspector. 4. Rename the document. 5. Refresh the page. The document name is not renamed. Similarly to what is done in document kanban and list controller where updating the document through the inspector works, we activate the parameter multiEdit which solve the problem. Bug 2: How to reproduce: 1. Schedule an activity for a document. 2. Go to activit
Original PR description
Bug 1: How to reproduce: 1. Schedule an activity for a document. 2. Go to activity view. 3. Select the document to preview in the inspector. 4. Rename the document. 5. Refresh the page. The document…
Bug 1: How to reproduce: 1. Schedule an activity for a document. 2. Go to activity view. 3. Select the document to preview in the inspector. 4. Rename the document. 5. Refresh the page. The document name is not renamed. Similarly to what is done in document kanban and list controller where updating the document through the inspector works, we activate the parameter multiEdit which solve the problem. Bug 2: How to reproduce: 1. Schedule an activity for a document. 2. Go to activity view. 3. Select the document to preview in the inspector. 4. Erase the name of a doc and click anywhere to save. No alert pop-up is shown up while saving with an empty name while this is the case when editing the document from the kanban or the list view. Similarly to what is done in document kanban and list view, we add the required attribute to the field name. Technical note: to avoid duplicate a lot of code, we add the test inside documents_kanban_tests.js (while it is testing the update of a document in the inspector of the activity view). Task-3817795 Forward-Port-Of: odoo/enterprise#63038 Forward-Port-Of: odoo/enterprise#59263
This PR fixes two issues with the portal web client of Knowledge: - When a portal user opens an article and clicks on an article of the sidebar, the article id specified in the route url and the session are not updated. The router only updates the url params of the url. When the user loads the page, the client script will load the article specified in the session. As the session is not updated when switching article, the script can load an incorrect article when reloading the page. This PR ai
Original PR description
This PR fixes two issues with the portal web client of Knowledge: - When a portal user opens an article and clicks on an article of the sidebar, the article id specified in the route url and the…
This PR fixes two issues with the portal web client of Knowledge: - When a portal user opens an article and clicks on an article of the sidebar, the article id specified in the route url and the session are not updated. The router only updates the url params of the url. When the user loads the page, the client script will load the article specified in the session. As the session is not updated when switching article, the script can load an incorrect article when reloading the page. This PR aims to fix that issue by ensuring that the client script will load the article with the id specified in the url params of the url. - When a portal user opens an article, clicks on an article of the sidebar and presses the back button, the system updates the url params and set the right id but it doesn't load the corresponding article in the view. This PR aims to fix that issue by ensuring that the web client load the article whenever the url changes. task-3743416 Forward-Port-Of: odoo/enterprise#63218 Forward-Port-Of: odoo/enterprise#60845