Odoo evolves and its coding guidelines too.
This commit :
- put some news guidelines, case to take
into account when making new dev
- update some guidelines that are difficult
to applied in the real life
- remove deprecated stuff (RML report, ...)
- remove references to old
api mainly, since all new dev must be done in
new api
Task #1817988
156955de6b introduced a new property `website_meta_og_img` in
`website.seo.metadata`.
When rendering a template, `render()` is calling `get_website_meta` that will
end up reading `website.seo.metadata` fields.
But `website_slides` module is overriding `check_field_access_rights` to allow
partial read on the record.
The new `website_meta_og_img` was missing from the allowed fields, thus
crashing when an user without the required slide's group would try to read the
slide.
Purpose is to show people shortcode actually exists. Moreover having
im_livechat_mail_bot requires to have a least one shortcode available
in order to complete the onboarding with odoobot.
Commit linked to task ID 1887949.
Otherwise tweaking it requires an access to the database or making a custom
view which is not the most user-friendly way of doing it.
Commit linked to task ID 1887949.
Before this commit, every pie chart without any data displayed
the non content helper in the middle of the screen.
This behavior is intended most of the time except for embedded
pie chart (such as in the dashboard views).
Now, an embedded pie chart without any data is rendered and displays
the error message in the middle of it.
We had to render it with nv.d3 to match the size of the other
graph in comparison mode.
Another commit in enterprise will add a test for this fix.
For the moment, embedded empty pie charts are only used on
dasboard views.
Currently check_access_rule method checks for record rules and raises an error
if there are either missing ids (deleted records) or forbidden ids (records
hidden due to a record rule).
Purpose of this commit is to have a method allowing to filter a given recordset
and receive only valid records. Its implementation is basically a refactoring
of check_access_rule.
This commit is linked to task ID 1856417 and PR #26565.
After a module upgrade, validate the architecture of the module's views that
are impacted by updates, but have not been checked yet. Before this patch,
views were checked twice on average.
This patch speeds up the installation of modules by about 15% without demo
data. With demo data, the speedup is around 10%.
When rendering a report (`render_qweb_html` for example), one can pass `data`
(a dict of values, used for the template rendering).
This dict was overriden in `_get_rendering_context` if the method
`_get_report_values` on the report model was not correctly written.
This was causing an issue when rendering a report in Studio because the `studio`
key was overriden.
Now, the `data` dict is updated (instead of replaced) with the rendering context.
Some points have to be improved
* 'Name of the tasks' field should always be visible. It shows the user such
a change in configuration is possible;
* tasks stat button is a way for the user to create a new task from the
project form view. Just like the subtasks stat button that always shows
on the task formview;
* as he might be changing the 'name of the tasks', he should see the
consequence of this change in the stat button (as the 'name of tasks'
field might not directly speak to everyone, it is a way to show them what
this field does);
This commit is linked to task ID 1884015 and closes PR #26906 .
Purpose : remove the "Available Products", "Exhausted Products" and
"Negative Products" filters from 'Inventory Valuation' as these filters
are not working. They are defined on product.product.qty_at_date that
is not stored.
Related to task: 1886360
Since odoo/enterprise@e3b0d2a, the title wasn't set anymore.
This logic is now moved in the graph renderer to be able to
set a title in every graphs.
For now, we only use the title attribute for pie charts embedded
in dashboard views.
Additional tests has been added in 'web_dashboard' (enterprise).
The registry loading system should not alter databases unless it is
asked to do so, by a module installation or update instruction.
This property should hold true as well for database bootstrap, and this
is what this commit changes..
In order to avoid any behavior change for command-line users, an
implicit `-i base` is assumed when starting the server from the
command-line with `-d <db>`, causing the db boostrap to happen if the
database did not exist yet.
Reaching the URL /demo/snippets-debug will now showcase all snippets
*automatically* (if a theme uses different snippets or if the snippets
change in the future, this page will not have to be adapted).