opw-617036:
In my current timesheet, if you add a a required field on the timesheet ids lines, and add data in the summary tab, it was possible to validate the timesheet lines while requried fields were missing.
When accessing an existing record in form mode directly (enter the url or refresh a page), the daterecord has not been initialized yet. This means that the value of actual_mode will be set to 'edit' before loading the current record (method _actualize_mode() called from do_show()).
This was problematic for one2many fields that we loaded in edit mode, showing add/delete icons/buttons in readonly views. (opw 607910)
This method trigger the focus event when clicking inside the modal, causing a blur event on other widgets resulting in unwanted problem. Typical case is for the jquery datetimepicker where we try to open a select element which will close right after.
In edit mode, in a *2many with many2many_tags, when adding a new tag when none was set, discarding the form let the new tags displayed while it shouldn't (only a display issue, the tag wasn't added in database)
Fixes#2926
Instead of just hidding it
Otherwise, when opening a new dialog, it is considered that there is a previous opened dialog, and this can lead to refresh the record which opened the hidden/previous dialog
This is related to rev. 57b48602fb
* __content__ can't be used in Python implementation because safe_eval, so use
``0`` from Python implementation instead
* remove postfix from t-call tests because due to implementation details all
whitespace crap following a t-name is added to rendered template in Python
impl, and don't want to normalize whitespace.
When creating a new record in list editable, due to previous commit 6349048, the load_record was called twice and the first record of the current list view (self.dataset.index) was used to fill the new record.
With this, we make sure a new record is indeed created.
Fix the web test to have a default_get call in mock models and increase the number of default_get assertions (for creations in list editable, the default_get is then called twice, not optimal but due to the absence of distinction between empty datarecord and filled with default values).
When reloading a page, the _actualize_mode is called before the record is loaded and the form is displayed partially in edit mode (o2m fields with delete/add icons).
This patch forces to trigger a load_record when the datarecord has not been loaded yet in the do_show merthod (opw 607910)
The cleditor width does not include the margins. Setting 100% will make the editable area too large (104%) on Firefox (opw 611700).
This issue was already fixed in newer releases, from commit 9247c37de7
Nevertheless, it introduced a new issue: while editing the form, the content of widgets html which were located in hidden notebook pages weren't displayed when displaying the page content.
opw-614448
The ManyToOneField widget evaluated the domain before doing a name_search,
but the domain should not be evaluated client side, because it can only
be static at that point. It caused crash in autocompletion because
some variables could not be found in the context (see stage_id in
project.task for example)
The problem was that when the user manipulates the graph view (in pivot
table mode), the graph view resetted the group by facet in the search
view. It was not a problem unless a custom filter with a groupby was
already there, in which case, the group bys were duplicated.
The search view is now smarter, it only resets the additional groupbys
(and col_groupbys). Also, to prevent usability problems, the graph
view disable the '+/-' groupbys added by a custom filters.
Note that this fix is only temporary: a revamp of custom filters, facets,
search view is coming in the next months. (at least, that's the idea). Right
now, too much 'search logic' is in the graph view.
Another note: this fix is somewhat fragile: it makes some assumptions
about the search query (mainly that the custom filter is the first facet,
also, that no other filters add groupbys/col_groupbys)
In this awesome programming language called javascript, undefined is neither bigger nor smaller than a string. Previous code was then considering undefined values equal to any string.
This fix allows to sort in a column of a o2m field and group the undefined values together. opw 607704
Bootstrap's container class has a fixed width, using it in a modal
with the previous commit allowing an horizontal scrollbar makes the
layout goes crazy. Use container-fluid instead and cleaned some css.
Before this, the div wasn't in the right place in the form view
for instance, in the product form view, the third checkbox triggered this binary upload file
opw-613318
task-8982
The mapping old api → new api mistakenly takes the last positional argument as
the context (fields_view_get() has an extra parameter after context.)
Fixes issue #2063
Browsers add different width to input of file type, messing up the usability of the
product formview placing a 'phantom' box in front of the options. Added a specific
css rule for this case.
This patch is related to 82adba4714
With the above patch, it wasn't possible anymore to save if an onchange failed. This isn't the expected behavior.
Besides, $.when.apply($, defs) is rejected as soon as one def fails, without waiting other defs to be either resolved or rejected.
This new patch allows to save if onchange fails, and wait for onchanges sequentially.
readonly float fields in list view were not correctly placed when the focus was on the line (seen espacially if field was large, e.g. nb_register on registration)
Added some cryptic comments so we remember a bit
why we have a complicated dance with on_close.
Basically we do not want to reload the
original form view until the last popup is closed,
in the case where several wizard (steps) are opened
one after the other.
This reverts commit 4c335588a1.
It leads to table widths inconsistencies: The tables take more width then before, and overflow much more than before. This can be seen in "Accounting" > "Journal Entries", in the list of the form view
The domain was using '=', which is correct when selecting a specific
element in autocompletion, but not when searching for all elements
matching a string.
The cleditor width does not include the margins. Setting 100% will make the editable area too large (104%) on Firefox (opw 611700).
Replaced by auto, the default value adviced by CLEditor.
button not correctly displayed depending on the effective_readonly
parameter. It is now correctly computed.
Also added a link to see records when in view mode, instead of not
being able to see the selection if not in edit mode.
In some cases, the data dispalyed in a list depends on the context
This context needs to be passed to the export method, so the exported data reflects correctly the data from the list view
The forward port of the fix 3609ba10f2 will be done separately, as the mrp scheduler has been completely refactored from saas-5.
Conflicts:
addons/l10n_be_coda/wizard/account_coda_import.py
addons/point_of_sale/static/src/xml/pos.xml
addons/procurement/schedulers.py
By default, on binary images read, the server returns the binary size
This is possible that two images have the exact same size
Therefore we trigger the change in case the image value hasn't changed
So the image is re-rendered correctly
As `_inherits` fields are now handled via `related`
fields (not stored, obviously), a new descriptor
`searchable` has been added to `fields_get()` result
to indicated if the field is searchable or not.
tooltip stuck visible should be removed on click + remove tooltip container except for modal in order to prevent them for staying visible in some rare occasion
function start, line 783, filters_ready waits for fields_view_get deferred to be resolved before calling prepare_filters, which prepare the view filters.
The thing is that, at line 416, if this.headless boolean is true, the searchview is marked as ready (by resolving the this.ready deferred), and the fields_view_get deferred will never be resolved, as it is resolved in the else case, where the this.headless boolean is false.
Therefore, in this.headless true case, this prevents the deferred $.when(this._super(), filters_ready) to be resolved, as the deferred filters_ready will never be resolved. Therefore, the deferred returned by the start function is never resolved, and the searchview will never be regarded as ready neither.
In views.js, the ViewManager is marked as ready when the deferred manager_ready = $.when(searchview_loaded, main_view_loaded, this.view_completely_inited) is resolved. In the this.headless true case, as the searchview is never marked as ready, the manager isn't neither.
This leaded to some issues, like the action buttons in form views being disabled on click, and never re-enabled once the action/wizard executed. See opw-610723
Due to the switch to Bootstrap 3.2 in this version, tooltip auto placement works erroneously (see https://github.com/twbs/bootstrap/issues/13897).
This is a workaround, waiting for a fix in Bootstrap assets.
(Closes#1341)
If an action unlink the current records (e.g. unreconcile on account.move.reconcile), trigger history_back to avoid errors when trying to reload inexistant record (opw 607883)
This is a partial backport of saas-4 code (rev c0db6ae, 162ad1c) and should not be forward ported.
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages
(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)
Closes#1260
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
The goal is to ensure that HTTP requests
done while reloading the client (e.g. the
menu bar, etc.) do not use a deprecated
session context.
Also undo the previous fix from a0ee2b5
as it would cause other issues (e.g.
prevent setting the admin password/lang
when creating a new db using the db manager)
This logic does not belong in the business
methods of res.users.
When going up and wrapping around, the focus was on a hidden separator,
so hitting enter = stacktrace. Now, the focus goes on the last
selectable list item.-
Allow binding an optional `action_id` to filters.
The web client will try to identify the specific
action ID when saving new filters. If no contextual
action exists, the filter is saved globally for
the model.
This will automatically keep filters within their
original menu when there are several menus/actions
leading to a given list of documents.
In some cases the action_id will not match the
filter model, which should be fine (e.g. when opening
a many2one completion popup for model `foo` within
a menu of model `bar`).
It is also still be possible to have a filter apply
to all actions/menus for a given model by manually
deleting the action_id value in the filter
(e.g. via the Manage Filters debug menu).
When updating a filter the action_id value is ignored
so that old global filters will be gradually replaced
by new "local" filters.
Also added an _order to ensure stable ordering of the
filters.
Displaying the pagert in view group does not make sense as it's not updated when changing filter and every group (even if more than 80) is displayed in view group
The switch mode event was triggered even if the view was not actually switched
This leaded to inconsistencies, like adding the view in the breadcrumb history, while the switch did not happen
When you are on a form view, you click on a left/right arrow(on the top-right of the view) to pass to the next records. If you click on the widget to change the kanban_state, the widget will change the state of the previous record and not for the current because the record_id is not reset
Task #5009
This new autocomplete widget (the one used in the search bar) does not
do remote calls automatically, but on demand. In theory, it should lead
to a better user experience, not having the ui blocked every time long
remote calls are done.
It also has the benefits of bringing us one step closer to not
depending on jquery.ui. Bonus point: the code is quite short (< 200 loc
i believe)
When attempting to parse client date, value is not always a string.
We force the toString when adding the leading 0, as the replace method is for string
[FIX] view_list: Add context propagation for m2m list view
If the _rec_name field of a model is translatable, the value was not translated when displayed in a list view through a many2many field (e.g. server_action_ids on base.action.rule).
When searching for a record in a m2o field, if we click on 'search more' we loose the focus on the field and select the first suggestion (which triggers potential on_change). This prevents the selection for this case.
When adding an item to the editable list, the focused field was no longer the first visible field
This is related to revision 4a508885ac
visible_columns list is not ordered
the code handling the keydown events was moved, but the variable this
was not adjusted accordingly, resulting in a broken navigation.
It is now possible to press LEFT and RIGHT again to move the focus
between facets.
In editable list, on keypress enter, the _next method is called, saving the current line and starting the edition of the next one
The _next is triggered before the date(time) field change event, and, therefore, the saved value of the date(time) field is the old one
Create a deserialize_sort method and add a set_sort method to
datasets. The set_sort method is useful to avoid duplicating code
in lists and kanban views (to set the initial default order)
List views can now be sorted by default with a simple keyword 'order'.
For example
...
<field name="arch" type="xml">
<tree string="Product Variants" order="name">
<field name="name"/>
...
[MERGP] Inline Searchview
This task split the searchview in two parts: SearchView and SearchViewDrawer. The drawer is displayed inside the main view and the searchview stays in place. It also changes the scrolling behavior of the web client: the main view area can scroll without affecting the UI (so the various menus stays in place)
Because of this, other large changes have been made:
the drawer has been redesigned,
the Custom Filter widget has been split in two (Custom Report and SaveCurrentFilter),
the main view is now scrollable, so the UI stays in place and only the view can change
The text 'Group By...' has been changed into 'Group By' (most addons had to be modified)
bootstrap classes are used when it makes sense (for example, badge)
the left menu is also scrollable (separately from the main view)
It is likely that some stupid bugs have been introduced. Please don't hurt me.
the jquery method length() compute the height of its element, even if
it is diplay:none. But in our case, we want the offset to be zero if
there is no visible view_manager_header. (for example, general settings
in settings menu)
in drawer, advanced search, it can happen that the form extends out
of the drawer. Overflow:auto at least allows the user to interact
properly with the form.