Thursday, July 25, 2024
23 changes · saas-17.1
Miscellaneous changes
### Steps to reproduce: - Install eCommerce and Loyalty module - Create a Discount that is applied using code - Generate coupon codes - Modify the balance of the codes to be more than 1 - Go to website and create an order - Proceed to checkout and apply one of the codes ### Current behavior before PR: The reward will be shown as claimable even after we already applied its code. This will lead that the user can be able to claim it more than once in the same order. This is happenin
Original PR description
### Steps to reproduce: - Install eCommerce and Loyalty module - Create a Discount that is applied using code - Generate coupon codes - Modify the balance of the codes to be more than 1 - Go to website and create an order - Proceed to checkout and apply one of the codes ### Current behavior before PR: The reward will be shown as claimable even after we already applied its code. This will lead that the user can be able to claim it more than once in the same order. This is happening becuase when getting the claimable rewards we are fetching the rewards that already got applied. https://github.com/odoo/odoo/blob/16.0/addons/sale_loyalty/models/sale_order.py#L655 ### Desired behavior after PR is merged: We are excluding the already-applied coupons on the order to avoid using them more than once in the same order. opw-4018909 Forward-Port-Of: odoo/odoo#173555
Some aliases to save a lot of time to IoT Team: - odoo, - odoo_help, - odoo_logs, - write_mode, - read_mode, - install, - blackbox. Use `odoo_help` to have more information. Task: 3947538 Forward-Port-Of: odoo/odoo#174085
Original PR description
Some aliases to save a lot of time to IoT Team: - odoo, - odoo_help, - odoo_logs, - write_mode, - read_mode, - install, - blackbox. Use `odoo_help` to have more information. Task: 3947538 Forward-Port-Of: odoo/odoo#174085
Fixed printer and serial devices detection: both listing more devices than expected. Task: 3947355 Forward-Port-Of: odoo/odoo#174164
Original PR description
Fixed printer and serial devices detection: both listing more devices than expected. Task: 3947355 Forward-Port-Of: odoo/odoo#174164
*loyalty, pos_loyalty, sale_loyalty Currently, archived products that are used in loyalty programs may cause the POS shop to crash. Steps to reproduce: ------------------- * Go to the **Point of Sale** App * Go to the products * Look for the product `Simple Pen` * Archive the product * Add some product to the order * Add a customer that has loyalty points (`Azure Interior`) > Observations: Blank screen. Error in the console: Cannot read properties of undefined (reading 'id') at P
Original PR description
*loyalty, pos_loyalty, sale_loyalty Currently, archived products that are used in loyalty programs may cause the POS shop to crash. Steps to reproduce: ------------------- * Go to the **Point of…
*loyalty, pos_loyalty, sale_loyalty
Currently, archived products that are used in loyalty programs may cause the POS shop to crash.
Steps to reproduce:
-------------------
* Go to the **Point of Sale** App
* Go to the products
* Look for the product `Simple Pen`
* Archive the product
* Add some product to the order
* Add a customer that has loyalty points (`Azure Interior`)
> Observations: Blank screen. Error in the console: Cannot read properties of undefined (reading 'id') at Proxy._computeUnclaimedFreeProductQty
> Doing an equivalent flow in sales, when you select `Promotions`, an error message appears saying: Invalid Operation. Invalid product to claim.
Why the fix:
------------
When loading the `loyalty.rewards` to the pos session we check if there is at least one active product. If there is none, we don't load the reward.
Explanation of the domain:
* We only filter in the case where the `reward_type` is `product`.
* Second condition:
* We cannot have a condition like `('reward_product_id', '!=', False)`
We could have a setting with both `reward_product_id` and `reward_product_ids` being set. In this condition it would skip the check on `reward_product_ids`
* We connot have a condition like `('reward_product_ids', '!=', False)` as `reward_product_ids` is always at least an empty set, thus it will always be '`True`'
* We put the condition on `reward_product_tag_id`. When there is one set the computation of `reward_product_ids` is triggered. `reward_product_ids` will always include `reward_product_id`. When there is no tag set, we will always, at least, have a `reward_product_id`.
opw-[3968140](https://www.odoo.com/web#id=3968140&view_type=form&model=project.task)
Forward-Port-Of: odoo/odoo#174091
Forward-Port-Of: odoo/odoo#168442Backport of commit 2b27e1bd8015a26694ba66e95f5d62f19508b6ed Forward-Port-Of: odoo/odoo#174367
Original PR description
Backport of commit 2b27e1bd8015a26694ba66e95f5d62f19508b6ed Forward-Port-Of: odoo/odoo#174367
Steps: - Login as portal, and to to a task form, page sub-tasks. - Make Customer column visible. - Add a line and try to edit that field. Issue: You can't. But after saving, you can. Cause: The new record doesn't have a project (it will be given to it on save). Yet this PR odoo#111335 added the condition that it should be invisible if no project. The reason why it caused no issue in 16.3 (where it was merged) was that there was a default project in `child_ids`'s context. Solution
Original PR description
Steps: - Login as portal, and to to a task form, page sub-tasks. - Make Customer column visible. - Add a line and try to edit that field. Issue: You can't. But after saving, you can. Cause: The new record doesn't have a project (it will be given to it on save). Yet this PR odoo#111335 added the condition that it should be invisible if no project. The reason why it caused no issue in 16.3 (where it was merged) was that there was a default project in `child_ids`'s context. Solution: In this case, the condition is not needed. Subtasks always have a project : private tasks can't have subtasks and deleting project field on a non-private task's subtask will actually give it its parent project. So the solution is simple: remove the condition. task-3713729 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174323
### Issue: Generated invoices does not appear in the page 'Manage Attachments'. ### Steps to reproduce: - Activate the developer mode - In Accounting > Customers > Invoices create a new one - Confirm and click on Send & Print, an invoice is generated and can be seen in the attachment of the chatter - Click on the debug icon, then on 'Manage Attachments' - The attachment does not show up ### Cause: The domain used for the 'Manage Attachments' search does not contain restriction on re
Original PR description
### Issue:
Generated invoices does not appear in the page 'Manage Attachments'.
### Steps to reproduce:
- Activate the developer mode
- In Accounting > Customers > Invoices create a new one
- Confirm and click on Send & Print, an invoice is generated and can be seen in the attachment of the chatter
- Click on the debug icon, then on 'Manage Attachments'
- The attachment does not show up
### Cause:
The domain used for the 'Manage Attachments' search does not contain restriction on res_field and id. So a new condition is added: ('res_field', '=', False). The logic behind this functionality is explained in this commit: https://github.com/odoo/odoo/commit/1bb61c970ed63eabe3821d21f3ed6f99c4b16daa In the case of invoices res_field is equal to invoice_pdf_report_file, so the invoice does not appear.
### Solution:
Add a context to the search request to skip the res_field test. Thus showing all attachments.
opw-3997094
Forward-Port-Of: odoo/odoo#172722**Current behavior before PR:** Long texts overflowed beyond the banner's boundaries. **Desired behavior after PR is merged:** Ensure that text remains within the banner's limits to improve readability and visual consistency. task-4037185 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172071
Original PR description
**Current behavior before PR:** Long texts overflowed beyond the banner's boundaries. **Desired behavior after PR is merged:** Ensure that text remains within the banner's limits to improve readability and visual consistency. task-4037185 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172071
Steps to reproduce: - Open Project - Go into any project in kanban view - Mark any task as done. - From the progress bar click on done section Issue: - You can see that the color is does not apply while grouping tasks using progress-bar. Cause: - Missing css-kanban-filter which supplies the color to be applied while grouping by progressbar. - Adding CSS-filter is not done because success-done i.e. color of done tasks is not from standard CSS library(I.e. Bootstrap). Solutio
Original PR description
Steps to reproduce: - Open Project - Go into any project in kanban view - Mark any task as done. - From the progress bar click on done section Issue: - You can see that the color is does not apply while grouping tasks using progress-bar. Cause: - Missing css-kanban-filter which supplies the color to be applied while grouping by progressbar. - Adding CSS-filter is not done because success-done i.e. color of done tasks is not from standard CSS library(I.e. Bootstrap). Solution: - Add the CSS filter for done stage name as success-done. task-3852596 Forward-Port-Of: odoo/odoo#163086
[FIX] website_crm_partner_assign: fix sitemap grades Context: when visiting the `/partners` url, the user has access to the "silver", "gold" and "platinum" grades. However, when generating the sitemap, the `/partners/grade/bronze-4` url is part of it but trying to access it leads to a 404 server answer. Another problematic behavior is that if the user deactivates a grade ("gold" for example), the grade is still accessible from `/partners` (but the `/partners/grade/gold-2` url is not on
Original PR description
[FIX] website_crm_partner_assign: fix sitemap grades Context: when visiting the `/partners` url, the user has access to the "silver", "gold" and "platinum" grades. However, when generating the…
[FIX] website_crm_partner_assign: fix sitemap grades
Context: when visiting the `/partners` url, the user has access to the
"silver", "gold" and "platinum" grades. However, when generating the
sitemap, the `/partners/grade/bronze-4` url is part of it but trying to
access it leads to a 404 server answer. Another problematic behavior is
that if the user deactivates a grade ("gold" for example), the grade is
still accessible from `/partners` (but the `/partners/grade/gold-2` url
is not on the sitemap anymore).
This can be explained as:
- When visiting the `/partners` url, the `partners` route searches for
grades from `request.env['res.partner']`. By doing so, it ensures that
grades are linked to at least one partner; this explains why the
"bronze" grade (not linked to any partner) is not shown at the
`/partners` url and why the deactivated "gold" grade is still
accessible (as a partner is still related to it).
- When the user tries to reach a `/partners` route, a 404 server answer
is returned if no partners are found for the route (e.g.
`/partners/grade/bronze-4`).
- When generating the sitemap, the system is searching for grades from
`env['res.partner.grade']`. Due to it, inactive grades (e.g. "gold") are
not shown on the sitemap and grades that are not linked to a partner
(e.g. "bronze") are shown on the sitemap.
The goal of this commit is to:
- Correct the `/partners` route so that it does not show inactive
grades.
- Generate the sitemap coherently from what is done in the `/partners`
route.
In the end, the `/partner` route only shows company website published
partners linked to active website published grades. The user has then
the possibility to filter the partners by grades or by country.
opw-3992340
Forward-Port-Of: odoo/odoo#174250
Forward-Port-Of: odoo/odoo#170582People tend to install every new shiny release of Python but fail to realise that it usually takes a month or two before Odoo is made compatible with that shiny new version. In the meantime there is a surge of issues / tickets with bugs related to the new python version, wasting time of a lot of people (at least mine). Hardcode the officially maximum supported python version and emit a warning when the current python is more recent than that. We'll change the variable the next time we support
Original PR description
People tend to install every new shiny release of Python but fail to realise that it usually takes a month or two before Odoo is made compatible with that shiny new version. In the meantime there is a surge of issues / tickets with bugs related to the new python version, wasting time of a lot of people (at least mine). Hardcode the officially maximum supported python version and emit a warning when the current python is more recent than that. We'll change the variable the next time we support a new python version. Forward-Port-Of: odoo/odoo#173897 Forward-Port-Of: odoo/odoo#168911
Before this commit, the self test was failing because the user used to run the test didn't have the right access rights. This commit fixes the access rights for the user used to run the test. Rb error: 71576, 71757, 70420, 71598 Forward-Port-Of: odoo/odoo#173601
Original PR description
Before this commit, the self test was failing because the user used to run the test didn't have the right access rights. This commit fixes the access rights for the user used to run the test. Rb error: 71576, 71757, 70420, 71598 Forward-Port-Of: odoo/odoo#173601
### Steps to reproduce: - Install the 'l10n_sa' module and switch to a Saudi company - In the Settings of Accounting, tick the option "Default Terms & Conditions" and select "Add a Note" - Write something in for the Terms & Conditions - In the Accounting app create a new invoice, confirm and preview - At the bottom of the preview, the Terms & Conditions are duplicated ### Cause: The report is trying to print the Arabic and English translation of the Term & Conditions, but only one of th
Original PR description
### Steps to reproduce: - Install the 'l10n_sa' module and switch to a Saudi company - In the Settings of Accounting, tick the option "Default Terms & Conditions" and select "Add a Note" - Write…
### Steps to reproduce: - Install the 'l10n_sa' module and switch to a Saudi company - In the Settings of Accounting, tick the option "Default Terms & Conditions" and select "Add a Note" - Write something in for the Terms & Conditions - In the Accounting app create a new invoice, confirm and preview - At the bottom of the preview, the Terms & Conditions are duplicated ### Cause: The report is trying to print the Arabic and English translation of the Term & Conditions, but only one of the two exists, so they appear duplicated. ### Solution: There is already a way to translate manually the Terms & Conditions (Have the 2 languages installed, and a button appear near the text). So the fix is simply to display only the Arabic language when there is only one translation. A problem is that if the only translation is the English one, it will be printed as if it was written from right to left. But there is no way to know exactly the language of the text, and we can suppose the base language will be Arabic in most cases. opw-4043175 Forward-Port-Of: odoo/odoo#172781
Issue ---- The date fields in the activity view aren't displayed according to the language's date/time formats. Steps ----- - Go to Settings -> Translations -> Language. - Use a custom date & time format. - Create a new model that has an activity view, say a project task. You'll see the task's deadline is displayed according to your format (correct behavior). - Add an activity and set a due date. - The "Created" & "Due On" dates don't match your custom format. Cause ----- I
Original PR description
Issue ---- The date fields in the activity view aren't displayed according to the language's date/time formats. Steps ----- - Go to Settings -> Translations -> Language. - Use a custom date & time format. - Create a new model that has an activity view, say a project task. You'll see the task's deadline is displayed according to your format (correct behavior). - Add an activity and set a due date. - The "Created" & "Due On" dates don't match your custom format. Cause ----- In the activity component, the dates weren't formated according to the current language's date/time format but rather a hard-coded one. opw-3929864 Forward-Port-Of: odoo/odoo#168074
Installation of l10n_mx_edi_stock_30 module can fail due to memory limit Having a large number of "stock.picking" records causes this due to the computations of the initial values of fields. Solving this requires creating the field columns and assigning the values manually, by overriding the _auto_init method. This allows us to skip the computations, to avoid the memory limit. opw-3846355 Forward-Port-Of: odoo/enterprise#65830 Forward-Port-Of: odoo/enterprise#60948
Original PR description
Installation of l10n_mx_edi_stock_30 module can fail due to memory limit Having a large number of "stock.picking" records causes this due to the computations of the initial values of fields. Solving this requires creating the field columns and assigning the values manually, by overriding the _auto_init method. This allows us to skip the computations, to avoid the memory limit. opw-3846355 Forward-Port-Of: odoo/enterprise#65830 Forward-Port-Of: odoo/enterprise#60948
We are facing an access error when the planning user tries to access the conflict shift because we have not given the planning user access to the draft shift. Steps to reproduce: - Install the planning app - Go to planning - Create two shifts at the same time (one published and the other in draft) - Create a new planning user - Log in as the planning user - Open the published shift task-3823274 Forward-Port-Of: odoo/enterprise#66356
Original PR description
We are facing an access error when the planning user tries to access the conflict shift because we have not given the planning user access to the draft shift. Steps to reproduce: - Install the planning app - Go to planning - Create two shifts at the same time (one published and the other in draft) - Create a new planning user - Log in as the planning user - Open the published shift task-3823274 Forward-Port-Of: odoo/enterprise#66356
Problem --------- Currently, if you install l10n_xx and update some specific account codes (depending on the localization) and then try to install the corresponding l10n_xx_hr_payroll_account hr module, you are struck with an error that cancels the installation as some accounts are missing. 1. Install l10n_ae for example 2. Switch to AE company 3. Update the account with code 201002 to 701002 4. Install l10n_ae_hr_payroll_account -> Error occurs during the installation Objective ----
Original PR description
Problem --------- Currently, if you install l10n_xx and update some specific account codes (depending on the localization) and then try to install the corresponding l10n_xx_hr_payroll_account hr module, you are struck with an error that cancels the installation as some accounts are missing. 1. Install l10n_ae for example 2. Switch to AE company 3. Update the account with code 201002 to 701002 4. Install l10n_ae_hr_payroll_account -> Error occurs during the installation Objective --------- Be able to install the module even when the account is missing. Solution --------- Log a warning instead of raising an error. opw-3961798 Forward-Port-Of: odoo/enterprise#67241
Currently it is assumed that all assets we write on belong to the same company. (Any exceptions to this are probably rare in practice.) This commit ensures that writing on assets with different companies works correctly. (no task) Forward-Port-Of: odoo/enterprise#67262 Forward-Port-Of: odoo/enterprise#65795
Original PR description
Currently it is assumed that all assets we write on belong to the same company. (Any exceptions to this are probably rare in practice.) This commit ensures that writing on assets with different companies works correctly. (no task) Forward-Port-Of: odoo/enterprise#67262 Forward-Port-Of: odoo/enterprise#65795
Before this commit, some Markup were missing in some post message which resulted in some html to be displayed in the chatter. task: 4041892 Community: https://github.com/odoo/odoo/pull/173375 Forward-Port-Of: odoo/enterprise#67255 Forward-Port-Of: odoo/enterprise#66767
Original PR description
Before this commit, some Markup were missing in some post message which resulted in some html to be displayed in the chatter. task: 4041892 Community: https://github.com/odoo/odoo/pull/173375 Forward-Port-Of: odoo/enterprise#67255 Forward-Port-Of: odoo/enterprise#66767
Steps: Login as portal, and to to a task form, page sub-tasks. Make Customer column visible. Add a line and try to edit that field. Issue: You can't. But after saving, you can. Cause: The field is invisible if `allow_billable` and `is_fsm` are False. A child task inherits both from its parent, but this one hasn't been created yet. Solution: In this case, the condition is not needed. If we create the child and he has both fields to False, it means its parent too. Yet the `partner_
Original PR description
Steps: Login as portal, and to to a task form, page sub-tasks. Make Customer column visible. Add a line and try to edit that field. Issue: You can't. But after saving, you can. Cause: The field is invisible if `allow_billable` and `is_fsm` are False. A child task inherits both from its parent, but this one hasn't been created yet. Solution: In this case, the condition is not needed. If we create the child and he has both fields to False, it means its parent too. Yet the `partner_id` column is invisible if it is the case. So the solution is simple: remove the condition. related: https://github.com/odoo/odoo/pull/174323 task-3713729 Forward-Port-Of: odoo/enterprise#67252
Steps: - Install helpdesk_timesheet - In Kanban View > Start the timer of a ticket Issue: - If we have a kanban card with an older date and we start and stop the timer, a new kanban entry will be made with today's date. But for the tickets , if we start a timer, the ticket_id is not set in the timer header with in the new ticket. Cause: - Due to the condition given in the `action_start_new_timesheet_timer`, there is no helpdesk_ticket_id mentioned in that function. Fix: - B
Original PR description
Steps: - Install helpdesk_timesheet - In Kanban View > Start the timer of a ticket Issue: - If we have a kanban card with an older date and we start and stop the timer, a new kanban entry will be made with today's date. But for the tickets , if we start a timer, the ticket_id is not set in the timer header with in the new ticket. Cause: - Due to the condition given in the `action_start_new_timesheet_timer`, there is no helpdesk_ticket_id mentioned in that function. Fix: - By extending the `_get_new_timesheet_timer_vals` to the helpdesk_timesheet module to gave helpdesk_ticket_id the issue will be solved. task-3970176 Forward-Port-Of: odoo/enterprise#64359
When opening the shopfloor from a specific workcenter, workorder or production order, only the concerned workcenter should be shown. task-4060857 Forward-Port-Of: odoo/enterprise#66923
Original PR description
When opening the shopfloor from a specific workcenter, workorder or production order, only the concerned workcenter should be shown. task-4060857 Forward-Port-Of: odoo/enterprise#66923
Description of the issue this commit addresses: We do not want the user to be able to create fiscal years on child companies. --- Desired behavior after this commit is merged: A new check in fiscal years raises an error when the user tries to create a fiscal year from a child company. --- no task-feedback Forward-Port-Of: odoo/enterprise#67121
Original PR description
Description of the issue this commit addresses: We do not want the user to be able to create fiscal years on child companies. --- Desired behavior after this commit is merged: A new check in fiscal years raises an error when the user tries to create a fiscal year from a child company. --- no task-feedback Forward-Port-Of: odoo/enterprise#67121