Friday, September 1, 2023
24 changes · master
New functionality added to Odoo
Adds WhatsApp integration so businesses can send approved WhatsApp templates and follow-up messages directly from Odoo documents, events, and point of sale. It also supports incoming WhatsApp conversations, media attachments, opt-out handling, and configuration tools to manage phone accounts and templates.
Original PR description
### WhatsApp template - Send Whatsapp from any document by creating a WhatsApp template for that document. - We can only send a template if the user replay then we can do a normal message for 24…
### WhatsApp template - Send Whatsapp from any document by creating a WhatsApp template for that document. - We can only send a template if the user replay then we can do a normal message for 24 hours of the last message from the user - it has fields that are required by https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-message-templates - select a model where this applied - if a document PDF need to be attached then select the report id - for dynamic values, you can use a User name, User mobile, Free text, Field of model - Send for approval after creating it OR if it is already created in WhatsApp then use sync from WhatsApp phone - If we send a message from the list view it will be sent by scheduled action ### WhatsApp Phone Configuration - Add a new model where we add all configuration details - Also, add allowed companies and notify users to send notification - sync templates from WhatsApp in one click ### Receive message: - if we send any templates in the past 15 days then we create a new mail channel with the last template message document (In this case we also post one message in the document that the new channel is created) - else we create a channel with notify user set in WhatsApp phone configuration - We support text, documents, images, audio, video, location ### Reaction to messages: - right now we only support received Reaction ### Send messages: - Whatsapp is only allowed to send messages if there is any message from the user in the past 24 hours so we block type in channel if there is no replay from the user in the past 24 hours - We can send text, documents, images, audio and video ### Blacklist by Whatsapp user - Create a new model to manage the blacklist - If the user sends text like "STOP", "UNSUBSCRIBE" and "STOP PROMOTIONS" (support translation) - blacklist so now from odoo we can't send a message to that user until the user sends another message or anyone manually change in Blacklist - this is used because if we do not stop the message if the user does not need it then if that user is reported the same to WhatsApp that WhatsApp number may be blocked - opt-out required for maintained good quality https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates ### Blacklist by Odoo user - add and remove mobile numbers manually in this list - if it's added then we ignore every message received by that user - this is useful when someone sends too many messages or sends big files frequently ### Event - A WhatsApp template is configurable in communication in event configuration ### Point of sale - There is a text box on the receipt screen to send receipts by WhatsApp (if the invoice is ticked and the invoice template is selected then the invoice is also sent) - User active this from POS configuration and selected template for POS receipt and Invoice task - 2377154
Enhancements to existing features
Subscription analysis now includes Quantity as an available measure, giving teams another way to review subscription performance. The wording around Subscription Status is also made more consistent, helping users interpret subscription stages more clearly across related views and reports.
Original PR description
- Add "Quantity" in the list of measure in Subscriptions analysis - Generalise the use of "Subscription Status" for subscription_stage task-id: 3460063
Resolved issues and error corrections
Forms now update client-side visibility and requirement rules immediately when users add related records that have not yet been saved. Server-facing filters and defaults continue to ignore those temporary records, reducing the risk of errors while keeping the interface responsive.
Code cleanup and technical improvements
This update modernizes internal automated tests across multiple Odoo Enterprise apps by replacing older jQuery-based text checks with native browser checks. It helps make tests more reliable and prevents rare infinite-loop situations during test execution, with no direct change to end-user features.
Miscellaneous changes
The #, link will be linkified appropriately via 'social_post_formatter'. Task-3109584 Forward-Port-Of: odoo/enterprise#39763
Original PR description
The #, link will be linkified appropriately via 'social_post_formatter'. Task-3109584 Forward-Port-Of: odoo/enterprise#39763
Facebook stream comments now display attached images directly inside the comment message bubble. This makes social conversations easier to review because users can see the full comment context without opening images separately.
Original PR description
Purpose ======= Show the comments images inside the message bubble, for the Facebook stream posts. Task-3339389
Studio approval rules are easier to configure and understand, with clearer screens, tooltips, labels, and editable notification messages. Businesses can now notify selected users and control approval sequencing so requests happen in the right order.
Original PR description
This commit improves the approvals feature by adding multiple behaviors. Firstly, the UI of the form and list views corresponding to the approval rules has been revamped and improved with new tooltips, new options and better labels. Those new options are the following: - users_to_notify: list of users to notify by a note in the chatter by mentionning users in the message body. - notification_order: when approvals have a higher notification_order, activities and message to ask for approval is postponed until all approval entries from rules with lower notification order are approved. Secondly, the notification can now display a message that is editable, instead of a generic list of missing approvals. Finally, the Studio sidebar has been updated with the newest additions, that are fully editable. The code has been reworked to use the Record component, as well as fields components. task-3444754
Payroll employee declarations can now be generated and published to employee portals through a shared process that runs in the background. This helps reduce failures from large batches, improves the declaration workflow, and supports Belgian and Swiss payroll document needs more consistently.
The VoIP calling library now loads only for users who have VoIP credentials. This reduces unnecessary loading for other users, improving efficiency without changing the calling experience for VoIP users.
Original PR description
This commit creates a separate bundle for the SIP.js library and only loads it when the current user can use VoIP (i.e. when they have VoIP credentials).
Signing request emails now present the expiration date in an improved way. This makes deadlines easier for recipients to understand, helping reduce missed or delayed signatures.
Original PR description
UX change for the expiration date in mail. task-id: 3470270
Fields that are only needed as dependencies in forms are now treated as read-only unless explicitly made editable. This prevents accidental edits and avoids sending unintended data when records are created or updated.
Original PR description
The purpose of this commit is to make fieldDependencies are readonly by default. This avoids making fields unintentionally editable. If the field is editable, it will be sent during create/write, which is what we want to avoid.
Use case:
Go to a form view with 2 fields "a" which is readonly and "b" which has "a" as fieldDependencies.
Before this commit:
Record Datapoint thinks that field "a" is editable
After this commit:
Record Datapoint thinks that field "a" is readonlyAfter regenerating employee work entries from the Gantt view, the screen now refreshes automatically so users can immediately see the updated entries. This removes the need to manually reload the page and makes payroll or scheduling checks more reliable.
Original PR description
task-3382376
Knowledge macros are now more reliable when interacting with form views, chatter, attachments, and rich-text fields. This reduces stalled or incorrect automation and makes Knowledge actions work across more business records that include editable note or description fields.
Original PR description
Keep only one form controller patch in Knowledge. Refine the way the chatter and html form fields are detected for Knowledge macros: - Instead of updating the `commandsRecordInfo` at every patch if…
Keep only one form controller patch in Knowledge. Refine the way the chatter and html form fields are detected for Knowledge macros: - Instead of updating the `commandsRecordInfo` at every patch if the record's id changed, it can be done as an `onWillUnMount` hook, since we only care about the last visited record of the form view. - Use a `CallbackRecorder` to accurately ask the `Chatter` whether the current user is able to send messages or attach files, instead of relying only on the presence of the chatter in the `xmlDoc`. - Add/Move some functions related to registering/discarding/validating a `commandsRecordInfo` in the `KnowledgeCommandsService` to limit the amount of functions added in the `FormController`. Use action service to restore the form view instead of clicking on the breadcrumbs in the DOM. Breadcrumbs are only checked to ensure that the current view has a breadcrumbs history. This is more robust against future designs of the breadcrumbs (where not every element of the breadcrumbs list is displayed directly as a link (some of them can be hidden in a popper). Add comments to better explain the macro processes and the `KnowledgeCommandsService`. Remove usage of `interval` macro property as it is obsolete since [1]. Add a timeout of 10 seconds for macros, to give back control to the user if a macro is stalled. Knowledge macros rely on the name attribute of a notebook page to switch between tabs in a Form notebook. That attribute is not mandatory, so some views with a valid html_field did not have one. This commit add the name attribute so those fields can now be manipulated by Knowledge macros. [1]: https://github.com/odoo/odoo/commit/3a798039d6f200f8e28448ddb6a2d3c46654a203 task-3410128
Fixed an issue where My Timesheets could show an error instead of sample data when no timesheet entries were available. The grid also now avoids overlapping row and section labels with the empty-state helper, making the empty view clearer for users.
Related form fields used behind the scenes are now treated as read-only unless explicitly made editable. This prevents unintended changes from being saved when creating or updating records, reducing the risk of accidental data edits.
Original PR description
The purpose of this commit is to make fieldDependencies are readonly by default. This avoids making fields unintentionally editable. If the field is editable, it will be sent during create/write, which is what we want to avoid.
Use case:
Go to a form view with 2 fields "a" which is readonly and "b" which has "a" as fieldDependencies.
Before this commit:
Record Datapoint thinks that field "a" is editable
After this commit:
Record Datapoint thinks that field "a" is readonlyOriginal PR description
* = approvals, crm_enterprise, documents_spreadsheet, test_mail_enterprise, timesheet_grid, website_helpdesk_livechat The choice was made to have "trimmed text" check rather than "contains" to have more robust tests, at the cost of slightly more effort to write complete and unique asserts. There is no direct speed improvement from this one, but it is one step closer to removing jQuery. Moreover, it will fix infinite loops in some situations, because jQuery selectors would write attributes on the body, which would trigger the mutation observer, which itself will call the selector again. https://github.com/odoo/odoo/pull/133717
This update removes outdated compatibility code across Manufacturing Planning, Barcode, Enterprise web navigation, Studio, and Worksheet areas. It helps keep the platform easier to maintain and better aligned with the current interface framework, with no intended change to day-to-day business workflows.
Original PR description
*: mrp_mps, stock_barcode, web_enterprise, web_studio, worksheet Part of task-id 3439226
The shop floor manufacturing app now uses one shared data model instead of several separate ones, reducing repeated data loading and making screens more reliable. The update also removes an unused tablet view and fixes demo data and small workflow issues, such as undoing a completed stock move.
Original PR description
Currently the shop floor app is working with 4 differents relationalModel. It's an issue for the following points: - It requires 4 rpc to load the server's data. Now with the unity read, other views only require one for all differents model - Inside the app we have to do the match between x2m objects. We created multiple function to get the sub records base on a lot of array browsing. With the new related key in the params, it could be done automaticaly. - There are reload everywhere in the code and sometimes, they forgot to load a related object (e.g. following a public method) This PR create a single model and clean all the reload. Using only a single one on mrp.display (and propagate it by the env) It also aim to have all the information on the model in a single function. (relation, domain, order) Minor fix on demo data, the operation are activated while the workorders settings has been removed by default
#### [FIX] mrp_workorder: keep the move button clickable > Before this commit, the button to mark the move's qty as done was disabled once the demand is filled. This commit removes the "disabled" CSS class and replaces it by other CSS classes to keep the same style while still be able to click again on this button. #### [FIX] mrp_workorder: display register by-product > In the Shop Floor, the by-product moves were displayed as any other moves, so there was no distinction between a by-produ
Original PR description
#### [FIX] mrp_workorder: keep the move button clickable > Before this commit, the button to mark the move's qty as done was disabled once the demand is filled. This commit removes the "disabled" CSS class and replaces it by other CSS classes to keep the same style while still be able to click again on this button. #### [FIX] mrp_workorder: display register by-product > In the Shop Floor, the by-product moves were displayed as any other moves, so there was no distinction between a by-product move and a raw move. With this commit, instead of displaying only the name of the product (like for the raw moves), it will display "Register by-product's name" (like the final product). task-3456817 Forward-Port-Of: odoo/enterprise#45784
This error occurs when the next() function has no more items to retrieve from the iterator and we receive an empty `attachments_iter` when calling the next() function. To produce this error turn on the developer mode and directly open the `sign.template` model `form view` from the `Open View` and click on the save button without entering anything. see the traceback: ``` StopIteration: null File "odoo/http.py", line 2134, in __call__ response = request._serve_db() File "odoo/ht
Original PR description
This error occurs when the next() function has no more items to retrieve from the iterator and we receive an empty `attachments_iter` when calling the next() function. To produce this error turn on…
This error occurs when the next() function has no more items to retrieve from the iterator and we receive an empty `attachments_iter` when calling the next() function.
To produce this error turn on the developer mode and directly open the `sign.template` model `form view` from the `Open View` and click on the save button without entering anything.
see the traceback:
```
StopIteration: null
File "odoo/http.py", line 2134, in __call__
response = request._serve_db()
File "odoo/http.py", line 1710, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1737, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1938, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 191, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 717, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 30, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 26, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 459, in call_kw
result = _call_kw_model_create(method, model, args, kwargs)
File "odoo/api.py", line 439, in _call_kw_model_create
result = method(recs, *args, **kwargs)
File "<decorator-gen-235>", line 2, in create
File "odoo/api.py", line 409, in _model_create_multi
return create(self, [arg])
File "home/odoo/src/enterprise/saas-16.4/sign/models/sign_template.py", line 109, in create
val['attachment_id'] = next(attachments_iter).id
```
To handle this issue we have added a try-except block. using that if we do not get an `attachment_id` or `name`, the record will not be saved.
sentry-4410298400
Forward-Port-Of: odoo/enterprise#46158If the actual date of an outgoing stock move is out of the mps dates range, a traceback will appear To reproduce the issue: (Need `sale_management`) 1. In Settings: - Enable Multi-Step Routes - Configure MPS: - Range: Daily - Number: 7 2. Create a product P 3. Add P in MPS 4. Inventory > Configuration > Rules, edit "Pull from Stock to Custo": - Lead Time: 10 days 5. Create and confirm a SO with P: - Delivery Date: today + 15 days 6. Open MPS Error: an Od
Original PR description
If the actual date of an outgoing stock move is out of the mps dates range, a traceback will appear To reproduce the issue: (Need `sale_management`) 1. In Settings: - Enable Multi-Step Routes -…
If the actual date of an outgoing stock move is out of the mps dates
range, a traceback will appear
To reproduce the issue:
(Need `sale_management`)
1. In Settings:
- Enable Multi-Step Routes
- Configure MPS:
- Range: Daily
- Number: 7
2. Create a product P
3. Add P in MPS
4. Inventory > Configuration > Rules, edit "Pull from Stock to Custo":
- Lead Time: 10 days
5. Create and confirm a SO with P:
- Delivery Date: today + 15 days
6. Open MPS
Error: an Odoo Server Error appears: "IndexError: list index out of
range"
When confirming the SO, a procurement has been created for "today +
15 days". Then, the delivery rule has been used, its lead time has
been applied: the SM is created with a date equal to "today + 5
days", which is inside MPS dates range. As a result, when getting
the outgoing SM for the MPS:
https://github.com/odoo/enterprise/blob/c679d196ac165a8e62aefd2fd5fc69e103c6ebdd/mrp_mps/models/mrp_mps.py#L891-L903
In `_get_moves_and_date` we find the SM and cancel the rule lead
time (so we get the actual expected date): we have a tuple with the
SM and "today + 15 days". But here is the issue: in the while-loop,
we try to find which range index corresponds to that date -> it is
not possible as we are out of dates ranges -> index will be greater
than `len(date_range)` -> `IndexError`
OPW-3372579
Forward-Port-Of: odoo/enterprise#46569
Forward-Port-Of: odoo/enterprise#46293To reproduce ============ - create a document with Signature - set its validity date and send it - change your computer's date to future after the validity date - the request should be in Expired state (if it's not the case, run the Sign crone manually on server actions) - try to open the expired request, an error is raised Problem ======= on `sign_log` we try to set the field `request_sate` to `expired` which is not a valid value as it was not defined in the selection. Solution =
Original PR description
To reproduce ============ - create a document with Signature - set its validity date and send it - change your computer's date to future after the validity date - the request should be in Expired state (if it's not the case, run the Sign crone manually on server actions) - try to open the expired request, an error is raised Problem ======= on `sign_log` we try to set the field `request_sate` to `expired` which is not a valid value as it was not defined in the selection. Solution ======== as adding a value at `field.Selection` is not safe on stable, we will consider expired requests as cancelled in logs, in master we put the proper fix. opw-3473467 Forward-Port-Of: odoo/enterprise#46468
This commit fixes layout issues, in this case margin issue with the hierarchy panel, and adapts design for Milk. task-3326357 part of task-3326263 Forward-Port-Of: odoo/enterprise#41038
Original PR description
This commit fixes layout issues, in this case margin issue with the hierarchy panel, and adapts design for Milk. task-3326357 part of task-3326263 Forward-Port-Of: odoo/enterprise#41038
With the demo data: - Enable workorders - Create a table and a drawec with SEC-ASSEM BoM Some moves are on incorrect production. It's due to a mistake checking the production key in the record and not in record.data Forward-Port-Of: odoo/enterprise#46316
Original PR description
With the demo data: - Enable workorders - Create a table and a drawec with SEC-ASSEM BoM Some moves are on incorrect production. It's due to a mistake checking the production key in the record and not in record.data Forward-Port-Of: odoo/enterprise#46316
Purpose: -------- This commit makes sure that portal users also have published articles in their sidebar. As unlike internal users they cannot join these articles by searching them, these articles should always be visible in their sidebar. Otherwise, they would see fewer articles than non-logged users. This issue was introduced during the [refactoring of the sidebar](https://github.com/odoo/enterprise/commit/b55ee8f06d7990fc71ee2430029775d5e8277020) Task-3346593 Forward-Port-Of: odoo/en
Original PR description
Purpose: -------- This commit makes sure that portal users also have published articles in their sidebar. As unlike internal users they cannot join these articles by searching them, these articles should always be visible in their sidebar. Otherwise, they would see fewer articles than non-logged users. This issue was introduced during the [refactoring of the sidebar](https://github.com/odoo/enterprise/commit/b55ee8f06d7990fc71ee2430029775d5e8277020) Task-3346593 Forward-Port-Of: odoo/enterprise#45469