Commit Graph

5983 Commits

Author SHA1 Message Date
Julien Legros 26bf35260d [FIX] web: reordering in editable list views
Broaden the set of conditions where reordering is allowed. Lists can be
reordered when they are sorted by sequence (or sequence ASC)

opw-619465
2014-12-19 15:18:31 +01:00
Denis Ledoux 4a3e5df93a [FIX] web: autocomplete selection not hidden
Appending the autocomplete selection too close from the input field leads to display (hidden) problem in some cases (Many2one inside modals views, many2one at the end of a form view, etc.)

This is related to rev. e1cde4d038

closes #4268
2014-12-16 13:21:07 +01:00
Christophe Simonis 0b6078dfea [IMP] base: apps integration 2014-12-12 15:11:08 +01:00
Aaron Bohy da1e9412f8 [FIX] web: typo in Database Manager screen
closes #4205
2014-12-12 12:55:50 +01:00
Denis Ledoux a6212d2d20 [MERGE] forward port of branch saas-3 up to e11d1c2 2014-12-11 14:11:33 +01:00
Denis Ledoux e11d1c2b7a [MERGE] forward port of branch 7.0 up to db98434 2014-12-11 12:15:09 +01:00
Denis Ledoux e1cde4d038 [FIX] web: 558efacead not working for modals.
The above revision, which was already a patch for rev. a8f94a59cd, did not work properly for modals, like the use template many2one field of the mail.compose.message wizard.

We therefore append the ui-menu selection nearer to the input field.

$el.parent().parent() looks odd, but the goal is to append this selection ui just after the parent of the field, but as jquery ui autocomplete only accepts appendTo (and not after()), we append it to the parent of the field parent.

This fix has been verified for
 * many2one fields in classic form view (with or without sheets)
 * many2one fields in editable list view (embedded in form view or not-
 * many2one fields in wizard modals
 * many2one fields of the bank statement reconciliation widget
2014-12-10 21:45:28 +01:00
Denis Ledoux 558efacead [FIX] web: retro compatible patch for a8f94a59cd
Some views are not appended to the element oe_view_manager_body, such as client actions views.
For these cases, we append the element to the view manager element

Besides, we set the appendTo option of jquery ui autocomplete after a first initialization, because of a Jquery ui bug:
http://bugs.jqueryui.com/ticket/8858
2014-12-10 16:10:00 +01:00
Denis Ledoux a8f94a59cd [FIX] web: scroll handling for many2one selection
If the many2one selection height was too big (bigger than the browser page), it wasn't possible to see all options, because the body is set as overflow: hidden;

Moreover, if you opened a many2one selection and then scrolled the page, the selection moved with the scrolling, while it should be sticked to its input field
2014-12-09 14:41:26 +01:00
Denis Ledoux 9f9e7ef0e1 [FIX] web: user lang has the priority on partner lang
Potentialy, the timezone too.

On item action click (such as menus in More.. and Print..), the data in form view had the priority on user context (through the sidebar_eval_context)

Therefore, if a field "lang" was present in the form view (like in partner form), the web/action/load xmlrpc call was using the partner language instead of the user language.

Example of wrong use case before the fix:
 - Set the user language in French, then go to a partner form of a partner with English set as language
  - Click on any button of the partner form, such as the "Invoices" button, notice that the last item of the breadcrumb is in English, instead of Frenh (the user language)
  - Click on any menu opening a wizard in the More.. dropdown menu, notice that the wizard title is in English instead of French
  - Print any report from the Print dropdown menu, notice that the report file name is in English. If you print the same report for the same partner but from the list view, the report file name is in French.
2014-12-09 12:52:20 +01:00
Christophe Matthieu f2c5946051 [FIX] tour.js: popover position when scrolling down 2014-12-08 17:16:22 +01:00
Denis Ledoux eba1c56f97 [FIX] web: ensure one2many field destruction on button cancel
The destruction of one2many fields is forced with the event change:effective_readonly
This revision add the forced destruction for cancel(discard) button as well

Otherwise, one2many fields are not properly destroyed when hitting the button "discard" (from save or discard).
This can be problematic for one2many editable list views (such as invoice lines) if you discard while having a mandatory field not filled in the invoice line: You can't recreate an invoice, the one2many editable list is messed up

Use case: Create an invoice, create a line, leave the description, required field, empty. Then, discard. Then, click on create.

opw-616946
2014-12-08 15:42:24 +01:00
Denis Ledoux 9996668bad [FIX] web: get conditional user defaults
This is possible to set field conditional defaults, if the field has the attribute "change_default".
The defaults are set by the web client, by calling the method "get_defaults" of ir.values model, when the onchange is triggered on the field on which the condition is.

In 7.0, all onchanges were triggered clientside, one by one. On creation, the defaults of default_get method were pushed in the form, and then, as the values of the fields were changed (from null to the default value), all onchanges on which there was default value were triggered.

In 8.0, onchanges are performed server side, all at once. On creation, the onchange method is triggered by default (wether or not there is a default value for them), for all fields (widget param of method do_onchange of view_forms js is undefined, meaning the onchange is not triggered on a specific field, but on all fields). In such a case, we must call the get_defaults method of ir.values model for all fields (having change_default attribute), in order the conditional defaults to be set in the form view.
2014-12-05 17:41:11 +01:00
Christophe Simonis 5ca7fa18fc [MERGE] forward port of branch 8.0 up to 31a01ea 2014-12-03 19:24:57 +01:00
Christophe Simonis 2ed212dcbf [MERGE] forward port of branch 7.0 up to d6daf5f 2014-12-03 17:51:06 +01:00
Martin Trigaux a765876ffb [IMP] web: do not fully hide pager in grouped view
When the list view is grouped, the page count should be hidden as irrelevant.
However if it's fully hidden, the limit can no longer be changed.
Instead of hidding the pager, this commit hides the arrows and replaces
the content by the current limit to allow to be changed.
2014-12-03 15:02:36 +01:00
Mario Arias Badila bd2633753d [ADD] pyeval: date.replace method
Needed to create filters like "previous month"

It was just defined for "datetime", but is also needed for "date"

closes #2915
2014-12-02 16:59:24 +01:00
Christophe Simonis d37dd37059 [MERGE] forward port of branch saas-3 up to e1e7dc0 2014-12-01 15:42:51 +01:00
Christophe Simonis e1e7dc0af9 [MERGE] forward port of branch 7.0 up to 419d934 2014-12-01 15:33:48 +01:00
Jacques-Etienne Baudoux aba75e7578 [FIX] base: oe_subtotal_footer_separator width
Make sure a too long value in the subtotal will not overlap the form sheet
Fixes #3698
2014-12-01 10:42:36 +01:00
Géry Debongnie 29f895f947 [FIX] fix editing one2many in some cases (web)
See issue #3964 for more detail.  Main problem was caused by commit
f0e331e005.  It set the key name+'__display' to false when reloading
a record for all field types, but it was only concerned with many2many.
2014-12-01 10:29:00 +01:00
Denis Ledoux 45551cf78c [FIX] web: use mutex to wait for onchanges
This fix is related to c12a2e1d16

Mutex allow to wait sequentially for mutex
Besides, if one of the onchanges deferreds fails, it does not resolve the mutex until all deferreds of the mutex are resolved.

Besides, we now wait for the onchanges mutex between each field commited value (line 596) in case the commited value leaded to a new onchanges, that we should wait for before commiting the rest of the values.
2014-11-28 13:39:47 +01:00
Christophe Simonis 5f47fc84e9 [FIX] web: m2o search facet do no set `default_*` context key for "name_search" values 2014-11-27 17:06:48 +01:00
Denis Ledoux 62bc63e44f [FIX] web: force company_logo change on company change
In multi company environment, the company logo was not updated on company change in the user preferences
This disrupted the end user, as he might think the company change did not happen.
2014-11-27 15:21:25 +01:00
Denis Ledoux e347011f24 [MERGE] forward port of branch 7.0 up to 2080ea0 2014-11-27 13:27:37 +01:00
Pierre Verkest f0e331e005 [FIX] correctly update many2many in listview (web client)
Fixes the issue #1216 (follow the link for more information). The issue
was caused by a hack in list view: the magical suffix __display is used
in render_cell to determine if a many2many field should be updated. This
commit simply makes sure that old many2many fields + __display keys are
cleared.

A better way would be to redesign/refactor the list view to avoid that
hack in the first place.  But this would be a much more complex task.
2014-11-26 15:42:34 +01:00
Géry Debongnie 20a8b0e66a [FIX] correctly set searchview id (web client)
The issue is that when a default searchview is requested, it is
initialized without its view_id.  Result: debug mode can't edit the
search view.  This commit makes sure that when the field_view_get is
received, the correct view_id is set.
2014-11-25 13:11:15 +01:00
Olivier Dony 784665e6bd [DOC] web: search view: extra info about key events handling
Complements bde1a4432f
2014-11-24 18:50:35 +01:00
Géry Debongnie bde1a4432f [FIX] fix autocompletion problems with quick presses
Problem was that when the user types quickly in the search bar and press
enter, the keydown event of the enter key happens before the keypress
event of the last key entered.  This means that the autocompletion has
a wrong string.  The fix is to move the enter selection detection from
keydown to keyup.
2014-11-21 12:04:23 +01:00
Denis Ledoux c7d8e9726b [MERGE] forward port of branch saas-3 up to c571413 2014-11-14 18:02:02 +01:00
Denis Ledoux c5714135c2 [MERGE] forward port of branch 7.0 up to 922a52d 2014-11-14 17:59:00 +01:00
Denis Ledoux 922a52dcde [FIX] web: date autocompletion should not harcode 'date'
But should use date or datetime according to the widget type

This fix is related to 69d60465ee
2014-11-14 17:57:10 +01:00
Denis Ledoux d9e48bae42 [MERGE] forward port of branch saas-3 up to 7ab4137 2014-11-14 16:58:24 +01:00
Denis Ledoux 7ab413724a [MERGE] forward port of branch 7.0 up to da15c9d 2014-11-14 15:59:33 +01:00
Denis Ledoux da15c9d27b [FIX] web: do not set the one2many dirty on field validation
This rev. 06104ba553

Added the dirty flag on the o2m field when the editor of the editable list was enabled (meaning that the editable list has been altered)) because the dirty flag was not set correctly by the one2many during the edition, at the time.

It looks like this is now the case

Besides, as now, we valid all the editable list of the form, wether or not the editable list was altered, we must not set the o2m as dirty anymore.
2014-11-14 15:52:58 +01:00
Rifakat Haradwala 69d60465ee [FIX] web: date autocompletion should use user's locale
search bar does not suggest date field format based on user's locale and always shows based on mmddyy using Date.parse,  opw:615276

Note: starting in 9.0, datejs has been replaced by momentjs, so this
problem should be solved in a better way.
2014-11-13 11:12:49 +01:00
Frederic van der Essen a2313b6311 [FIX] point_of_sale: correctly handle the rounding when the unit's rounding is set to zero 2014-11-11 16:18:27 +01:00
Denis Ledoux 2da7b11c36 [MERGE] forward port of branch saas-3 up to c8df9fc 2014-11-06 16:30:33 +01:00
Denis Ledoux c8df9fcc7d [MERGE] forward port of branch 7.0 up to ae99a93 2014-11-06 16:30:00 +01:00
Denis Ledoux ae99a93b88 [FIX] web: many2many_binary widget upload
once widget extended with ReinitializeFieldMixin, the event binding with the binary file input and the on_file_change method can be done in initialize_content instead of start

This fix is related to d36c8b5c9b
2014-11-06 16:26:32 +01:00
Denis Ledoux b7c912ec68 [MERGE] forward port of branch saas-3 up to 22f2728 2014-11-06 15:03:43 +01:00
Denis Ledoux 22f2728d22 [MERGE] forward port of branch 7.0 up to d36c8b5 2014-11-06 14:56:45 +01:00
Denis Ledoux d36c8b5c9b [FIX] web: FieldMany2ManyBinaryMultiFiles must extend ReinitializeFieldMixin
The add attachment button should be displayed while being in edit mode, but not in view mode
As the widget depends on the form actual mode, the widget should be re-rendered each time the actual mode changes

This is the point of the ReinitializeFieldMixin class
2014-11-06 14:51:21 +01:00
Christophe Simonis c825d0552d [MERGE] forward port of branch saas-3 up to ec27773 2014-11-05 21:46:42 +01:00
Christophe Simonis ec277732fe [MERGE] forward port of branch 7.0 up to 3e3e35e 2014-11-05 21:10:15 +01:00
Christophe Simonis 3e3e35ed7e [FIX] web,web_kanban: correct radial-gradient usage 2014-11-05 20:57:59 +01:00
Christophe Simonis 388732dfa6 [IMP] *: one Makefile to rules them all.
Create one unique generic Makefile to compile sass files.
2014-11-05 19:30:28 +01:00
Denis Ledoux 89716cb4d6 [MERGE] forward port of branch saas-3 up to c666030 2014-11-05 13:40:30 +01:00
Denis Ledoux c666030539 [MERGE] forward port of branch 7.0 up to cd69dee 2014-11-05 13:39:41 +01:00
Denis Ledoux cd69dee3f2 [FIX] web: inhibit on change flag when validating editable list
To valid all editable list line, we iterate on the lines and set the editor form with the line value, using set_value.
The _inhibit_on_change_flag should be set to True to avoid triggering on changes events

opw-617395
2014-11-05 13:38:49 +01:00