Wednesday, December 13, 2023
26 changes · master
Enhancements to existing features
Live chat welcome messages and chatbot typing indicators are now handled through a cleaner internal mechanism. This makes the feature easier to maintain while preserving the same customer-facing chat experience.
Original PR description
Before this commit, the live chat welcome and chat bot typing messages were manually added to the thread during the `insert` method. We tend to remove `insert` method in favor of more declarative code (i.e. record computed fields). This PR adapts the code to use computed fields instead of the `insert` method. part of task-3488100
The payment link wizard now only shows the WhatsApp button when an approved template is available, preventing users from clicking an option that would fail. Administrators still see the button so they can set up the required templates when needed.
Original PR description
**PURPOSE:** When the Payment Link Generation wizard opens if there are no approved templates for `payment.link.wizard` model then the `WhatsApp` button will just be noise as it will return a `ValidationError`. **SPECIFICATION:** - Do not display the button if no approved templates for the record - Button should be always visible to admin users as they can create templates. task-[3573047](https://www.odoo.com/web#id=3573047&cids=2&menu_id=4720&action=4043&model=project.task&view_type=form)
Miscellaneous changes
### Steps to reproduce: - Install **Sales** app - Open Sales app, Go to **Configuration** > **Quotation Templates** - Open a template, or create an new one - Add sections with product(s) under each, so we have a structure like: - Section 1 - Product 1 - Section 2 - Product 2 - Go to **Orders** > **Quotations** - Create a **New** Quotation - Select the recently created/updated template in the **Quotation Template** field - Click on **Confirm** - U can notice how t
Original PR description
### Steps to reproduce: - Install **Sales** app - Open Sales app, Go to **Configuration** > **Quotation Templates** - Open a template, or create an new one - Add sections with product(s) under each,…
### Steps to reproduce:
- Install **Sales** app
- Open Sales app, Go to **Configuration** > **Quotation Templates**
- Open a template, or create an new one
- Add sections with product(s) under each, so we have a structure like:
- Section 1
- Product 1
- Section 2
- Product 2
- Go to **Orders** > **Quotations**
- Create a **New** Quotation
- Select the recently created/updated template in the **Quotation Template** field
- Click on **Confirm**
- U can notice how the sections are moved to the top, missing up the structure
### Investigation:
- Each sale order order_line has a `sequence` property associated to it which defaults to **10** _if not explicitly specified_ https://github.com/odoo/odoo/blob/55b452ac0056c7075097fa1324ef53fc5090fb7a/addons/sale/models/sale_order_line.py#L41
- On Choosing a template, the `_prepare_order_line_values()` method returns the needed properties for each template line https://github.com/odoo/odoo/blob/55b452ac0056c7075097fa1324ef53fc5090fb7a/addons/sale_management/models/sale_order.py#L108
- The returned object for each template is missing the `sequence` property, resulting in it falling back to **10** when assigning it to the sale order `order_line` https://github.com/odoo/odoo/blob/55b452ac0056c7075097fa1324ef53fc5090fb7a/addons/sale_management/models/sale_order.py#L117
- Now all order_line(s) has the same `sequence` -except for the first one which has a sequence value of -99- https://github.com/odoo/odoo/blob/55b452ac0056c7075097fa1324ef53fc5090fb7a/addons/sale_management/models/sale_order.py#L114-L115
opw-3602781
Forward-Port-Of: odoo/odoo#144700The test tries to import data from an sql file. The problem is that it is trying to import partners, but when the test is ran with the l10n_co localization, one of the required field is not filled. We just change the model to import to avoid the issue with the missing required field. Linked to runbot error 32740, 32742, 32745, 32738 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have s
Original PR description
The test tries to import data from an sql file. The problem is that it is trying to import partners, but when the test is ran with the l10n_co localization, one of the required field is not filled. We just change the model to import to avoid the issue with the missing required field. Linked to runbot error 32740, 32742, 32745, 32738 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#145708
Fix a typo in an account name. Forward-Port-Of: odoo/odoo#145923 Forward-Port-Of: odoo/odoo#145713
Original PR description
Fix a typo in an account name. Forward-Port-Of: odoo/odoo#145923 Forward-Port-Of: odoo/odoo#145713
Issue: ====== Marking an activity of calender event as marked with text raises an error. Steps to reproduce the issue: ============================= -Go to any contact and create a meeting with him as an activity in the chatter. - Mark the actvity as done and add some text as feedback. - An error showing that the record is deleted. The origin of the issue: ======================== The parts of writing the description and calling `_action_done` are swapped , we need first to write t
Original PR description
Issue: ====== Marking an activity of calender event as marked with text raises an error. Steps to reproduce the issue: ============================= -Go to any contact and create a meeting with him as an activity in the chatter. - Mark the actvity as done and add some text as feedback. - An error showing that the record is deleted. The origin of the issue: ======================== The parts of writing the description and calling `_action_done` are swapped , we need first to write the description to be used later in message to be posted and also marking the activity as done will unlink the activity which will unlink the calendar event too so we can't access it anymore. opw-3623719 Forward-Port-Of: odoo/odoo#145911 Forward-Port-Of: odoo/odoo#145781
Steps to reproduce: - Install l10n_fr - Switch to a French Company (i.e. FR Company) - Create an invoice for a contact from Monaco with a VAT number => The default fiscal position is "Import/Export Hors Europe + DOM-TOM". In France, for Monaco, it should be "Domestique - France". Solution: Create a country group with France and Monaco and set it to "Domestique - France" fiscal position. opw-3617761 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.c
Original PR description
Steps to reproduce: - Install l10n_fr - Switch to a French Company (i.e. FR Company) - Create an invoice for a contact from Monaco with a VAT number => The default fiscal position is "Import/Export Hors Europe + DOM-TOM". In France, for Monaco, it should be "Domestique - France". Solution: Create a country group with France and Monaco and set it to "Domestique - France" fiscal position. opw-3617761 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#145959 Forward-Port-Of: odoo/odoo#145412
Currently there is the following issue with cached conversion rates from the "from currency" to the "to currency". When the rate of the res_currency_rate of the "to currency" changes the cache is not invalidated. Thus the cached value may be used wrongly (leading to wrong results). This commit simply invalidates all the cached rates in case we update or create a res_currency_rate. Forward-Port-Of: odoo/odoo#143847
Original PR description
Currently there is the following issue with cached conversion rates from the "from currency" to the "to currency". When the rate of the res_currency_rate of the "to currency" changes the cache is not invalidated. Thus the cached value may be used wrongly (leading to wrong results). This commit simply invalidates all the cached rates in case we update or create a res_currency_rate. Forward-Port-Of: odoo/odoo#143847
### [FIX] web: do not apply same datetime picker value Before this commit, the equality check performed by the datetime service relied on a JSON-strigified version of the value on one end, and on an array of ISO strings on the other end. This meant that the value was never equal to itself and that the `onApply` callback would be called even if the value remained unchanged. This commit fixes that by ensuring that the compared values have the same sha
Original PR description
### [FIX] web: do not apply same datetime picker value
Before this commit, the equality check performed by the datetime service
relied on a JSON-strigified version of the value on one end, and on an
array of ISO strings on the other end. This meant that the value was
never equal to itself and that the `onApply` callback would be called
even if the value remained unchanged.
This commit fixes that by ensuring that the compared values have the
same shape.
### [REF] web: add missing types for datetime hook & service
This commit adds missing type definitions for both the datetime picker
hook and service.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#145929Sepa Direct Debit is deleted from Mollie data as it seems to not support one time transactions and currently Odoo doesn't support tokenization in Mollie. Forward-Port-Of: odoo/odoo#145166
Original PR description
Sepa Direct Debit is deleted from Mollie data as it seems to not support one time transactions and currently Odoo doesn't support tokenization in Mollie. Forward-Port-Of: odoo/odoo#145166
The aim of this commit is to fix runbot build error. Before the commit: The test could fail if the EUR currency was inactive After the commit: The test activate the currency first runbot-error-build: 51509 Forward-Port-Of: odoo/odoo#145752
Original PR description
The aim of this commit is to fix runbot build error. Before the commit: The test could fail if the EUR currency was inactive After the commit: The test activate the currency first runbot-error-build: 51509 Forward-Port-Of: odoo/odoo#145752
The "Scan your badge" login option was not working properly when trying to log in to the POS shop. The barcode scanner styles were missing which caused the issue. enterprise PR: https://github.com/odoo/enterprise/pull/51651 opw-3608077 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#145627 Forward-Port-Of: odoo/odoo#143955
Original PR description
The "Scan your badge" login option was not working properly when trying to log in to the POS shop. The barcode scanner styles were missing which caused the issue. enterprise PR: https://github.com/odoo/enterprise/pull/51651 opw-3608077 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#145627 Forward-Port-Of: odoo/odoo#143955
### Summary Foreign companies that trade with non-enterprises in the EU may have a VATIN starting with "EU" instead of a country code. However, the tax ID validation does not account for that. ### Steps to reproduce * install base_vat and contacts * create a Canadian company with a tax with the format EU00000000 => you should be met with a validation error. opw-3551347 Forward-Port-Of: odoo/odoo#140630
Original PR description
### Summary Foreign companies that trade with non-enterprises in the EU may have a VATIN starting with "EU" instead of a country code. However, the tax ID validation does not account for that. ### Steps to reproduce * install base_vat and contacts * create a Canadian company with a tax with the format EU00000000 => you should be met with a validation error. opw-3551347 Forward-Port-Of: odoo/odoo#140630
Usecase to reproduce: - Install purchase and mrp - On a product set both routes manufacture and buy - Create a BoM for the product and define a seller - Sell a unit - Open the replenishment. Buy or manufacture is set as route - Go to the settings and set the route not sellected to the smallest sequence - Delete the orderpoint and open the replenishment menu again. Expected behavior: The new route with smallest sequence is selected Current behavior: The same rule is selected and th
Original PR description
Usecase to reproduce: - Install purchase and mrp - On a product set both routes manufacture and buy - Create a BoM for the product and define a seller - Sell a unit - Open the replenishment. Buy or…
Usecase to reproduce: - Install purchase and mrp - On a product set both routes manufacture and buy - Create a BoM for the product and define a seller - Sell a unit - Open the replenishment. Buy or manufacture is set as route - Go to the settings and set the route not sellected to the smallest sequence - Delete the orderpoint and open the replenishment menu again. Expected behavior: The new route with smallest sequence is selected Current behavior: The same rule is selected and the order used by _get_rule and to compute the lead time is bypass It happens because both override of the method are at the same level (super of stock) and are call arbitrary one before the other. In order to fix it uses rule_ids that was computed before calling the function and it contains the real rules used to compute the lead time 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#143836
Issue Description: ================== Issue: Inability to validate transfers generated from the POS's "ship later" feature. Steps to Reproduce: =================== 1. Create a new user or configure Marc Demo to have only User access in Sales, Inventory, and POS. 2. Create a storable product that can be sold in POS, where the product category uses automatic FIFO valuation. 3. In the POS configuration, enable the "Ship Later" feature. 4. Log in as the new user (e.g., Marc Demo). 5. Sell
Original PR description
Issue Description: ================== Issue: Inability to validate transfers generated from the POS's "ship later" feature. Steps to Reproduce: =================== 1. Create a new user or configure…
Issue Description: ================== Issue: Inability to validate transfers generated from the POS's "ship later" feature. Steps to Reproduce: =================== 1. Create a new user or configure Marc Demo to have only User access in Sales, Inventory, and POS. 2. Create a storable product that can be sold in POS, where the product category uses automatic FIFO valuation. 3. In the POS configuration, enable the "Ship Later" feature. 4. Log in as the new user (e.g., Marc Demo). 5. Sell the new product in POS, choose "ship later," and confirm the order. 6. Go to Inventory and locate the created transfer (reference Shop/000X). You may need to disable all filters to find it. 7. Attempt to validate the transfer and encounter an access error because the User is not an Accounting or Purchase user. Proposed Solution: ================== The solution involves adding sudo privileges to the creation of account moves in the POS. This will allow the validation of transfers generated by the "ship later" feature, even for users who are not designated as Accounting or Purchase users. By implementing sudo, we can ensure that the inventory valuation and account moves are correctly processed, resolving the access issue that arises during transfer validation in the POS system. opw-3572111 Forward-Port-Of: odoo/odoo#145523
Versions: --------- - 16.0+ Steps to reproduce: ------------------- 1. In Timesheets, add a new line; 2. link it to a Sale Order project; 3. make it non-billable by clearing the Sale Order Item field; 4. select related project in Project / Configuration / Projects; 5. in Invoicing tab, add yourself and a Sales Order Item, then save; 6. go back to Timesheets; 7. check the Sales Order Item field of the timesheet you created. Issue: ------ Sales Order Item was changed automaticall
Original PR description
Versions: --------- - 16.0+ Steps to reproduce: ------------------- 1. In Timesheets, add a new line; 2. link it to a Sale Order project; 3. make it non-billable by clearing the Sale Order Item…
Versions: --------- - 16.0+ Steps to reproduce: ------------------- 1. In Timesheets, add a new line; 2. link it to a Sale Order project; 3. make it non-billable by clearing the Sale Order Item field; 4. select related project in Project / Configuration / Projects; 5. in Invoicing tab, add yourself and a Sales Order Item, then save; 6. go back to Timesheets; 7. check the Sales Order Item field of the timesheet you created. Issue: ------ Sales Order Item was changed automatically, this shouldn't happen after a manual change. Cause: ------ The `so_line_field` widget used the `this.changeOnEmpty` attribute to check whether `is_so_line_edited` should be set, but this was removed in 1ecdbfcfbffae66544bfec578359ac4a6b6bc416, hence the field will never be set when clearing the `so_field` value. Solution: --------- On a field change, compare the previous ID of `so_line` with the new ID, and set `is_so_line_edited` to `true` if they're different. Related: -------- odoo/enterprise#52544 opw-3547725 Forward-Port-Of: odoo/odoo#145821
See commit [1] for in-depth explanation and framework-js change but basically, `renderToElement` do not allow multiple root nodes since [2]. The fix is just about using the correct method to render multiple root nodes. Without the fix, it just crashed when you click on the page dependencies links. Step to reproduce: - Go to / - Open Page Properties - Edit / to /test - A list of possible dependencies will be shown, it's a link that can be clicked to open a tooltip to have more details
Original PR description
See commit [1] for in-depth explanation and framework-js change but basically, `renderToElement` do not allow multiple root nodes since [2]. The fix is just about using the correct method to render multiple root nodes. Without the fix, it just crashed when you click on the page dependencies links. Step to reproduce: - Go to / - Open Page Properties - Edit / to /test - A list of possible dependencies will be shown, it's a link that can be clicked to open a tooltip to have more details - Clicking on it crash without this commit [1]: https://github.com/odoo/odoo/commit/2cff7e4094ebb4b56ab17a1462ff358b4b3e7ffd [2]: https://github.com/odoo/odoo/commit/6303a3eacdca012649a2ffda627b65c17a7217f1 Forward-Port-Of: odoo/odoo#145715
This pull request changes the accounting reports area, but the provided title, description, and commit message do not explain the intended business outcome. Based on the changed file, the impact appears limited to reporting behavior and should be reviewed once the work-in-progress details are clarified.
Original PR description
wip !
Issue: traceback when opening the accounting app with Marc Demo (if its Accounting access rights is "Bookkeeper" or "Read-Only"). "You are not allowed to access 'Account Report Async Export' (account.report.async.export) records. This operation is allowed for the following groups: - Accounting/Accountant Contact your administrator to request access if necessary. " This is raised when loading the dashboard of the accounting app (see `_get_journal_dashboard_data_batched` in l10n_fr_r
Original PR description
Issue: traceback when opening the accounting app with Marc Demo (if its Accounting access rights is "Bookkeeper" or "Read-Only"). "You are not allowed to access 'Account Report Async Export' (account.report.async.export) records. This operation is allowed for the following groups: - Accounting/Accountant Contact your administrator to request access if necessary. " This is raised when loading the dashboard of the accounting app (see `_get_journal_dashboard_data_batched` in l10n_fr_reports). Solved by adding a readonly ir.model.access for the `account.report.async.export` model. runbot error: 28388 Forward-Port-Of: odoo/enterprise#52618
Steps to reproduce: - Install `industry_fsm_stock`. - Create a new warehouse. - Assign you a default warehouse on your user's profile. - For a defined product ensure there is stock in the 2 warehouses. - Create a new FSM task, and click on the add product stat button. - You should see that the On Hand stock displayed if the stock of all warehouse. Cause: This issue happen because, when retreiving the `qty_available` for the products, the context doesn't contain the warehouse that shoul
Original PR description
Steps to reproduce: - Install `industry_fsm_stock`. - Create a new warehouse. - Assign you a default warehouse on your user's profile. - For a defined product ensure there is stock in the 2 warehouses. - Create a new FSM task, and click on the add product stat button. - You should see that the On Hand stock displayed if the stock of all warehouse. Cause: This issue happen because, when retreiving the `qty_available` for the products, the context doesn't contain the warehouse that should be used, so the method `_compute_quantities` get quantities from all warehouse. Solution: Override `action_fsm_view_material` in industry_fsm_stock to add the user default warehouse in the context. opw-3516524 Forward-Port-Of: odoo/enterprise#52444 Forward-Port-Of: odoo/enterprise#51400
**Steps:** - Open Timesheet > Timesheet to Validate - Switch to the Kanban View **Issue:** - Abnormal spacing between the buttons 'New' and 'Validate' **Cause:** - The button 'Validate' is given the property ms-2 which was appropriate for the older version, but it won't be needed in the new code as gap-1 is given. **Fix:** - Removing ms-2 class from the Validate button **Task:** 3394985 Forward-Port-Of: odoo/enterprise#43583
Original PR description
**Steps:** - Open Timesheet > Timesheet to Validate - Switch to the Kanban View **Issue:** - Abnormal spacing between the buttons 'New' and 'Validate' **Cause:** - The button 'Validate' is given the property ms-2 which was appropriate for the older version, but it won't be needed in the new code as gap-1 is given. **Fix:** - Removing ms-2 class from the Validate button **Task:** 3394985 Forward-Port-Of: odoo/enterprise#43583
The "Scan your badge" login option was not working properly when trying to log in to the POS shop. The barcode scanner styles were missing which caused the issue. community PR: https://github.com/odoo/odoo/pull/143955 opw-3608077 Forward-Port-Of: odoo/enterprise#52464 Forward-Port-Of: odoo/enterprise#51651
Original PR description
The "Scan your badge" login option was not working properly when trying to log in to the POS shop. The barcode scanner styles were missing which caused the issue. community PR: https://github.com/odoo/odoo/pull/143955 opw-3608077 Forward-Port-Of: odoo/enterprise#52464 Forward-Port-Of: odoo/enterprise#51651
Collection of urgent fixes to the shop floor, see commits for details. Task: 3549953 Forward-Port-Of: odoo/enterprise#50148
Original PR description
Collection of urgent fixes to the shop floor, see commits for details. Task: 3549953 Forward-Port-Of: odoo/enterprise#50148
This commit fixes the behavior of the 'Quick Create' attribute edition from the view editor in Studio. Before this commit, the value was not being read properly, and didn't showed the correct value in the UI. A test has been added, asserting the update of the checkbox value in the sidebar. opw-3614654 Forward-Port-Of: odoo/enterprise#52541 Forward-Port-Of: odoo/enterprise#52341
Original PR description
This commit fixes the behavior of the 'Quick Create' attribute edition from the view editor in Studio. Before this commit, the value was not being read properly, and didn't showed the correct value in the UI. A test has been added, asserting the update of the checkbox value in the sidebar. opw-3614654 Forward-Port-Of: odoo/enterprise#52541 Forward-Port-Of: odoo/enterprise#52341
Description of the issue/behavior this commit fixes: On the accounting dashboard, when at least one items is to be reconciled on a cash journal, the box of that journal shows two reconcile buttons. This behavior comes from opw-3384351 which was targetting 16.2 and was fw to master while it should have stopped at 16.3. From 16.4, the reconcile button is managed for cash journals. --- Desired behavior after this commit is merged: This commit reverses the problematic fix as from 1
Original PR description
Description of the issue/behavior this commit fixes: On the accounting dashboard, when at least one items is to be reconciled on a cash journal, the box of that journal shows two reconcile buttons. This behavior comes from opw-3384351 which was targetting 16.2 and was fw to master while it should have stopped at 16.3. From 16.4, the reconcile button is managed for cash journals. --- Desired behavior after this commit is merged: This commit reverses the problematic fix as from 16.4. With this commit, only one button shows up at any time. --- task-3624210 Forward-Port-Of: odoo/enterprise#52241
Before: <img width="391" alt="image" src="https://github.com/odoo/enterprise/assets/35101914/087b23c6-0771-4f71-a7d2-276f3494f7ba"> After: <img width="428" alt="image" src="https://github.com/odoo/enterprise/assets/35101914/e98ae127-2836-4bc6-8a9c-6bbb08c890a1"> Forward-Port-Of: odoo/enterprise#52317
Original PR description
Before: <img width="391" alt="image" src="https://github.com/odoo/enterprise/assets/35101914/087b23c6-0771-4f71-a7d2-276f3494f7ba"> After: <img width="428" alt="image" src="https://github.com/odoo/enterprise/assets/35101914/e98ae127-2836-4bc6-8a9c-6bbb08c890a1"> Forward-Port-Of: odoo/enterprise#52317