Friday, September 2, 2022
7 changes · master
Enhancements to existing features
This change updates the Survey app’s form template styling and layout. It appears to be a minor presentation adjustment intended to improve how survey forms are displayed to users.
Original PR description
test
This update strengthens automated checks around email and SMS marketing, including invalid addresses, failed sends, unsubscribe/view links, link click tracking, and bounce handling. It also preserves invalid email values on failed marketing traces so teams can more easily understand and diagnose delivery problems.
This update lets Odoo developers define how mail-related data fields are calculated or sorted directly where those fields are configured. This makes the underlying mail and live chat code easier to organize and maintain, with no expected direct change for everyday users.
Original PR description
This commit allows compute and sort functions to be declared within a field definition instead of providing a string with the name of the record method to be used to compute/sort the field value.…
This commit allows compute and sort functions to be declared within a
field definition instead of providing a string with the name of the
record method to be used to compute/sort the field value.
Example of code with compute inline:
```javascript
registerModel({
fields: {
thread: one('Thread', {
compute() {
return {
id: this.id,
model: 'mail.channel',
};
},
}),
},
});
```
Example of code WITHOUT:
```javascript
registerModel({
recordMethods: {
_computeThread() {
return {
id: this.id,
model: 'mail.channel',
};
},
},
fields: {
thread: one('Thread, {
compute: '_computeThread',
}),
},
});
```
The aim of these changes is to empower a better separation of concerns,
by allowing to group together in one place the data related to a field.
Note that for technical reason (`Function.prototype.call` not working as
expected with arrow functions), compute/sort functions should not be
arrow functions.The mail composer has been reorganized so command-related logic is separated from the message posting flow. This makes the messaging feature easier to maintain and reduces the risk of future issues without changing how users send messages.
Odoo now avoids an unnecessary database lookup when loading related lists for a single record. This small core optimization reduces overall database activity and can make common screens slightly more efficient.
Original PR description
For reading one2many fields, we make 2 queries (in batch): - One to search "id" the comodel - One to read <inverse_field> in the comodel to group lines by record (sometimes, this one is bypass because the cache already contains the information). In many cases (> 80% of cases in our tests) we read a one2many field on a single record. In that case, we can avoid the second query completely (grouping all lines on a single record is trivial). This reduces SQL queries by about 0.8% on all-install runbot builds.
New Knowledge articles now use "Untitled" as their starting title instead of "New Article." This better reflects that the user has not named the article yet and makes the creation flow clearer.
Original PR description
Currently, in the knowledge module, the default value for the article title(name) is "New Article". A new article does not have a default title, so it is pointless to use the default title "New Article" when creating an article. This commit changes the default value of the article title from "New Article" to "Untitled." As well as that, tours and JS files can now trigger a new default value for the article name. task-2907572
This update adds performance coverage for the appointment scheduling features and reorganizes related tests. It also cleans up internal slot-generation code and documentation so future performance improvements can be measured and delivered with lower risk.