Sunday, May 18, 2025
7 changes · master
Resolved issues and error corrections
This fixes an issue in the web guided tour system related to drag-and-drop steps. It helps automated onboarding or training flows run more reliably, reducing interruptions when users or tests follow guided actions.
Original PR description
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
This update fixes and standardizes internal documentation across many Odoo modules so automated documentation can be generated more reliably. It helps future API and model documentation show accurate parameters, types, examples, and guidance for teams using or extending Odoo.
Original PR description
We are doing a new `/doc` endpoint where we list all the models, their fields, their public methods. For every public method we list the parameters, their type, their default value and a help…
This update fixes formatting issues in internal documentation comments across several Odoo Enterprise apps. It helps automated quality checks pass and keeps developer-facing guidance clearer, with no expected change to day-to-day user workflows.
Miscellaneous changes
**purpose of this PR :** The name was appearing as undefined because message.author.name was not set for portal users. to handle this, we used `message.authorName` directly. also it was changed to `message.authorName` to be consistent with the rest of the code. task-[4782291](https://www.odoo.com/odoo/project/1519/tasks/4782291) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209389
Original PR description
**purpose of this PR :** The name was appearing as undefined because message.author.name was not set for portal users. to handle this, we used `message.authorName` directly. also it was changed to `message.authorName` to be consistent with the rest of the code. task-[4782291](https://www.odoo.com/odoo/project/1519/tasks/4782291) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209389
We are doing a new `/doc` endpoint where we list all the models, their fields, their public methods.
For every public method we list the parameters, their type, their default value and a help message.
We also provide with actual *runnable in the browser* examples how to call those methods in RPC.
The problem is that we fail to parse the docstring in far too many functions, because the rst is broken, or because not all parameters are correctly documented.
So, because we are very sane people, we decided to...

(plus it makes for an excellent thing to talk about on Friday :smiling_imp:)
### Fix all `:param:` found in docstring
**Typo in parameter name**
```py
def foo(self, bar):
"""
:param baz: blablabla
"""
```
**Malformed tag**
```py
""":param: baz blablabla"""
```
**Inconsistent type**
```py
def foo(self, bar: int | float):
"""
:param int bar: blablabla
"""
```
**Bogus `**kwargs`**
We also noted several functions that are abusing `**kwargs` but actually document a bunch of parameters. We decided not to lint those, and to only emits a logging.info. I wish to change them someday.
```
def foo(self, **kwargs):
"""
:param bar: blablabla
:param egg: blablabla
:param spam: blablabla
"""
```
There are also other mistakes we fixed, just read the commit n°2
### reStructuredText syntax error
While working on the first linter, we had to silence the docutils parser because it emitted too many warnings for badly structured rst.
The commit n°3 enabled those warnings and it reported several hundreds of broken docstrings.
With commit n°4 we decided on a per-module approach, starting with base (and base-inherited models), because there were damn too many docstrings to fix.
The common mistakes were:
**Missing empty line before list**
```rst
Items:
- one
- two
```
instead of
```rst
Items:
- one
- two
```
**Indented list**
```rst
Items:
- one
- two
```
instead of
```rst
Items:
- one
- two
```
**Bad code block**
```rst
:return: a list in the form
{
"a": 1,
}
```
instead of either
```rst
:return: a list in the
form::
{
"a": 1,
}
```
or
```rst
:return: a list in the form
::
{
"a": 1,
}
```
---
## Review
I had to decide on a few short-coming to get to a point where I can merge something. e.g. I stopped to care about changing `see the method create` to `see :meth:create`, or to surround technical terms (e.g. parameters) with a literal (double backtick).
If you wanna change stuff, just get in touch with me and please commit directly on-top of the branch with your changes.
Online rst editor: https://rsted.info.ucl.ac.be/
A script I made: https://gist.github.com/Julien00859/822835b0c75e8bfe0e1c003a32c029d2When the `marketing_automation_whatsapp` module is installed, if a user **without** the "Marketing Automation / User" group but **with** the "WhatsApp / Administrator" group sends a WhatsApp message, the "WhatsApp: Send In Queue Messages" cron may crash with an access error. This happens because the system tries to access marketing traces with the user that sent the message. However, marketing traces are restricted to Marketing Automation users. As a result, all WhatsApp messages in the same
Original PR description
When the `marketing_automation_whatsapp` module is installed, if a user **without** the "Marketing Automation / User" group but **with** the "WhatsApp / Administrator" group sends a WhatsApp message, the "WhatsApp: Send In Queue Messages" cron may crash with an access error. This happens because the system tries to access marketing traces with the user that sent the message. However, marketing traces are restricted to Marketing Automation users. As a result, all WhatsApp messages in the same batch are blocked indefinitely, even those that could otherwise be sent successfully. opw-4678339 Forward-Port-Of: odoo/enterprise#85658 Forward-Port-Of: odoo/enterprise#84386
To be able to configure salary journals and access rule parameters, we reintroduce back the salary menu in configuration Forward-Port-Of: odoo/enterprise#85647 Forward-Port-Of: odoo/enterprise#85288
Original PR description
To be able to configure salary journals and access rule parameters, we reintroduce back the salary menu in configuration Forward-Port-Of: odoo/enterprise#85647 Forward-Port-Of: odoo/enterprise#85288
Implement new Swiss municipality OFS number assignment for ERP systems based on 2025 AFC list. This commit updates the address validation and municipality assignment logic in the ERP system to align with the new "Liste des communes OFS 2025 pour l’attribution du numéro de commune au code postal" published by the Swiss Federal Tax Administration (AFC) for withholding tax purposes. Forward-Port-Of: odoo/enterprise#85662 Forward-Port-Of: odoo/enterprise#84859
Original PR description
Implement new Swiss municipality OFS number assignment for ERP systems based on 2025 AFC list. This commit updates the address validation and municipality assignment logic in the ERP system to align with the new "Liste des communes OFS 2025 pour l’attribution du numéro de commune au code postal" published by the Swiss Federal Tax Administration (AFC) for withholding tax purposes. Forward-Port-Of: odoo/enterprise#85662 Forward-Port-Of: odoo/enterprise#84859