Field widgets now have a key 'context' that let them
extend the context of the dataPoint (e.g. list).
In particular, widgets on binary fields enforce the contextual
item {bin_size: True}, so that the server gives the size of the
binary field as its value, instead of its content.
This change on binary fields reduces network load when accessing
a view with binary fields.
Revert partially 255e8ca3d9
Removed widget 'download_link', as it was a sub-version of widget 'binary':
it did the exact same thing (representation of binary fields by means of a download link)
in a much better-looking way (download icon + filename as text of the download link,
instead of just a download link with text "Download").
Also, the values of binary fields might be already a human-readable binsize (e.g. 2.52 MBs),
instead of its plain textual string representation in base64:
The contextual parameter 'bin_size', when set to true, does not download the data of binary fields.
As a consequence, the server provides the sizes of the binary, instead of their value.
Order blogs by post_date
write_date is changed each time a new visitor reach the page (number of visit)
Fixes tw:legalsylvain/status/951559451399671808
Closes#22198
Log an info when a field is computed and stored, but not all its dependencies
are stored. Also allow to set explicitly `depends` on a field; this is useful
to restrict the dependencies of a related field.
Add decimal precision to quantitites in stock.production.lots.
Otherwise, if the UoM uses a DP larger than 2, inconsistencies may arise
since the field is automatically rounded to 2 decimals in the interface.
For example, if the DP of the UoM is 4:
- Set Qty Done to 1.234567
- Save => qty recorded in DB is 1.234567
- Edit, change nothing and save => qty recorded in DB is 1.23
This happens since the web client parses the value in the DOM and
detects a value change.
opw-788078
In other words, when a field F depends on a non-stored field G, it also depends
on G's dependencies. This guarantees that whenever a dependency of G is
modified, F will be invalidated and marked to recompute (if necessary).
The transitive closure of dependencies is not computed over stored fields.
Anyway stored fields already trigger the recomputation of their dependent
fields during their recomputation. The performance impact on the loading of a
registry is negligible (less than 1%), and the increase of recomputation
triggers is small (less than 10%).
After sepration of CRM and Sales, The xml_id of sales settings action
changed. This patch update old links in web_planner to the new settings.
opw-804426
- In some languages the kanban images are not displayed because of a bug in human_size method in JS.
This method translates the Unit Size for data and strip with the string with a comma as separator.
When the translatation contains spaces after the commas (like in the French translation), there is extra spaces in the final result.
This then cause an issue with the method is_bin_size that expects a unique space between the value and its unit.
Resulting in a bug in the method 'kanban_image'.
opw #804973#804970#804648
Before this commit:
In the web editor, if you double clicked on a video iframe to edit it, it would
open the MediaDialog(media) with the wrong media element.
Media would be ' ' instead of '.media_iframe_video' (which is its grand
parent):
div.media_iframe_video
div.css_editable_mode_display
'& nbsp;'
Then, if you changed the media by another one (Image or Video), the media would
be wrongly inserted into the DOM, in the already existing iframe, eg:
(1) div.media_iframe_video
(2) div.css_editable_mode_display
(3) div.media_iframe_video
(4) div.css_editable_mode_display
(5) ' '
Since the new media (3) is wrongly instered into (2) instead of replacing (1),
the bug it would not be visible on normal mode (you would still see the
old media) because (2) is not displayed on normal mode.
Then on edit mode you would see both media one over the other.
Note: This only happened when you opened MediaDialog thought double click
directly (not 'Edit 'in navbar) and without clicking somewhere else after you
entered edit mode.
Now, if the media has an iframe parent, we use that parent as the correct media
This closes#22109, closes#22179
Courtesy of QSM for the help
- rename module to Recruitment instead of Recruitment process.
- add a tour on the "create" button of hr_job
- change wizard for the creation of a job position (change text + remove "create & edit" button)
- change the design of job positions cards and applicant cards
- prefill the db with 5 states for applicants (Initial qualification, First interview, Second interview, Recruited and Contract signed)
- add an activity widget on the kanban view for jobs applicants.
- change hr_recruitment survey module (xpaths) according to changes in hr_recruitment
- delete tooltips on kanban cards of applicants
- show recruitment stage in green or red on kanban cards of job positions.
For kanban views with attribute 'on_create="quick_create' set on
their root node, clicking on 'Create' in the control panel should
open the quick create widget in the first column if the view is
grouped and if there is at least one column displayed.
It was working as expected, except when there were no record yet.
This was because the kanban controller used the 'state.count'
attribute of the state (which indicates the total number of records
in the group), whereas it should have used 'state.data.length'
(which is the number of columns).
Before this rev., when quick creating a record in a grouped kanban
view, the quick create widget wasn't automatically re-opened, which
didn't allow the user to quickly create several records in a row
(without clicking each time on the '+').
This desired behavior had been broken by rev. 1d34e26, which aimed
to properly reload the kanban column when a record was created
(e.g. column counter, progress bar...).
`_run_move` creates the move, calls `_assign_picking` and then confirms it. The
result is that a draft move is added to a picking and then its state is changed to
confirmed. As the state of the picking is computed across its moves and a manual
call to `message_track` is done when any of its move changes its state, there was
a lot of tracking messages in the picking chatter, especially when you confirm a sale
order (a lot of calls to _run_move).
The thing is that this is unnecessary as stock.move’s `_action_confirm` will call
`_assign_picking` later on AND after having changed its state to “confirmed”. Now
a confirmed move is added to a confirmed picking and no message are posted. This
improves considerably the validation of a massive SO.
When we have a form view with a one2many with an onchange, and with
lines which contains a x2many, and more lines that the limit (so more
than one page), and the read is not in the same order as what is
displayed because we have a widget=handle, then we might have a problem
when we delete one of the lines, if the onchanges tries to change the
x2many.
This is due to the fact that the order of the basicmodel datapoint is
not preserved by the various operations going around. I think that we
may still have a few other issues of this type, but it is actually quite
difficult to establish.
In any case, this situation is now properly handled.
opw 804530
The backend assets includes a list of the installed modules with:
```
odoo._modules = <t t-raw="get_modules_order()"/>;
```
Because of the randomization of Python 3.5 in the dict keys,
the order of the installed modules could change from time to
time, therefore making the assets being regenerated unnecessarily
This revision is a bit linked to the below one:
f3bb9ae679
In addition to have the dict keys always in the same
order, it's important for the values to always be
the same, and it was not the case for this list
which was in the content of the backend assets,
in various order.
opw-804747
`sale_stock.tour` requires `sale.tour` which is defined in
`sale_management`.
Aside from the test failing, this is more logical to add the 'Sales'
menu once the set-up is past a simple 'eCommerce' configuration. Note
that it was intended in the original commit 5dfd342d08, but was
later changed back to avoid issues.
We need to depend both on `sale` and `sale_management` explicitly, to
make sure installing `sale` and `stock` separately will also install
`sale_stock`.
opw-804621
Before this commit, an user could only use the coupon form if he didn't perform
any ajax request (eg: change quantity, already sent a code..).
Since the cart html would be reinjected with theses ajax requests, the click
event would not work afterward until the page got fully reload.
Now, we changed the jquery click binding to work with dynamically injected DOM
Assuming that `field.cache_key(record)` is independent from `record.id`,
compute the cache key once for all records, and avoid using `browse` on all
record ids. This makes `get_records` about 20 times faster.
This has a good performance impact on `field.modified_draft()`, which is used
during onchanges for invalidating fields.
Before this commit:
1. If the website's homepage is unpublished and a public user naviguate on it,
it will log an access read error in the server. The user won't see the error
though.
2. If the user can't access '/', we serve the first menu's page instead.
This first menu's page can be an unpublished page, resulting in a 403, which is
not convenient.
3. Menus are sorted by sequence, then the ORM sort them by write_date.
Menu with same sequence will be sorted differently every time you edit one of
them. (This issue get hidden/solved if user edit and save the menus with
"Edit Menu" since it will recompute every sequence.)
- Create 3 pages 'A', 'B', 'C', with 'Add page in menu' enabled
- Menu is now 'A B C'
- Edit website.page B (in property dialog), it will write on the page's menu
aswell
- Menu is now 'A C B'
Now:
1. We prevent this error by ensuring the page is published and so can be read
by anyone before accessing its properties.
2. We serve the first menu's page that is published
3. We sort menu by id after sequence to keep original order
This closes#21259
Before this commit, if there was a menu entry linked to an unpublished
website.page, the menu would be shown. For restricted users, they would land on
a 403 forbidden.
Now, we dont show website.page's menu if user can't access it.
This closes#21328
An agenda for an event separates tracks by days and display them taking
into account the event timezone.
But when separating by day the timezone is not taken into account and a
track could be displayed on the wrong day.
opw-803610
closes#22170