Commit Graph
6524 Commits
Author SHA1 Message Date
Nicolas Lempereur 17e79711e4 [FIX] web: save initially grouped editable tree view
Test to bind save and discard buttons of an editable tree view are done
only once when initializing it.

But if the view is by default grouped at the beginning, it will be then
"not editable" but only removing the groupby will change this.

So this commit add a case so if the view is grouped when initialized,
the buttons are always bound.

closes #11198
opw-666794
2016-03-03 13:07:22 +01:00
Christophe Matthieu a46a3f9958 [FIX] web: can't save if a o2m line have a modifier and try to read db
When the user click on save, 'is_valid' is called on each field.
The o2m test all sub-field (apply modifier and check value).
But, if a modifier change the read-only attribute, the field is reinitialized and call 'render_value' without check 'no_rerender' value.
The relational fields call the db in render_value, and the x2m is invalid because a request is pending.
(change X2ManyListView to keep the 'no_rerender' initial value)

opw-653120
2016-03-01 15:17:05 +01:00
qsm-odoo 380a1fd544 [FIX] web: Dialog closing
The Dialog class destroys the modal (and so removes it from the DOM)
when the dialog closes but leaves the modal-open class on the body
element if there are still other modal(s) in the DOM.

The problem is that (maily on the frontend side) there may be others
modal(s) in the DOM (not handled by the Dialog class) but which are
not shown to the user, and in that case the modal-open class should
be removed.
2016-02-23 13:34:55 +01:00
Christophe Matthieu bf26f0f498 [IMP] web: add an option to avoid deleting a o2m records
issue opw-668776
2016-02-22 09:43:00 +01:00
Géry Debongnie be3f7ea433 [FIX] web: prevent focus issue with autoresize
The copied textarea used in autoresize was a valid target for focus when
using the tab key.  This is a major issue in editable list views,
because when the user leaves a textarea, the list view jumps up, with no
visible focused field.
2016-02-17 14:24:09 +01:00
Martin Trigaux 9c4c3809fd [FIX] web: missing space in translations
Translated text is stripped of starting and ending spaces on Transifex which
makes the result text look bad (as translators do not put spaces in their
translation either).
Add explicitely a space to be sure it's present in the translation.
Will have no effect on English as it's HTML
2016-02-15 15:31:45 +01:00
Nicolas Lempereur dde97416b9 [FIX] web: pivot click keep view references
When clicking on a pivot view cell, the gotten view were default views.

For example when on the opportunity pivot view, after clicking on a cell
we we would get to the crm.lead default view instead of the opportunity
one.

This commit keep references to current action views when clicking on the
cell.

closes #10768
opw-668472
2016-02-08 14:33:44 +01:00
Christophe Simonis fbd5fab238 [MERGE] forward port of branch saas-6 up to 9ca7ad8 2016-02-02 13:18:33 +01:00
Christophe Simonis 9ca7ad87b2 [MERGE] forward port of branch 8.0 up to 3ac46ee 2016-02-02 12:25:06 +01:00
Aaron Bohy 0de35ffa7f [FIX] mail,web: don't block chat windows when blocking ui
One will still be able to chat in chat windows during long RPCs...
2016-02-01 11:31:36 +01:00
xmo-odoo 19a1c18f57 [FIX] make m2m checkbox labels clickable 2016-01-29 16:24:14 +01:00
Denis Ledoux a842199687 [MERGE] forward port of branch saas-6 up to 2616def 2016-01-29 12:29:17 +01:00
Denis Ledoux 2616defe35 [MERGE] forward port of branch 8.0 up to edeb5a8 2016-01-29 11:41:24 +01:00
Nicolas Lempereur 29be9ae80b [FIX] web: conserve /id for saved export list
With 003d85b instead of getting the name of the relation
field_relation we get field_relation/id which will get us an xmlid
instead.

But the data about related fields are not gotten all at once when
opening the export modal. They are gotten by clicking on the arrow of
the related record.

It is in this data that the /id will be appended for the field, but when
getting a saved export list, this data may not be available.

This commit immediately add the `/id` when a field is put in "Fields to
export" column, so this inconsistency is no more.

closes #10640
fixes #10327
opw-665994
2016-01-28 17:27:18 +01:00
qsm-odoo 1982ef993e [FIX] web: listview editable, non editable elements
When editing a line, leave the buttons visible.
Also remove the 3px gap between fields so that readonly field texts
does not move when entering the edition mode.
2016-01-28 17:18:24 +01:00
qsm-odoo 31e8cd0949 [FIX/IMP] project,web: kanban cover image dialog
* Fix the grid display of images (use the column property)
* Use Dialog class
* Allow removing a cover image
* Add image selection before choosing it (or double click to choose)

+ add less mixins in web for columns property
2016-01-28 17:11:39 +01:00
Martin Geubelle f19210ee08 [FIX] web: properly remove nvd3 tooltips
We fixed it for the graph view in 6bdf72bac5f6e8 but this
needs to be fixed for every views.
2016-01-27 16:31:16 +01:00
Géry Debongnie 36994a6616 [FIX] web: load async js modules as soon as possible
The module system allow modules to return a deferred.  When that
deferred resolves, the module is considered to have succesfully loaded,
and the result value is its value.  Then, the boot.js code used a
setTimeout (via _.defer) to load all its dependencies.

This is not wrong per se, but it empties the call stack, which give
other code the opportunity to interfere.  In particular, it is an issue
in phantomjs tests, because it causes a window between the
domcontentloaded event (which is a key event in website) and the actual
loading of all dependent modules.  This execution window can be used to
start some tours, but the code of those tours is waiting the next tick
to load, so horrible crashes happens.

This commit calls immediately process_jobs to avoid those issues.
2016-01-27 16:07:19 +01:00
Nicolas Lempereur b55e29ea86 [FIX] web: improve focus/blur one2many dataset
The dataset of an x2m could be set as changed on a focus event, but if
the form is currently not in editing, it could stay blocked in this
state.

This commit add a check so blur and focus on x2m are better coupled.

opw-665401
2016-01-27 12:05:54 +01:00
Christophe Simonis 2ce9311cfe [MERGE] forward port of branch saas-6 up to a576f2b 2016-01-26 19:13:41 +01:00
Christophe Simonis a576f2baf3 [MERGE] forward port of branch 8.0 up to 43a4ffe 2016-01-26 18:20:11 +01:00
Nicolas Martinelli b22a22f811 [FIX] web: translation in pivot view
The definition of "total" as a global variable is done too soon in the
JS. Depending on the order in which the JS modules are loaded, it is
very unlikely that the translations are already loaded at that moment.

opw-666577
2016-01-25 17:55:43 +01:00
Nicolas Martinelli f46298bfe0 [FIX] web: missing translation
opw-666577
2016-01-25 17:55:43 +01:00
Stefano Rigano 5d393ba067 [FIX] web: typo on less mixin declaration 2016-01-20 15:01:01 +01:00
Nicolas Lempereur 4bfc2799bd [FIX] web: don't print nothing when something is there
In most backend views using CTRL+P to use browser printing would only
print an header without the content.

stumbled-uppon-when-checking: opw-659430 opw-660763
2016-01-20 13:48:37 +01:00
Martin Trigaux e381b7e31a [FIX] web: technical translations menu
The action "Technical Translations" was not retrieving the correct translations.
Since 9.0, the translations names no longer contains the name of the model (in
the form "field:<model>,<name>") but are records on ir.model.fields (in the form
"model:ir.model.fields,field_description:<model>_<name>").
The translations of type selection are style a different type (type 'selection').

Create a method that will find the linked fields and retrieve the correct
translations.

Fixes tw:reis_pt/status/687419541199187969
2016-01-20 16:42:18 +05:30
Nicolas Lempereur 6b791c20b8 [FIX] web: don't print nothing when something is there
In most backend views using CTRL+P to use browser printing would only
print an header without the content.

stumbled-uppon-when-checking: opw-659430 opw-660763
2016-01-20 11:54:46 +01:00
qsm-odoo c81e2720b2 [FIX] web,calendar: m2m attendee tag color
The colors for attendee tags were not used and were reset for all tags
each time the color was changed for a single tag.
2016-01-19 14:37:51 +01:00
Aaron Bohy fc8a4b5ede [FIX] web: view manager: overlapping switches between views
The problem occured when the user quickly clicked several times on the view
switcher or the breadcrumbs. The function switch_mode() of the view manager
was called once per click. This function's role is to prepare the requested
view, and once it is ready, to remove the former one from the DOM and insert
the new one instead. It is thus asynchronous as it waits for the
fields_view_get and search_read RPCs' response.

Unfortunately, when those calls to switch_mode() overlapped, the former view
reference was lost and it was thus never removed, producing a weird situation
where two views were displayed one above the other. This may happen when a
view takes a while to load, or simply when the user double-clicks on the
breadcrumbs or view switcher.

This rev. makes sure that calls to switch_mode() can never overlap by refusing
any other call when there is still one processing.
We also added a protection against breadcrumbs and view switcher double-clicks.

opw 658924
2016-01-18 14:01:21 +01:00
Aaron Bohy 206cc91a63 [FIX] web: view_manager: restore internal state on switch view failure
When an error occured when switching from a view to another (e.g. switching
to a form view for an id that doesn't exist, by editing the url), active_view
and view_stack were updated even though the switch failed. The view manager
thus lost the reference to the real current active view, which couldn't be
detached anymore. This resulted in two views being displayed at the same time
if the user kept navigating through this view manager.

This is a backport of odoo/enterprise@0b1aafa6b and odoo/enterprise@8e691be.
2016-01-18 14:01:21 +01:00
Géry Debongnie 992222a24a [FIX] web: fix autosize small bugs
- better width handling
- disable css vertical resize
- correctly copy css classes to the 'shadow' textarea
2016-01-18 09:45:58 +01:00
qsm-odoo 5a76586ede [IMP] web,point_of_sale: debug mode
Keep debug mode status when going on another location url (backend,
frontend, pos, ...).
2016-01-15 15:24:09 +01:00
Martin Trigaux fba324fe5e [FIX] web: untranslatable string in FieldCharDomain 2016-01-15 14:31:27 +01:00
Aaron Bohy 029c0d5567 [FIX] web: utils: backport of swap() for enterprise compatibility 2016-01-14 11:22:25 +01:00
Martin Trigaux ce2d94207b [FIX] mail,web: : untranslated term in view
_t(...) in xml qweb views do not work, not exported, not evaluted.
No reason to use t-att-*, just using simple attribute is enough.
2016-01-13 15:48:09 +01:00
Christophe Matthieu 17424bd4c8 [FIX] web: reload view on fail after write/create with action button
Issue:
Invoicing -> Vendor bills
Create a record with reference=0 -> Register Payment
Create a second record with reference=0, at least one line with at least one tax -> Save
Edit -> change quantity in the line -> Register Payment -> the register fail
change the quantity again and change reference=1 -> Register Payment
The taxes is include twice
2016-01-13 11:09:54 +01:00
Géry Debongnie 29427bdcb3 [FIX] web: reimplement autosize for fun (and some bugfixing)
autosize does not work correctly (it moves the screen in all directions
sometimes when the user press enter in the bottom of the screen in some
browser),

So, we decided to have our own version, because of course, we can do it better.  A
few horrible hacks later, I proudly present you "autoresize" (it was
almost named "odooresize" but common sense prevailed).

As added benefits, it plays better with our web client, so when you open
a dialog in a modal for example, the autosize fields should have the
correct height automagically (or should I say 'odoomagically')
2016-01-11 14:32:51 +01:00
Christophe Matthieu fa1e30394e [FIX] base: remove unnecessary code (td.oe-actions does not exist) 2016-01-11 10:12:05 +01:00
Mohammed Shekha edf565881c [FIX] web: refresh in form view when first view mode is calendar
When you are in form view and came from calendar, a screen refresh
throwed an error from fullcalendar lib. Also when going back to the
calendar view, it would not be loaded.

It is due to fullcalendar not being rendered if it is not visible, and
other part of the Odoo code are dependent on it having been rendered.

This commit hide the calendar after having been rendered.

closes #10253
opw-659314
2016-01-05 14:25:57 +01:00
Denis Ledoux 0f085db19e [MERGE] forward port of branch 8.0 up to a4e48d4 2016-01-04 12:36:14 +01:00
qsm-odoo 64ad6d1674 [FIX] web: o2m view manager header
Revert commits b3f3c67eea and a40d48378d forward ported from
8.0. In 8.0 these commits removed dead code but it is actually useful
in saas-6.
2016-01-04 11:24:49 +01:00
qsm-odoo 94a1536ae1 [FIX] web: o2m pager when empty
Commit 704b3cec9f introduced a bug which led to be on page -1 on
empty o2m. So when adding a record to such a o2m, the reload content
function chose to stay on page -1 therefore not displaying the new
added record.
2015-12-31 10:59:59 +01:00
Martin Trigaux 955ed51687 [MERGE] Forwardport of branch 8.0 up to 6efc3712 2015-12-30 11:48:14 +01:00
qsm-odoo 63feb99875 [FIX] web: views in action dialog
Opening a view (kanban or list) in a dialog thanks to a target=new
action did not work anymore (only in community).

The cause was the 'search_view' action flag which was set to false
in case of a popup (preventing the view to search the records and so
to display them). This commit sets this flag to true if the popup
has to display a list/kanban view.

Backport of aab enterprise work.
2015-12-29 16:29:49 +01:00
Géry Debongnie 031a3f8a4f [FIX] web: only display last part of breadcrumbs in tab title 2015-12-29 16:06:18 +01:00
qsm-odoo a40d48378d [FIX] web: o2m view manager header
Commit b3f3c67eea corrected the o2m view manager template which was
useless in its previous version because of a dead selector. It appeared
that some fonctionnality relied on the fact that this was dead code.

This commit removes the dead code.
Thanks LeartS (see #5711).
2015-12-28 15:24:12 +01:00
Holger Brunn 704b3cec9f [FIX] web: keep o2m current page in correct range
when going through different form view records

For example, when being on page 4 of a o2m then switching to next form
view record, if this new record did not have 4 pages for this o2m, the
o2m was shown empty (and if there was no page, the o2m became unusable)
2015-12-28 14:06:47 +01:00
sha-odoo 34bc336d97 [FIX] web: tip position in form view
As .oe_form_sheetbg was not position:relative, tips position was
sometimes wrong as the statusbar is loaded after the tips positions
are computed.
2015-12-28 13:40:21 +01:00
Leonardo Donelli b3f3c67eea [FIX] web: hiding of o2m view manager header
One2many fields bring in the entire viewmanager widget.
When there is only one view though (e.g. only kanban view for contact
tab of partners), we want to hide the viewmanager header because we
don't need it (it's where the view switcher would go).

Odoo had the widget logic to do that, but it was wrongly implemented,
resulting in a always present oe_view_manager_header div with all
its elements (although empty).
The wrong javascript operation should have triggered a client error
when loading the view, but for pure chance it didn't because the
t-jquery selector was wrong too so the javascript was never evaluated.
2015-12-28 11:03:50 +01:00
qsm-odoo bcca4a44c7 [IMP] web(_planner),website: navbars & menus merge
Merge appswitcher navbar and app navbar.
Merge planner menu and user menu.
2015-12-24 17:11:55 +01:00