Since report refactoring the function to override is get_report_values
that only returns a dict of value that are used in rendering.
In order to render a pdf with a landscape orientation, a context key could
be added however since it's not possible to return a report object in
get_report_values, it's difficult to add a contexti without using some tricks.
This commit add a report option to use in the template that will be used
in order to modify the pdf orientation. The process used was already existing
for other options like dpi,...
- Redesign all mimetype icons
- use SVG to reduce file size and improve rendering quality.
- Add a data attribute to attachments to detect the file extension (in somes
cases just mimetype is not accurate)
The read_group method was recently modified to allow more flexibility.
With this commit, we add the possibility of aggregating many2one fields.
These fields can be aggregating by counting the number of distinct IDs,
directly in postgres.
Also, note that we had to modify the mock server to implement the
corresponding functionality.
For x2many relational fields(of type kanban), we shoud be able to set custom label for
'Create / Add' button by adding 'create_text' node option on particual field from xml.
Right now, 'create_text' is only handled for many2many fields, preventing users to set
custom label for one2many fields.
This commit allows users to set Create Button label for both m2m and o2m fields.
The read_group method (from the server) is implemented in the mock
server, to allow easy unit testing in javascript. However, the
behaviour was not exactly the same: a read_group call on a domain with
no records returns null for aggregates. But the mock implementation
returned a value of 0.
We fix this in this commit, to allow more precise testing of Odoo
javascript.
The state of the JS documentation was quite sad, not updated in a long
time. With this commit, we rework a lot of the JS doc. Most notably,
we add a section 'Javascript Cheatsheet' (help on some common
customization tasks) and rewrite the 'Javascript Reference' totally.
Note that the JS reference page also contains a reference on all field
widgets.
This work is just the beginning, it is probably not complete, but at
least we will have a foundation.
This rev. extracts two rendering parameters for the groups
corresponding to the default col value to apply (for inner and for
outer groups). This allows to easily override those default values
in extentions of the FormRenderer (for instance, in the renderer
of the new Dashboard view).
This rev. refactors the way the view's arch is parsed in BasicView,
so that it can be extended specifications of the BasicView to
handle other tagnames that 'field' (which is basically the only
one handled in BasicView).
This rev. extracts the part of the rendering that renders outer
groups (i.e. groups that contain groups) in its own function. This
allows extentions of the FormRenderer to use it (for instance, the
renderer of the new Dashboard view).
This rev. introduces an option to doAction (keepSearchView). If set
to true, the searchView of the current action will be kept and used
by the new action (this only works if there is already an action
with a searchView, and if the new action is stacked over that one).
This is necessary for the new dashboard view.
A better solution would have been to export the state of the
existing searchView, and import it to the new one, but the current
implementation of the searchView doesn't allow to do that easily.
This will be done as soon as the searchView will be rewrote.
This rev. allows to add or remove filters to the SearchView from
the outside, and to make it display this new domain. This can be
used by views that trigger domain changes (e.g. this is the case
of the new DashboardView).
The graph view uses the nv(d3) lib to render the graph. This lib
requires that the rendering is done directly into the DOM (so that
it can correctly compute positions). However, the views are always
rendered in fragments, and appended to the DOM once ready (to
prevent them from flickering).
Before this rev., the graph view circumvented this by performing
the rendering in a setTimeout(0), letting the framework append the
widget to the DOM first.
This rev. removes this hack and uses the on_attach_callback hook
instead, which is called when the widget is attached to the DOM.
This ensures that the rendering is always done in the DOM, and we
keep the rendering part synchronous.
Size attributes (e.g. `max-width`) are sometimes set in css (i.e. with classes,
see `oe_avatar`).
They must however be overriden if they are specified on the widget.
Example:
<field name="image" widget="image" class="oe_avatar" options="{'size': [180, 180]}"/>
The `max-width: 90px` set on oe_avatar must be overriden in this case.
Note that the attribute `img_width` and `img_height` have been depreciated as
`width` and `height` are fulfilling the exact same purpose.
- Set the OS timezone to GMT-6
- Create a project task with a date deadline on D day
- The tasks appears at D-1 in the calendar
This was supposed to be fixed with 0c0fb63b0d, but actually no.
opw-1815446
opw-1828130
Actions can be loaded from the state of the url (e.g. when pressing
F5). For window actions, it was working properly if the action id
or a record id (i.e. for form views) was given. In other words,
states like 'model=res.partner&view_type=kanban' couldn't be
loaded.
This can be explained by the fact that without an action id, the
context and domain of the action couldn't be obtained.
This rev. solves this problem by storing the current action into
the sessionStorage, so that important information like context,
domain and name can be retrieved if this action has to be restored
(i.e. if the user refreshes the page).
This rev. adds the 'sessionStorage' service, allowing to write and
read stuff in/from the sessionStorage (with a compatibility layer
to handle the case where the sessionStorage can't be used, e.g.
private browsing in Safari, like it is already done for the
localStorage).
This new service is necessary for the ActionManager to store the
current action, so that it can be fully restored on F5 (this comes
with the next commit).
Have a list with readonly modifiers on at least one column.
Have the first record of the list be readonly as computed by the modifier
Create and edit a second record
Enter a value in the cell and hit TAB
Before this commit:
The focus on the targetted cell was lost and the rendering of the cell was in mode readonly
This was because the baseMode of the modifier dict was applied to one and only one node (== one column) and hence to *all* the records
After this commit:
The rendering and keyboard TAB navigation works as expected in the list editable
The baseMode concept has been sharpened and each cell now has one
OPW-1816569
OPW-1824979
closes#23809closes#22859closes#23436
* [FIX] web: Make accessible with keyboard the delete button on o2m fields
Currently, the delete button in one2many fields (trash icon) is not
reachable when using the keyboard, because it's neither a link, nor a
button or any other interactable HTML element, but a `<span>`.
This change causes that button to be an actual HTML button keeping the
same appearance, so it may be reached when using the keyboard.
* [FIX] web: Modify test to expect button instead of span as o2m trash icon
Since buttons to delete records in o2m fields (the trash icon) were
changed from `<span>` to `<button>` to be able to access them with the
keyboard, the test need to be modified so it expect the new element
type and doesn't break.
- With the removal of the password field on the sessions (https://github.com/odoo/odoo/commit/da1f153d61d747d9357694382fe04f96c0ca886a) the non qweb reports going through the route '/web/report' were not able to be generated.
We address this issue by avoiding to call dispatch_rpc and by using the functions to generate the report directly.
This doesn't cause any security issue because the route '/web/report' is callable only by logged in user.
Meaning that the session is already validated.
Before this commit, search was broken because containsLike was searching on
the innerHtml. (3dd93ed129)
Settings use _wordHighlighter to change the background of the matching text
into the label, so the label was not only text, but html.
<label><span class="highlighter">Mul</span>ti-company</label>
: looking for (mul)
After this commit, the match is based on the text content and not on the html.
Continue work of 6292600b85 for languages not published on Transifex too
Remove en_GB file that was containing too many errors (e.g. 'PoS Order'
translated 'Sale Order')
Fixes#19661
Steps to reproduce:
- Create a sale order and add sale order lines(Not Inline) without saving the sale order.
- Edit any of the existing sale order line and hit on "Save & New" on the sale order line.
- Add another sale order line and hit on "Save & Close"
Bug:
A validation error was raised.
opw:1829723
the only goal of this change is not to use a jquery selector on the
body of the document.
Jquery adds an ID attribute to all the nodes it selects. This in turn
triggers the attribute change debugger in chrome, and creates a lot
of noise while debuging.
Without this commit, a valid route /web/content with an extra
params eg utm or adwords will return a 500 with:
TypeError: content_common() got an unexpected keyword argument 'extra_param_name'
This commit closes#21221
Task-32836 should fix for all routes in a future version
Some status were shown in the statusbar even though they were not specified in
the `statusbar_visible` attribute. This happened when the value was a substring
of one specified value.
Example:
```
hello = fields.Selection([('hello', 'Hello'), ('hello_world', 'Hello World')])
<field name='hello' widget='statusbar' statusbar_visible='hello_world'/>
```
In this case, both status were shown ('hello' is a substring of 'hello_world').
Fixes#20034