Daily updates from Odoo
Friday, November 29, 2024
20 changes
12 changes
Resolved issues and error corrections
Point of Sale now uses the same tax total calculation approach as accounting, improving consistency between receipts, orders, and financial records. This also fixes rounding issues for global tax rounding and improves support for cash rounding methods, reducing discrepancies at checkout and in reports.
Original PR description
Now we have an helper ensuring the consistency between the computation of the tax totals in both python & javascript, let's use it. Related: https://github.com/odoo/enterprise/pull/72597 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Worldline token payments now include a safeguard so repeated processing of the same payment request is recognized as the same transaction. This reduces the risk of customers being charged more than once when payment status updates happen at the same time.
Original PR description
[FIX] payment_worldline: add idempotence key for token payments Prevents a same 'request for payment' transaction to be considered as different by the provider. This avoids multiple payment for a same transaction when the webhook's response causes a concurrent update leading to a reprocess of the initial request. task-2894752
This fixes an issue where links and bold text in the email template editor could repeat or display incorrectly because some elements were written in a format browsers do not handle well. Users editing templates such as quotations should now see cleaner, more reliable content previews.
Original PR description
Issue: ====== Self-closing `a` and `strong` elements doesn't render properly. Steps to reproduce the issue: ============================= - Go to email templates - Open "Send Quotation" template - You will see the `a` element of the attachment is appearing a lot of times. Origin of the issue: ==================== Since the content of the template is in xml, using self closing `a` element is acceptable but it's not valid html so using the same content of xml into html will produce incorrect ui. Solution: ========= Change the self closing `a` and `strong` elements into opening and closing tags. opw-4322575
OAuth login routes now avoid a read-only processing mode when they may need to create a user account or record a login. This prevents some OAuth sign-ins from failing and helps ensure login activity is saved correctly.
Original PR description
Follow-up of #186319 and #186786 These routes are auth=none but aren't technically read-only, as they can create the user record and need to record the login event anyway. The signin one even as a broad catch for Exception, which would prevent the readonly->read-write fallback to work, leading to a failed login.
Fixes an issue in the HTML editor where a collaborator's avatar could disappear or move incorrectly after deleting content or adding new lines in a shared document. This keeps live collaboration indicators accurate, helping users see where others are working in real time.
Original PR description
Issue: ====== Collaborator avator disappears after delete Steps to reproduce the issue: ============================= - Open to do with 2 browsers - Write 2 lines - Put the selection of one in first…
Issue: ====== Collaborator avator disappears after delete Steps to reproduce the issue: ============================= - Open to do with 2 browsers - Write 2 lines - Put the selection of one in first line - Put the selection of the other in the second line - Select all the second line and delete - The avatar of the collaborator you delete with will disappear from the others view. Origin of the issue: ==================== `selectionchange` on document isn't triggered because : - The delete doesn't trigger it by default from the browser. - In `setSelection` in `selection_plugin` we only trigger the `selectionchange` by the line of `setBaseAndExtent` which is not triggered when the line is empty because the document selection is the `p` element and the given selection from the parameters is also the `p` element. In the other case where there is some text left, the document have the text node as anchor node while the given params have the p element so we change the selection and we trigger `selectionchange`. We need `selectionchange` to be triggered because it calls `onSelectionChange` which we use to notify the peers that our selection is changed and dispath the `oe_history_set_selection` command. So after this flow, the peer selection isn't changed and the avatar disappears because `oe_history_step` will call `onExternalHistorySteps` and then will call `refreshSelection` in the avatar plugin which will update the position and image of the collaborator. Since the text element is deleted and we don't have a new selection, `drawPeerAvatar` will find the node by its id but it's not connected to the dom so it will exit in the `anchorBlock` if condition. Solution: ========= We remove ranges and then we put selection again to force trigger the selectionchange. task-4166179w
Website forms will now treat blank required fields as missing values instead of saving them as empty text. This keeps website behavior consistent with regular forms and helps prevent incomplete records from being saved.
Original PR description
Prior to this commit, any empty field saved from the website would write an empty string as the value, thus bypassing the required constraints. Functionally, this is surprising because an empty required field on a form view would trigger an error but would save without issue in website. This commit fixes that issue by replacing the empty string by False which will trigger the required constraint.
The main Projects folder in Documents is now visible as read-only by default. This helps users find and access document folders for the projects they are already allowed to work on, without unintentionally granting edit access to the main folder.
Original PR description
The "Projects" folder is currently hidden for everyone by default. This doesn't make sense, as we want people to have access to the folders of projects they have access to. This PR makes the folder read-only by default.
The timesheet leaderboard now shows the billable time target for the employee in the currently selected company. This prevents users linked to employees in multiple companies from seeing the wrong target, improving accuracy in performance tracking.
Original PR description
Steps to reproduce: 1- Create 2 companies A and B 2- Create 2 employees (one for each company). 3- Assign 2 different values for billable_time_target to each employee. 4- Assign both employees to the same user 5- When the env company is A, the displayed value in leaderbord is the one from the user employee in company B instead of A (same as the env company) Source: - get_billable_time_target gets the values for all employees without filtering on the company, it returns a list and randomly, the js takes the first value. Fix: - get_billable_time_target filters on env.company - get_all_billable_time_targets was also fixed to filter with env.company instead of env.user.company task-4222875
The Italian point of sale now avoids automatically printing the same fiscal receipt again when a cashier returns to the receipt screen. This reduces accidental duplicate prints, saving time and preventing confusion during checkout.
Original PR description
before this PR, the fiscal printer would systematically reprint the last loaded order upon returning to the receipt screen. After this PR, the receipt is printed automatically only once. opw-4367156 opw-4338402 opw-4306960 opw-4328481 opw-4351925
Cancelled restaurant orders are now immediately communicated to the preparation display. This helps kitchen staff see cancellations right away without needing a refresh or waiting for another order update.
Original PR description
Currently, when cancelling an order, the notification is not sent to the preparation display. Steps to reproduce: ------------------- * Open both restaurant and preparation display * In the…
Currently, when cancelling an order, the notification is not sent to the preparation display.
Steps to reproduce:
-------------------
* Open both restaurant and preparation display
* In the restaurant place an order and send it to the kitchen
* Select Action > Cancel order
> Observation: The cancellation is not sent to the preparation display
Note: If you send a new order or refresh the preparation display then you can see that the order has been cancelled.
Why the fix:
------------
When cancelling order, data looks like this
`{'change': True, 'sound': False, 'category_ids': {}}`. Since `category_ids` is empty, `preparation_displays` will alsos be empty which explains why the preparation display does not receive the notification, it is simply not sent.
https://github.com/odoo/enterprise/blob/42b7b322d6c720de45661e3370397adaf74fe1f4/pos_preparation_display/models/preparation_display_order.py#L29-L40
Since all lines are canceled, we include all the different categories they cover. Now `preparation_displays` is not empty and all the displays it covers will receive a notification.
opw-4322600Customers can now make early subscription payments through the portal even when draft invoices already exist. The system cancels those draft invoices first, preventing payment failures and reducing friction in the checkout process.
Original PR description
Before this commit, when customer anticipated payment on portl, it would fail if there were already some draft invoices. This commit ensure the draft invoices are canceled before. In master, we should not create the invoice at all. taskid: 4368057
Copying a Knowledge article now correctly updates embedded views such as kanban, card, and list blocks so they point to the copied article's own items. This prevents users from accidentally seeing or working with items from the original article after using Create a Copy.
Original PR description
In the editor refactoring done in Odoo 18, we slightly changed the structure of the embedded props stored in the anchor node of the embedded views. Now, the view context is nested inside the…
In the editor refactoring done in Odoo 18, we slightly changed the structure of the embedded props stored in the anchor node of the embedded views. Now, the view context is nested inside the `viewProps` attribute of the embedded props. When the user creates a copy of an article using the "Create a Copy" button, we iterate over all the embedded views stored in the article and we update the context of the embedded views. This way if they list the article items of the original article, they must list the article items of the newly created article. This logic was introduced to allow people to start from a fresh and "ready-to-use" article. As the context has been moved in the embedded props, the check verifying if the embedded view has a context always fails and the references stored in the context are never updated. As a result, the newly created article has embedded views listing the article items of the original article which is not what we want. To fix the issue, we will read the context from the `viewProps` attribute of the embedded props and remove the last calls to `urllib` we made to encode/decode the embedded view props. Steps to reproduce: 1. Open Knowledge 2. Create an article 3. Insert an embedded view with `/kanban`, `/card` or `/list` 4. Create a few article items from the embedded view 5. Create a copy of the article you created at step 2 by clicking on the "Create a Copy" button from the kebab menu. => The embedded view in the new article lists the article items of the original article and not its own article items. TO BE: As it was the case before Odoo 18, the embedded views should list the article of the newly created article. see: https://github.com/odoo/enterprise/pull/42936 see: https://github.com/odoo/enterprise/pull/67083 task-4343222
8 changes
Resolved issues and error corrections
This update resolves an issue where component moves weren't being created when adding components from the shop floor in multi-step manufacturing workflows. The fix ensures that necessary transfer rules are triggered, regardless of the procurement method, allowing for accurate tracking of component movements within the production process. This improves the reliability of multi-step manufacturing operations.
Original PR description
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Inventory > Configuration > Warehouse Management > Warehouses - Put your warehouse in manufacturing in 2 steps - Create an MO…
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Inventory > Configuration > Warehouse Management > Warehouses - Put your warehouse in manufacturing in 2 steps - Create an MO for a product and add an operation (no need of component) - Confirm the MO and go to your operation in the shopfloor - Click on the 3 dots > Add component > add any component #### > Back to the MO: No transfer was created from stock to pre-prod ### Cause of the issue: When you add component from the shopfloor, you will trigger a call of the `add_product` method to create and confirm the raw move associated to the MO: https://github.com/odoo/enterprise/blob/2e2efe8421b2f85950e50ff102cdabf98d2d91ab/mrp_workorder/wizard/additional_product.py#L36-L37 However, if the `procure_method`` of this move is not set to mto/mtso it will not trigger other rules in order to generate the other transfers ### Note: A priori, the issue should not be reproducible in 18.0+ as this part of the code was refactored and the issue was fixed by 235047b68e6a24a14e32b94b1d4a15a580dc5ad2 opw-4236272
This update fixes an issue where the cost analysis report incorrectly displayed the 'to produce' quantity for byproducts instead of the actual quantity produced. The change ensures that the report accurately reflects the byproduct quantities used in manufacturing orders, leading to more precise cost calculations.
Original PR description
**Steps to reproduce the bug:**
- Create a storable product:
- "Finished Product" with the following BoM:
- Component: 1 unit of "C1"
- Byproducts:
- 1 unit of "By-product 1"
- 1 unit of "By-product 2"
- Create a manufacturing order to produce 5 units of the finished product.
- Confirm the MO.
- Set the quantity produced to 5 units.
- Set the quantity of byproducts to:
- By-product 1: 4 units
- By-product 2: 3 units
- Validate the MO.
- Print the cost analysis.
**Problem:**
The reported quantity does not show the actual quantity produced but
instead shows the "to produce" quantity.
opw-4312292This update ensures that attachments linked to documents remain attached during version changes, addressing a requirement for strict audit trails (GoBD) in Germany. This prevents document deletion and maintains a complete record of all document versions, crucial for regulatory compliance.
Original PR description
Normally, when using document versioning, the attachments linked to a record are re-attached to the document when changing the version. This is not compatible with the requirement for audit trail in Germany (GoBD) as we want to be sure that the document won't be deleted. This is ensure by making sure all the attachments stay attached, and can't be deleted. To reproduce: * Install Accounting and Documents, as well as l10n_de * Select/configure a German company * Create new document folder settings for Customer Invoices * Create a new invoice * Send & Print * Delete it from the attachments (it should "detach it") * On the document, change the main history version, or on the invoice, navigate through the attachments [opw-4095549](https://www.odoo.com/odoo/project.task/4095549)
This update corrects a bug where a raw move in a manufacturing order would unexpectedly become marked as 'available' after exiting the barcode module. The fix prevents a split operation from incorrectly reserving the move, ensuring accurate stock tracking. This improves the reliability of the MRP process.
Original PR description
### Steps to reproduce: - Create two storable product: Final Product (FP) and Component (COMP) - Create and confirm an MO for FP with a raw move: 1 x COMP > The move should be: "not available" since…
### Steps to reproduce: - Create two storable product: Final Product (FP) and Component (COMP) - Create and confirm an MO for FP with a raw move: 1 x COMP > The move should be: "not available" since 0 unit of COMP are in Stock - Go to the barcode module > Operations > Manufacturing - Remove the MO Ready filter > Click on your MO and then exit barcode - Go back to the MO in the back end (mrp module) #### > The raw move has been reserved and is hence marked as available. ### Cause of the issue: Exiting the barcode will launch an rpc call of the `split_uncompleted_moves` in order to split uncomplete moves in 2 if necessary (for the records to be appropriately set the next time you enter the barcode): https://github.com/odoo/enterprise/blob/71f979d5bdf88207cb94c83bd6a69633da649d1e/stock_barcode/static/src/models/barcode_picking_model.js#L1327-L1329 https://github.com/odoo/enterprise/blob/71f979d5bdf88207cb94c83bd6a69633da649d1e/stock_barcode/models/stock_move.py#L9-L11 Furthermore, since c29f61fdded2e80d0bb3c06199c6a196feac8076 in case of a production the component move are rather splitted on the move lines to avoid odd split of the component moves on the MO. However, in that case if a unassigned move is splitted, a move line will be generated and associated to that move, which makes it reserved and hence available. opw-4338827 ---
This update fixes a synchronization issue when using multiple preparation displays for point-of-sale orders. Previously, order statuses weren't consistently updated across displays, leading to discrepancies. This fix ensures order statuses are accurately reflected across all linked preparation displays, providing a more reliable view of order progress.
Original PR description
There is currently a problem of synchronization when using multiple tracking displays per pos config. Steps to reproduce: ------------------- * Configure 2 Preparation displays, 1 for the category…
There is currently a problem of synchronization when using multiple tracking displays per pos config.
Steps to reproduce:
-------------------
* Configure 2 Preparation displays, 1 for the category food, the other for
drinks. Link them both to the restaurant
* Open the two preparation displays and their preparation status
* In the restaurant, place an order for 1 food and 1 drink product
* On one of the preparation display mark the food as ready
> Observation: Both status screen will show 'ready'
* Again on the preparation display mark the food as completed
> Observation: The order disappears from both screen.
Refreshing both status screen will not show the same state
Why the fix:
------------
The status screen should be seen as an ORDER status screen.
When placing an order 1 in the restaurant, the status screen should only show it as ready when all the pos preparation display orders linked to that order are ready.
This idea behind this fix is to get the status of the order as they are in the related preparation display and to modify it with regards of other status screen that are linked to the same pos config.
Let's discuss this part:
```python
for display in other_displays:
other_display_orders = display._get_pos_orders()
for order in other_display_orders['notDone']:
if order in current_display_orders['done']:
current_display_orders['done'].remove(order)
current_display_orders['notDone'].append(order)
```
`other_display_orders` represent the preparation display orders from other preparation displays.
`current_display_orders` represents the preparation display orders related to the preparation display we just used.
Here we basically ensure that we don't show a preparation order on the status screen as done if there is another preparation order linked to the same order which is not ready.
Scenario:
* `current_display_orders = {'done': ['101', '102'], 'notDone': ['103']} `
* `other_display_orders = {'done': ['101'], 'notDone': ['102', '103']}`
* result -> `current_display_orders = {'done': ['101'], 'notDone': ['103', '102']} `
The fix does not stop here as we also need to consider 2 scenarios:
* 1, we mark a preparation display order as complete in one preparation display.
* 2, we have preparation display orders that are not on the preparation display
but still linked to the same pos config as the status screen opened
In both scenarios, we will have some tracking numbers in `orders` which will not be found in `current_display_orders`.
```python
for order in other_display_orders['done'] + other_display_orders['notDone']:
if (
order not in current_display_orders['done'] + current_display_orders['notDone']
and self.env["pos_preparation_display.order"].search(
[('pos_order_id.tracking_number', 'ilike', order)]
).pos_config_id.id in self.pos_config_ids.ids
):
stage = 'done' if order in orders['done'] else 'notDone'
current_display_orders[stage].append(order)
```
This part of the fix will look at all the orders that are not present in `current_display_orders` and if the preparation order belong to a pos order made in the pos config of the current preparation display status then it will be added in the respective stage.
Scenario:
* `current_display_orders = {'done': ['101', '102'], 'notDone': ['103']} `
* `other_display_orders = {'done': ['101'], 'notDone': ['102', '103', '104']}`
* result -> `current_display_orders = {'done': ['101'], 'notDone': ['103', '102', '104']} `
We also apply this logic when loading the status screen for the first time/or refreshing it. We want to see the status of all orders from the set of pos configs.
opw-[4265987](https://www.odoo.com/web#id=4265987&view_type=form&model=project.task)This update resolves an issue where newly created Gantt appointment events incorrectly defaulted to a duration of -23:00 hours. The fix ensures a standard 1-hour default duration is applied, and the correct appointment type is selected, improving event scheduling accuracy.
Original PR description
Steps to reproduce =================== - Open the resource schedule, and go into day mode. - Switch to tomorrow, and click new. - The start date has been changed but not the end date, which is still…
Steps to reproduce =================== - Open the resource schedule, and go into day mode. - Switch to tomorrow, and click new. - The start date has been changed but not the end date, which is still now +duration. - Which creates a default duration of `-23:00 hours`. Second issue: - Open the resource type appointment and then create the booking from the Gantt view using the new button. - We get the wrong appointment type there. Technical =========== - Earlier, the stop was calculated based on the current time instead of `start` in the default_stop. we set stop datetime inside `onAddClicked` by default to start + 1 hour to override the calendar.event's default_stop. - Earlier, we fell into the condition of fetching only the user appointment when we were not providing any resources inside the default_get method, which led to having the user-based appointment instead of the resource-based one. Here, we added a separate condition to fetch the resource-based when going through the action of resource gantt. After this PR =================== - This PR addresses the issue and fixes it by adding the default stop for 1 hour after the start time and assigning the correct appointment type. Task-4330924
This update resolves an issue where products weren't correctly displayed in deferred journal entries generated from invoices. The fix ensures that the product associated with the invoice is accurately reflected in the deferred entry, improving reporting accuracy. This prevents discrepancies in financial reporting.
Original PR description
*= account_reports,account_accountant,account_disallowed_expenses_fleet **Steps to Reproduce:** - Create 1 invoice with start date, and end date on invoice line. - Confirm the invoice. - Click on the Deferred Entries smart button. - Observe that the product is missing in the journal entry(linked to the selected journal for deferred entries). **Cause:** - The product_id is not being passed while generating deferred entries. **Technical:** IMP was done in this commit 017600af4de58482e2ff4ed1e176be88e3cd8041 but this was done from saas-17.2, so in this PR, the fix is done for v17.0 I didn't add the 'product_id' key directly to the dictionary because if any existing custom module calls this function, it breaks the flow. **task**-4345458
This update ensures that the GSTR1 reporting cron job only processes invoices that haven't been flagged as blocked. By ignoring blocked entries, we improve the accuracy of the reports generated for Indian businesses, reducing potential reporting errors and ensuring compliance.
Original PR description
In this PR: - Updated `_cron_send_gstr1_data` to ignore entries with `gstr1_blocking_level` set. - Ensures only unblocked GSTR1 entries are processed by the cron job. Forward-Port-Of: odoo/enterprise#74564