Wednesday, November 20, 2024
16 changes · saas-17.2
Miscellaneous changes
When extracting data from a ticket expressed in a currency that's inactive in the company, the code crashed with a KeyError, because the 'currency_id' was not in the vals dictionary. This crashed some tests in hr_expense_extract when they were run in a db with only USD as active company. Forward-Port-Of: odoo/enterprise#72941
Original PR description
When extracting data from a ticket expressed in a currency that's inactive in the company, the code crashed with a KeyError, because the 'currency_id' was not in the vals dictionary. This crashed some tests in hr_expense_extract when they were run in a db with only USD as active company. Forward-Port-Of: odoo/enterprise#72941
This PR aims to increase the contrast between the default and the `focus` state of our `btn-primary`. | 17.0 | This PR | |--------|--------| | <img width="729" alt="image" src="https://github.com/user-attachments/assets/19c29432-4467-46bf-b240-41017d435c09"> | <img width="717" alt="image" src="https://github.com/user-attachments/assets/1efc15cc-6e10-460b-9040-4088cf3a98e0"> | Prior to this PR, the color was not dark enough to grant enough visual feedback on focus. This can be solve quic
Original PR description
This PR aims to increase the contrast between the default and the `focus` state of our `btn-primary`. | 17.0 | This PR | |--------|--------| | <img width="729" alt="image" src="https://github.com/user-attachments/assets/19c29432-4467-46bf-b240-41017d435c09"> | <img width="717" alt="image" src="https://github.com/user-attachments/assets/1efc15cc-6e10-460b-9040-4088cf3a98e0"> | Prior to this PR, the color was not dark enough to grant enough visual feedback on focus. This can be solve quickly by tweaking the value directly. task-3382308 Forward-Port-Of: odoo/enterprise#71793
Before this commit contact created from amazon order create new state if it does not find matching state in odoo and it was causing issues like having record multiple record for same state and user don't know which one is right with proper code in data. This commit stop creating new state instead create activity on contact for amazon sale person to set proper state on the related contact to not break flows that are related to contact's state. Backport of b327ea1897fca34164a9bbea59a23d34b97
Original PR description
Before this commit contact created from amazon order create new state if it does not find matching state in odoo and it was causing issues like having record multiple record for same state and user don't know which one is right with proper code in data. This commit stop creating new state instead create activity on contact for amazon sale person to set proper state on the related contact to not break flows that are related to contact's state. Backport of b327ea1897fca34164a9bbea59a23d34b97e65a2 task-3865454 Forward-Port-Of: odoo/enterprise#74099
Steps to reproduce: - Sales app > Configuration > Settings > Enable 'Quotation Templates' - Default template > Search more > New - Set 'Confirmation Mail' to 'Sales: Order Confirmation' - Project app > New > Enable 'Billable' in the project's settings - New Task > Set any Customer - Sales Order Item > Search More > New > Add product then save - Click 'Sales Order' button Coupled with https://github.com/odoo/odoo/pull/183586 You'll see in the chatter that the confirmation email is se
Original PR description
Steps to reproduce: - Sales app > Configuration > Settings > Enable 'Quotation Templates' - Default template > Search more > New - Set 'Confirmation Mail' to 'Sales: Order Confirmation' - Project app…
Steps to reproduce: - Sales app > Configuration > Settings > Enable 'Quotation Templates' - Default template > Search more > New - Set 'Confirmation Mail' to 'Sales: Order Confirmation' - Project app > New > Enable 'Billable' in the project's settings - New Task > Set any Customer - Sales Order Item > Search More > New > Add product then save - Click 'Sales Order' button Coupled with https://github.com/odoo/odoo/pull/183586 You'll see in the chatter that the confirmation email is sent before the product is added to the sales order, resulting in a $0 quotation document being sent to the customer. This happens because we confirm the SO at the same time as we create it (After pressing the New button). Instead we would rather confirm the SO on save, after the order line creation. The SO confirmation is necessary because we don't want people to work on tasks/projects that are still in quotation since they could hypothetically still be cancelled. opw-4190402 Forward-Port-Of: odoo/enterprise#73492
After the sign's app OWL upgrade, the guidance dialog's ('Click to start', 'Fill in', etc...) font got unformatted from Helvetica to Times New Roman. Additionally, the sign elements were tooking too long to render, making the user experience also slow. This commits restores the original font for the guidance dialogs and also decrease the rendering refresh from 2s to 1s for providing a smoother user experience. task-4147887 Forward-Port-Of: odoo/enterprise#69146
Original PR description
After the sign's app OWL upgrade, the guidance dialog's ('Click to start', 'Fill in', etc...) font got unformatted from Helvetica to Times New Roman. Additionally, the sign elements were tooking too long to render, making the user experience also slow.
This commits restores the original font for the guidance dialogs and also decrease the rendering refresh from 2s to 1s for providing a smoother user experience.
task-4147887
Forward-Port-Of: odoo/enterprise#69146This commits makes the redirect button label mandatory when there is a specified redirect URL. It also improves the hiding of the redirect label field when there is no redirect URL specified. task-4174120 Forward-Port-Of: odoo/enterprise#69866
Original PR description
This commits makes the redirect button label mandatory when there is a specified redirect URL. It also improves the hiding of the redirect label field when there is no redirect URL specified. task-4174120 Forward-Port-Of: odoo/enterprise#69866
## [FIX] l10n_be_reports: 281.50 and exchange diff The aim of this commit is to prevent a Zero devision error by excluding irrelevant 'zeroed' exchange difference. Context: Some misc entry with a 0 balance and some amount_currency might be present and taken into account for the computation. Such moves have an `amount_total_signed` equal to 0 leading to the zeroDivisionError issue in the query computation. Before the commit: When having such entry considered by the query, creating th
Original PR description
## [FIX] l10n_be_reports: 281.50 and exchange diff The aim of this commit is to prevent a Zero devision error by excluding irrelevant 'zeroed' exchange difference. Context: Some misc entry with a 0 balance and some amount_currency might be present and taken into account for the computation. Such moves have an `amount_total_signed` equal to 0 leading to the zeroDivisionError issue in the query computation. Before the commit: When having such entry considered by the query, creating the 325.50 form leads to a traceback. After the commit: Those irrelevant moves are ignored and the process carry on smoothly. task-id: None - Issue spotted on next ## [FIX] l10n_be_reports: 281.50, no 0-0-0-0-0 form The aim of this commit is to avoid generating a 281.50 form if there isn't any amounts to fill in the form. task-id: None - Dicussed with TSB Forward-Port-Of: odoo/enterprise#73842
Steps to reproduce: - Install Accounting > Settings > Enable 'Analytic Accounting' - Project App > New > Project Settings > Edit Analytic plan - Change Plan from 'Projects' to any other (except Internal) - Manufacturing > Operations > Manufacturing Orders > New - Product: 'Table Top' - Miscellaneous tab > Analytic distribution: <Project account> - Confirm > Produce All > Set quantities & Validate - Project > ':' Menu > Project Updates (Dashboard in 18.0+) - The cost of materials ($160)
Original PR description
Steps to reproduce: - Install Accounting > Settings > Enable 'Analytic Accounting' - Project App > New > Project Settings > Edit Analytic plan - Change Plan from 'Projects' to any other (except…
Steps to reproduce: - Install Accounting > Settings > Enable 'Analytic Accounting' - Project App > New > Project Settings > Edit Analytic plan - Change Plan from 'Projects' to any other (except Internal) - Manufacturing > Operations > Manufacturing Orders > New - Product: 'Table Top' - Miscellaneous tab > Analytic distribution: <Project account> - Confirm > Produce All > Set quantities & Validate - Project > ':' Menu > Project Updates (Dashboard in 18.0+) - The cost of materials ($160) is not deducted in Project costs Analytic distributions include different categories for each plan, this is reflected in DB with a different column for each plan, account_id/x_plan2_id/x_plan3_id/... which contain the project's analytic account. In version 18.0 and above we allow each project to have several analytic accounts (for the project, department, ...) but prior to that we relied on plan_id to differentiate the project account category. When checking for analytic lines to populate the project updates we check the `account_id`, meaning only lines with projects having analytic plan 'Projects' would pass that filter domain. We instead want to grab the account_id from any of the plan columns. opw-4282092 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187275
Steps to reproduce: - Calendar > New > Tick 'Recurrent' - 'Until' => 'Number of repetitions' or 'Forever' - Set meeting start time in 5 mins - Add reminder => Notification - 15 Minutes > Save The notification is not sent, this is due to the use of 'until' to fetch the last event date of recurrent meetings despite that field only being set if the recrrence type is 'End date'. We want to check that date to avoid sending notifications for past meetings, but 'Number of Repetitions' recursions
Original PR description
Steps to reproduce: - Calendar > New > Tick 'Recurrent' - 'Until' => 'Number of repetitions' or 'Forever' - Set meeting start time in 5 mins - Add reminder => Notification - 15 Minutes > Save The notification is not sent, this is due to the use of 'until' to fetch the last event date of recurrent meetings despite that field only being set if the recrrence type is 'End date'. We want to check that date to avoid sending notifications for past meetings, but 'Number of Repetitions' recursions use a count instead of a date, and 'Forever' obviously doesn't need a date. Using the meeting end date instead should do the trick since it will always be in the future at the moment we want to send the reminder and it should never go over the last event date since no meeting record will be created after the recurrence ends anyway. opw-4247282 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187423
**Steps to reproduce:** - Create a PDF report for the stock.picking model - Use the template stock.label_transfer_template_view_pdf. - When saving the report, the mentioned error occurred. ```py odoo.addons.base.models.ir_qweb.QWebException: Error while render the template AttributeError: 'stock.picking' object has no attribute 'move_lines' Template: stock.label_transfer_template_view_pdf Path: /t/t/div/t[2]/t[2] Node: <t t-foreach="picking.move_ids" t-as="move"/> ``` - [Ref](https:
Original PR description
**Steps to reproduce:** - Create a PDF report for the stock.picking model - Use the template stock.label_transfer_template_view_pdf. - When saving the report, the mentioned error occurred. ```py…
**Steps to reproduce:** - Create a PDF report for the stock.picking model - Use the template stock.label_transfer_template_view_pdf. - When saving the report, the mentioned error occurred. ```py odoo.addons.base.models.ir_qweb.QWebException: Error while render the template AttributeError: 'stock.picking' object has no attribute 'move_lines' Template: stock.label_transfer_template_view_pdf Path: /t/t/div/t[2]/t[2] Node: <t t-foreach="picking.move_ids" t-as="move"/> ``` - [Ref](https://github.com/odoo/odoo/pull/78732) were move_lines has been renamed to move_ids. - [Ref](https://github.com/odoo/odoo/pull/80434) were product_uom_qty has been renamed to reserved_uom_qty. **Desired behavior after PR is merged:** - Can create a report for stock.picking model  OPW - [4239654](https://www.odoo.com/odoo/project/70/tasks/4239654) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187427 Forward-Port-Of: odoo/odoo#184046
This PR fixes an issue about the pager buttons having a wrong `border-radius` in RTL languages. Prior to this PR, the icons were defined at the button level. On top of being unusual, this had a side-effect. In RTL languages, we use a CSS `transform: rotate(180deg);` on our directional icons,in order to flip their direction and match the RTL or LTR. While this works totally fine, having the icon sets on the button directly means the whole button will be flipped, meaning the border-radius wi
Original PR description
This PR fixes an issue about the pager buttons having a wrong `border-radius` in RTL languages. Prior to this PR, the icons were defined at the button level. On top of being unusual, this had a…
This PR fixes an issue about the pager buttons having a wrong `border-radius` in RTL languages. Prior to this PR, the icons were defined at the button level. On top of being unusual, this had a side-effect. In RTL languages, we use a CSS `transform: rotate(180deg);` on our directional icons,in order to flip their direction and match the RTL or LTR. While this works totally fine, having the icon sets on the button directly means the whole button will be flipped, meaning the border-radius will be inverted. To prevent this behaviour, we simply need to use a `<i/>` tag for both icons, which will allow them to be flipped without affecting the button design. | 17.0 | This PR | |--------|--------| | <img width="159" alt="image" src="https://github.com/user-attachments/assets/2afc13b3-0b4b-4baf-a306-2196a3c83867"> | <img width="159" alt="image" src="https://github.com/user-attachments/assets/a405e167-6a0f-4a49-a15d-4e36735d95f5"> | task-4345233 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187741
step to reproduce: 1. create a db in 16.0 with appointment and account_payment module 2. create ``User-defined default`` (ir_default): Settings -> Technical -> User-defined Defaults - Field = Unit of Measure (product.template) - Default Value (JSON format) = 3 (pick any id that is not in the same category as `uom.product_uom_unit`) 2. upgrade db to 17.0 version below mentioned traceback will raised because appointment_account_payment is auto install. ``` Traceback (most recent call last):
Original PR description
step to reproduce: 1. create a db in 16.0 with appointment and account_payment module 2. create ``User-defined default`` (ir_default): Settings -> Technical -> User-defined Defaults - Field = Unit of…
step to reproduce:
1. create a db in 16.0 with appointment and account_payment module
2. create ``User-defined default`` (ir_default): Settings -> Technical -> User-defined Defaults
- Field = Unit of Measure (product.template)
- Default Value (JSON format) = 3 (pick any id that is not in the same category as `uom.product_uom_unit`)
2. upgrade db to 17.0 version below mentioned traceback will raised because appointment_account_payment is auto install.
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/17.0/odoo/service/server.py", line 1313, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-16>", line 2, in new
File "/home/odoo/src/odoo/17.0/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/17.0/odoo/modules/registry.py", line 114, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/17.0/odoo/modules/loading.py", line 480, in load_modules
processed_modules += load_marked_modules(env, graph,
File "/home/odoo/src/odoo/17.0/odoo/modules/loading.py", line 364, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/odoo/src/odoo/17.0/odoo/modules/loading.py", line 227, in load_module_graph
load_data(env, idref, mode, kind='data', package=package)
File "/home/odoo/src/odoo/17.0/odoo/modules/loading.py", line 71, in load_data
tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
File "/home/odoo/src/odoo/17.0/odoo/tools/convert.py", line 627, in convert_file
convert_xml_import(env, module, fp, idref, mode, noupdate)
File "/home/odoo/src/odoo/17.0/odoo/tools/convert.py", line 693, in convert_xml_import
obj.parse(doc.getroot())
File "/home/odoo/src/odoo/17.0/odoo/tools/convert.py", line 613, in parse
self._tag_root(de)
File "/home/odoo/src/odoo/17.0/odoo/tools/convert.py", line 556, in _tag_root
f(rec)
File "/home/odoo/src/odoo/17.0/odoo/tools/convert.py", line 567, in _tag_root
raise ParseError(msg) from None # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
odoo.tools.convert.ParseError: while parsing /home/odoo/src/enterprise/17.0/appointment_account_payment/data/product_data.xml:8
The default Unit of Measure and the purchase Unit of Measure must be in the same category.
View error context:
'-no context-'
```
why this traceback is raised because here in default values of [``uom_po_id``](https://github.com/odoo/odoo/blob/834e8a8789d1d451f62ae1e841845baf7d3931a4/addons/product/models/product_template.py#L36) getting default value of uom_id due to that other catefory uom_id is coming and [validation](https://github.com/odoo/odoo/blob/834e8a8789d1d451f62ae1e841845baf7d3931a4/addons/product/models/product_template.py#L456)
error raised and db got blocked
opw-4313919
upg-2182151
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#187663UserWarning: unsupported operand type(s) for "==": 'res.country()' == '233' --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187821
Original PR description
UserWarning: unsupported operand type(s) for "==": 'res.country()' == '233' --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187821
Steps to reproduce: - Sales app > Configuration > Settings > Enable 'Quotation Templates' - Default template > Search more > New - Set 'Confirmation Mail' to 'Sales: Order Confirmation' - Project app > New > Enable 'Billable' in the project's settings - New Task > Set any Customer - Sales Order Item > Search More > New > Add product then save - Click 'Sales Order' button Coupled with https://github.com/odoo/enterprise/pull/73492 You'll see in the chatter that the confirmation email
Original PR description
Steps to reproduce: - Sales app > Configuration > Settings > Enable 'Quotation Templates' - Default template > Search more > New - Set 'Confirmation Mail' to 'Sales: Order Confirmation' - Project app…
Steps to reproduce: - Sales app > Configuration > Settings > Enable 'Quotation Templates' - Default template > Search more > New - Set 'Confirmation Mail' to 'Sales: Order Confirmation' - Project app > New > Enable 'Billable' in the project's settings - New Task > Set any Customer - Sales Order Item > Search More > New > Add product then save - Click 'Sales Order' button Coupled with https://github.com/odoo/enterprise/pull/73492 You'll see in the chatter that the confirmation email is sent before the product is added to the sales order, resulting in a $0 quotation document being sent to the customer. This happens because we confirm the SO at the same time as we create it (After pressing the New button). Instead we would rather confirm the SO on save, after the order line creation. The SO confirmation is necessary because we don't want people to work on tasks/projects that are still in quotation since they could hypothetically still be cancelled. opw-4190402 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#183586
When confirming a BILL via Project's Updates, the generated payment terms line will have the analytic account of the project assigned Version: 17.0+ Steps to reproduce: - Have a project (i.e. Renovations) - Create a Purchase Order - Add on the line the analytic account of the project - Go to Projects Kanban view - Open Project 3 dots menu > Reporting > Project Updates - Open the created PO, Create Bill Issue: Analytic account will be assigned to the payment term line opw-4193509
Original PR description
When confirming a BILL via Project's Updates, the generated payment terms line will have the analytic account of the project assigned Version: 17.0+ Steps to reproduce: - Have a project (i.e. Renovations) - Create a Purchase Order - Add on the line the analytic account of the project - Go to Projects Kanban view - Open Project 3 dots menu > Reporting > Project Updates - Open the created PO, Create Bill Issue: Analytic account will be assigned to the payment term line opw-4193509 Forward-Port-Of: odoo/odoo#187612
When our own bank is used as a payment means, it shouldn't be populated in the OIOUBL XML. When using Peppol, the XML would ignore the endpoint that is set in the electronic invoicing settings, the <cbc:EndpointID> should be the defined Peppol endpoint and the schemeID should be 'GLN'. task-4017019 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171945
Original PR description
When our own bank is used as a payment means, it shouldn't be populated in the OIOUBL XML. When using Peppol, the XML would ignore the endpoint that is set in the electronic invoicing settings, the <cbc:EndpointID> should be the defined Peppol endpoint and the schemeID should be 'GLN'. task-4017019 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171945