In mobile search view, filter dropdown was overlying upon
'see result' button.
This button should be over the opened dropdown to make it
visible properly.
Task ID : 1987223
closesodoo/odoo#34022
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Currently the search panel is nice for a search with filters but
that was not 100% efficient for simple research without filters.
The Search is now integrated in the form view, with the ability
to open the Search panel to apply filters or group by.
Task ID : 1924760
1) The size of the left part of the control panel will take free
space left. Normally, the width is always fixed to 50/50 but
now the breadcrumb can take more or less space if needed.
It will be useful on mobile where the search bar is dynamically
sized.
2) Control panel elements are split into two divs;
- breadcrumb and search bar are grouped to be in the top.
- buttons (o_cp_left) and pager (o_cp_right) in the bottom.
Now we can easily add antoher elements in the top or bottom
part of the control panel.
3) Control panel template is likely the same on mobile so
they are now merged.
4) Before this commit, we always had an empty parent even if
the search bar wasn't rendered. Removing it makes the DOM cleaner.
Because of this, we are not able to expose this area used to add
custom elements. Some code need to be adapted.
Task ID : 1924760
Purpose
=======
Have a quick export feature.
The current export wizard is quite complex.
We want to be able to quickly export a tree view,
with the group by correctly represented, depending on the fields
visible in the list view.
Specification
=============
Add an "EXPORT (XLS)" button in the list view (a little download icon)
- export only columns visible in list view
- export all the records
- while respecting the group by
This should be a generic feature but should be applied to all
the account.move.lines list views.
account.view_move_line_tree_grouped_sales_purchases
account.view_move_line_tree_grouped_bank_cash
account.view_move_line_tree_grouped_misc
Task 2031835
closesodoo/odoo#36943
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this rev., the searchpanel was automatically disabled (not
present) in actions obtained by following links or buttons (e.g.
stat buttons).
This rev. removes this constraint, but adds the possibiliy to
disable it by setting key 'search_panel' to false in the context.
Note that in this case, the active categories are never retrieved
from the local storage (i.e. the last one set). If no default is
given, 'All' is simply selected (no domain).
Task 2069310
* = stock, test_website, web, website_forum, website_slides, base
Replace KarmaError with AccessError and remove the related override made
on crash_manager and ir_http.
task-2069890
closesodoo/odoo#36655
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit fixes the /report/download route in multicompany
Since the multi company revamp (a5b6f31cf2)
the multi company rules depend on the context.
However the route /report/download was not forwarding any context, this meant
that when trying to read some fields on a record in a company that is different
than the default one, it would crash with the multi company ir.rule
Forwarding the context from the session in the Javascript call is quite simple
however since (521f7d36c1) it also requires to change
the signature of the `report_download` method in order to pass the context to the final
method.
As there was already some code allowing the adding of some context in `report_routes`
this PR reuses this code by simply passing the context as a kwargs.
closesodoo/odoo#36839
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The custom event 'open_view' triggered by the pivot
renderer was not stopped in the pivot controller. This
used to cause a crash because the dashboard controller
also listens to a custom event with the same name but
following another logic.
The present fix simply stop the propagaton of the event.
A test has been added in the module web_dashboard.
closesodoo/odoo#36466
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
When employee try to edit his detail using my profile with empty
timezone and click on "Edit" button, it show traceback. It's coming
from the mistmatch timezone widget.
closesodoo/odoo#36593
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
Fix o_text_overflow class (in contact for example).
Add class o_text_overflow in hr_employee view to avoid email to
be too long.
closesodoo/odoo#36626
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
Purpose
========
In expense, we now allow any simple employee (no sales access rights) to
select sales order. Technically, the name_search is done in sudo mode,
to allow simply fetching the name_get of record.
The problem is that the m2o field widget displays the "search more"
option and click on that will open a modal executing a "search_read"
which is causing access error as the user doesn't have read access on
SO.
As we want to restrict the visible information from the SO(only name_get)
to all user, we can't hack the search_read too.
Specification
=============
To prevent user frustration, we need to remove the "search more" option.
Thus, make a private function which one have 'search more..' option
related stuff and create a new widget for sale_expense, override that
function which one is returing values as it is without any modification.
task-2057714
closesodoo/odoo#36152
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
Since ee5e972, "Achive" and "Unarchive" actions are
automatically displayed in the actions dropdown
if the record has an `active` field.
The "Archive" action is shown if `active=True`, and
"Unarchive" otherwise.
However, if the record has the `active` field but
it's not in the view, the form controller think
`active=False` because `undefined` is falsy.
Therefore, the "Unarchive" action is always shown.
If `active` is not in the view, neither "Archive" nor
"Unarchive" should be shown.
closesodoo/odoo#36551
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit if `display_name` was in the view, the breadcrumb when
creating a new record, the breadcrumb would display either `Unnamed`,
either the last value of `_title` in `action_mixin`.
The default value when creating a record should be `New`, but the return
was ignored because `display_name` was found in the view
closesodoo/odoo#36565
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Moves the custom documents search panel style to the search panel
of community to improve usability and fix several visual glitches.
closes odoo/odoo#36496
Task: #2061957
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the message "No records found!" was positioned above
the search filters.
closesodoo/odoo#36537
Taskid: 2067797
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
Part of task 2005972
It is used in account_asset, when the o2m field is hidden and at the end of the form, but we need the user to see it at the beginning of the form
closesodoo/odoo#36315
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Before this commit, translations were edited in a list view with a filter
on the field that needed to be translated.
After this commit, the translations for each fields are translated in a
dedicated dialog. The changes done to the current language are taken
into account immediately, both ways, from the dialog to the form and
from the form to the dialog.
Translating terms is also available in create mode, the user will be
prompted to save before editing a translation
Task ID: 2028152
closesodoo/odoo#36185
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
The ColorPickerDialog lazyloads its template. In the test
environment, nothing was done (except for a single nextTick) to
ensure that the template has been loaded before interacting with
the dialog. This led to non deterministic failing runbot builds.
Also correctly load the signature template before running its tests
instead of doing two chelou nextTick();
closesodoo/odoo#36511
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Sometimes when using a form view in a modal (e.i.: in a gantt view), we might
want to have some button in the footer. We expect clicking on buttons to close
the dialog but nothing happens, since the webclient does not know that this is
a modal.
To do so, we provide the `close='1'` attribute on the button, in form view.
This will trigger the event closing the modal.
This is done with the benediction of aab-odoo
Task-2024216
closesodoo/odoo#36493
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
Let's assume a kanban view with oe_kanban_global_click className
(i.e. clicks on the card open the record in a form view), and an
image with the 'image' widget. This is for instance the case of the
hr.employee kanban view.
Before this rev., clicking on the image didn't open the record in
form view.
Since 78565b1dc9 , two menus with an act_url action drive the user to
external websites. This makes the click_all test very fragile.
With this commit the Apps menus "Theme Store" and "Third-Party Apps" are
black-listed in the click_all test.
Also, it happens that a filter which is not supposed to work in some
circumstances is simply hidden. Actually, the click_all test sets that
filter and leads to a crash.
With this commit, for a more realistic use case, the click_all test does
not activate hidden filters.
closesodoo/odoo#36433
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Task 2008956
* Add the root of an account (first 2 digits/char) as a searchable model.
* Create a custom searchpanel for this account root on account.move.line
* Add the account_root searchpanel to the account.account view too.
Before this commit, the width of the headers in a list were frozen
only when the list was seen, but the calculation of the width might have
happened while it was invisible (thus giving the headers 0px).
Now, the freeze AND the calculation only occur when the list is visible
and can actually be evaluated.
Task 2061848
closesodoo/odoo#36175
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, when entering an empty editable list with buttons,
their width would be set to 0px.
Now, they are considered as fields and given a name, allowing the renderer
to give them their proper width (if any) or a default one.
Before this commit :
- resize handles were all attached at the right side of the list
- empty columns were given a resize handle, causing them to be larger than expected
Now :
- resize handles are attached to their corresponding header
- only non-empty columns are given a resize handle
Fix 2060807
Before this commit, if an x2many was in an inactive tab of the notebook,
its column headers widths were all set to 0px
Now, inactive x2many lists do not compute their width until they are visible
and interracted with (e.g. add/delete a record, sort columns, etc.)
Fix 2060418
We need to unpatch the view as soon as we correcly applied the
`groupedBy` attribute to avoid sub views to also be patched.
closesodoo/odoo#36486
Signed-off-by: Christophe Simonis <chs@odoo.com>
... and switching to 'edit' mode before the write RPC returns.
For instance, on a project task form view, in readonly, change the
state by clicking on the bullet, and directly switch to 'edit'
mode: when the RPC returns, the view is switched back in readonly.
Task 2065443
closesodoo/odoo#36400
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
In grouped editable list, get rid of the groups
Edit one record in the editable list
In a M2O, click on search more
In search's list, group by a field
Expand a group in the search's list
Before this commit, it crashes because the event was propagated
onto the first main list
After this commit, it doesn't crash and the group is expanded
OPW 2064156
closesodoo/odoo#36383
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
When we try to change the color of kanban, the kanban record is re-renders,
kanban record is replaced with kanban-box and subWidgets are re-rendered,
reset of all subWidgets are called which will re-render widget but it is not
rendered in DOM as DOM element is destroyed and hence dashboard_graph widget
can not computed proper height of the canvas element and disappear
Call on_attach_callback after widget reset is called on kanban record, as widget
element is removed from DOM and new element is added in DOM so
on_attach_callback should be called again.
task-2036256
closesodoo/odoo#35254
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
There is an open issue on the tempusdominus lib:
https://github.com/tempusdominus/bootstrap-4/issues/223
It occurs when there is a valid value in a date(time) field, and
the user unsets it by setting an invalid one.
This rev. fixes the issue in Odoo by preventing to reach the buggy
piece of code in the lib. In a few words, when the user sets an
invalid date, we reset the previous valid date (which is what the
lib tries to do anyway).
Task 2057009
closesodoo/odoo#36211
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Before this commit, some notifications may be lost while forwarding
them between browser tabs by means of the local storage (i.e. from
the master tab to slave tabs).
This happened when some slave tabs are in the background and are
throttled by the browser: the master tab writes twice in the local
storage (to notify slave tabs of new notifications), and slave tabs
drops the 1st notification. This is caused by the mismatch between
the new value in the local storage event and the actual value in the
local storage. For example:
```
t(0) - Master tab receives `message` notification;
t(1) - Master tab writes notifications (= `message`) in local
storage;
t(2) - Master tab receives `message_seen` notification;
t(3) - Master tab writes notifications (= `message_seen`) in
local storage;
t(4) - Slave tab detects new notifications (= `message`)
from local storage event, but drops it since it does not
match actual local storage value (= `message_seen`);
t(5) - Slave tab detects new notifications (= `message_seen`)
from local storage event, and handles it since it
matches actual local storage value (= `message_seen`);
=> Notifications received + handled:
- master tab: `message`, `message_seen`
- slave tab: `message_seen`
=> Slave tab lost "message" notification.
```
This commit fixes the issue by letting all tabs handle any local
storage events, regardless of the actual value in the local storage.
In the example above, this means the slave tab will not drop the
notification `message` at t(4).
Task-ID 2044231
Closes#36177
Let's assume an action with 'create': 0 in the context, and a non
inline subview in the form view. Before this rev., the 'create': 0
was applied to both the form view and the subview.
This rev. applies the same logic as what the server does for inline
subviews: the rule is applied to the subview iff its model is the
same as the one of the form view (with key 'base_model_name' set
in the context).
Task 2035653
closesodoo/odoo#36109
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Display your website in Right To Left
Go see the phone number of the company
Make that number in the form
```
123[space]456[space]789
```
Before this commit, the blocks of that number were inverted
(intra-group order did not change)
Leaving us with
```
789[space]456[space]123
```
After this commit, we introduce a little class to force Left To Right
display
OPW 2059917
closesodoo/odoo#36115
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Before this commit, a field selection which was required
did not have an empty option
ref: 4dfabb8f7a
This is fine, but overlooked the fact that modules can modify
the required attribute, or even views can do it
So, we may end up in a situation where the field is required but set to false
This configuration is problematic, at least for the timezone selection field
(see OPW)
After this commit, the empty option is just not visible
note that `disabled = True` would not work because val is not accessible
Because of commits:
- 4dfabb8f7a for the selection feature
- d77ce4c2a9 overriding the required attribute of tz in res.user form
OPW 2057913
closesodoo/odoo#35989
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Let's assume an editable grouped list view with a <groupby>
node containing subfields, and an onchange. Edit a row to trigger
the onchange. Before this rev., it crashed because the onchange
specs was incorrect: it followed the relation of the many2one
and thus included its subfields (whereas it should only follow the
relation for x2many fields).
For example, go to Accounting > Accounting > Sales and edit the
label of a move line.
Task 2044187
closesodoo/odoo#36001
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>