Commit Graph
8295 Commits
Author SHA1 Message Date
Christophe Simonis 9b5ba8b238 [MERGE] forward port of branch saas-10 up to 21c7ef8 2016-04-12 12:38:02 +02:00
Christophe Simonis 21c7ef8bf5 [MERGE] forward port of branch saas-9 up to eb44341 2016-04-12 11:56:44 +02:00
Christophe Simonis eb443410ff [MERGE] forward port of branch 9.0 up to afba8ce 2016-04-12 11:12:57 +02:00
qsm-odoo b338ae0153 [FIX] web: do not wrap numbers on multiple lines
In languages where the thousands separator is a space, numbers could
be wrapped over multiple lines.
2016-04-11 15:54:50 +02:00
Odoo Translation Bot d4672389f7 [I18N] Update translation terms from Transifex 2016-04-10 00:32:08 +02:00
Géry Debongnie f652d384a2 [FIX] web: graph_view now actually supports 'stacked' attribute
For some reason, it was lost.  Probably in the graph view/pivot view split.
This commit simply accepts the attribute, but default to true, so nothing
changes unless you have explicitely set it to false.

Also, fixes en error introduced by a forward port (the use of
openerp.web.format_value)
2016-04-08 15:21:17 +02:00
Cedric Snauwaert 841f208b22 [REF] base_import: simplify import by reducing choice for the columns based on heuristic
automatically try to detect type of columns from the first 10 rows of file:
If column only contains integer, only show, int, float, monetary, m2o, o2m, m2m fields in wizard
If column only contains true/false values, only show boolean fields in wizard
etc

add an advanced mode which is the same as previous import (show all fields)

Support different date format and float value with currency as well as float value with parenthesis to reprensent negative value.
2016-04-07 09:42:23 +02:00
Géry Debongnie c4e0562144 [FIX] web: editable list view waits for record to be loaded
The editable list view method 'edit' is supposed to wait for the
record to be completely loaded.  But when loading the defaults values,
it ignored the actual loading and completed too early.  This commit
chains the deferred with the form record.
2016-04-06 12:30:30 +02:00
Géry Debongnie dac37163d1 [FIX] web: fieldmany2manytag issue
I recently removed some rpc from init fieldmany2manytag (it was in a
mutex) and moved it to the willStart method (without mutex).  The
fieldmany2many tag widget needs this information before it can be
rendered.  However, in editable list views, the rendering engine does
not wait for the fields to be ready before completing its initialization
process.  As a result, the field many2many tag was rendered before it
was ready, which broke various things, including its position.

This commit attempts to bring sanity to this issue by making sure that
the rendering engine waits for its fields to be ready.  Also, the
editable list view should detect correctly when the form is loaded.

If this commit introduces new issues with the editable list view and
onchanges, I will not be pleased.  You don't want to bring me this sad
news without at least something to buy my good will.
2016-04-06 09:55:06 +02:00
Christophe Simonis 658989868c [MERGE] forward port of branch saas-10 up to aa6ebd1 2016-04-05 20:08:50 +02:00
Christophe Simonis aa6ebd146a [MERGE] forward port of branch saas-9 up to 549daaa 2016-04-05 19:27:34 +02:00
Christophe Simonis 3e639f4bea [MERGE] forward port of branch 9.0 up to 9e2de9b 2016-04-05 19:06:25 +02:00
Christophe Simonis 9e2de9b1ae [MERGE] forward port of branch saas-6 up to 7f5ca1d 2016-04-05 19:04:36 +02:00
Christophe Simonis 7f5ca1d94a [MERGE] forward port of branch 8.0 up to ceb87b7 2016-04-05 18:59:00 +02:00
Xavier Morel ceb87b78f0 [REV] usage of m2m listview for o2m
Turns out to break way more than it fixes.
2016-04-05 11:32:59 +02:00
Géry Debongnie 3d4954b88f [FIX] web: some float fields silently ignores their changes
We have an interesting problem when editing all custom float fields and all
fields with no explicit digit attributes: the propertiesmixin tries to
check if the number was changed, according to their declared precision.
But for these specific fields, it does not find a digit attribute, and
defaults to 2.  Then, it makes sure that the changes are ignored if the
new value is too close to the old value (with 2 digits precision)

For example, if the user sets the value to 1.234, then save, then change
it to 1.235, then save, the form view will display 1.234 and totally
ignore the change.

Not that handling the digit precision is done in the propertiesmixin and
in the field float widget.  Also, they do different things, and in some
case, may not be the same.   All this logic should be moved to the
fieldfloat widget.
2016-04-04 12:18:17 +02:00
Odoo Translation Bot 678a84e626 [I18N] Update translation terms from Transifex 2016-04-03 02:59:02 +02:00
Christophe Simonis 79976bd779 [MERGE] forward port of branch saas-10 up to 6e95659 2016-04-01 19:10:34 +02:00
Christophe Simonis 6e95659a08 [MERGE] forward port of branch saas-9 up to f4d1adc 2016-04-01 18:51:55 +02:00
Christophe Simonis 6c8141a1df [MERGE] forward port of branch saas-10 up to 2483327 2016-04-01 16:15:35 +02:00
Denis Ledoux 2d2028a66c [MERGE] forward port of branch 9.0 up to b44cb82 2016-03-31 17:57:22 +02:00
Olivier Dony 26b8bf52d0 [FIX] web: typo in 88594416a6 2016-03-31 12:53:25 +02:00
Denis Ledoux 69fa2d5662 [MERGE] forward port of branch saas-6 up to 8f1782b 2016-03-30 11:23:18 +02:00
Denis Ledoux 8f1782bd05 [MERGE] forward port of branch 8.0 up to 1d5db336 2016-03-30 11:08:57 +02:00
Olivier Dony 88594416a6 [FIX] web: CSV export: avoid triggering formulas
When exporting text data in CSV format, values
beginning with '=', '+' or '-' will usually be
mistaken by spreadsheet applications as formulas
upon CSV import.
That will often cause the cell to display an
error message instead of the actual contents,
such as "#NAME?"

Prefixing them with a single quote makes them
pure text cells. The special single quote
character is usually hidden by the spreadsheet
in that case.

Numbers and other types of values are not affected.
2016-03-30 03:43:40 +02:00
Odoo Translation Bot 8d9b309f9a [I18N] Update translation terms from Transifex 2016-03-27 03:14:28 +02:00
Odoo Translation Bot f02b8a76df [I18N] Update translation terms from Transifex 2016-03-27 00:32:16 +01:00
Peter Hahn c2abdbbc37 [IMP] Make many2many widgets in listview usable for one2many
Existings many2many widgets in ListView can be used also for one2many if
the supplementary data is provided for the column.

closes #11282
2016-03-25 16:54:32 +01:00
dut-odoo dd80649541 [FIX] web: fix unbound variable utils in view search_view.js 2016-03-25 16:25:59 +01:00
Christophe Simonis ddb0fb2739 [MERGE] forward port of branch saas-9 up to 59d3f63 2016-03-24 16:53:45 +01:00
Christophe Simonis 9e4157b648 [MERGE] forward port of branch 9.0 up to a2c5fe4 2016-03-24 15:10:36 +01:00
Christophe Simonis 21337b43a8 [MERGE] forward port of branch 8.0 up to d519dac 2016-03-24 15:03:55 +01:00
Christophe Simonis d519daca1d [MERGE] forward port of branch 7.0 up to f1b9b30 2016-03-24 15:02:45 +01:00
Nicolas Martinelli f1b9b301da [FIX] web: clear filename if image error
When the user chooses as product image a file which is not an image, the
message "Could not display the selected image" is displayed. However, at
saving, a traceback is thrown since the file chosen is uploaded anyway.

If the image cannot be displayed, the image field is cleared.

opw-672206
2016-03-24 11:18:14 +01:00
Nicolas Martinelli 64e8d9c972 [FIX] web: clear filename if image error
When the user chooses as product image a file which is not an image, the
message "Could not display the selected image" is displayed. However, at
saving, a traceback is thrown since the file chosen is uploaded anyway.

If the image cannot be displayed, the image field is cleared.

opw-672206
2016-03-24 11:09:02 +01:00
Martin Trigaux b54b888305 [MERGE] Forwardport of branch 9.0 up to revision 87578177 2016-03-22 14:30:21 +01:00
Géry Debongnie e9c34b5e61 [FIX] web: fix issue with FieldMany2ManyTags
the widget FieldMany2ManyTags does a rpc to fetch the fields (just to
know if 'color' is in the model...). It was done in a mutex and used
later in a mutex.  This commit simply use the willStart method to make
sure the data is available before rendering.
2016-03-21 17:05:07 +01:00
Nicolas Lempereur fae65a36e7 [FIX] web: css for address format based on country
In 9.0's 05adb7f the `<div class="address_format"/>` wrapping an address
city, state_id and zip fields was removed.

There is a hack on fields_view_get which transform this block depending
on the company country, so without the block the feature isn't enabled.

This commit adds a class on the new block `<div class="address_format"/>`
used to wrap the whole address which will change the sizing of the city,
state_id and zip fields as it was before version 9.

To fully follow what was done previously, the zip is aldo moved before
the city if the address format needs it.

Thus we now have as before the three format as follows:

[default format]

city state zip

[format .o_city_state (brazil)]

city state
zip

[format .o_zip_city (belgium, netherlands, ...)]

zip city
state

Another change is brought by this commit, before most element attributes
from city, state_id and zip fields were lost whilst doing the hack, now
they are all kept.

closes #10692
opw-666567
2016-03-21 14:38:16 +01:00
Christophe Simonis c9ee5105e9 [MERGE] forward port of branch 8.0 up to df21297 2016-03-21 14:00:17 +01:00
Odoo Translation Bot f5cc04caa7 [I18N] Update translation terms from Transifex 2016-03-20 02:58:59 +01:00
Odoo Translation Bot ef026d7cf2 [I18N] Update translation terms from Transifex 2016-03-20 00:32:37 +01:00
Rohan Patel cdc26d14bd [UPDATE] web: Upgrade fontawesome to 4.5.0 2016-03-18 12:18:34 +01:00
Aaron Bohy 6c57935443 [IMP] openerp,web: cache of actions, fields(_views) and filters
Introduction of 'data_manager' service which handles meta-data related to
actions and views (fields_views, fields and filters). Ideally, all RPCs to
get that kind of information should go through data_manager, as it holds an
internal cache.
2016-03-18 10:44:52 +01:00
Aaron Bohy 002660a9b0 [IMP] openerp, web(_*): batch views RPCs
Load the fields_view of all views of the action together. If a searchview is
required, also load its fields_view and its filters.

Use lazy-loading for fields as they are required for the Pivot and Graph
views only, and may be used by Filters and GroupBy menus of the Search view
if the users clicks on 'Add a custom Filter/Group'.

The fields are thus also loaded directly if the first view of the action is
Pivot or Graph, and otherwise, they are lazy-loaded when/if the user opens
a Pivot or Graph view, or if he wants to add a custom Filter/Group.

Some refactoring of views API as well:
- Views must now be instantiated with their fields_view
- Move code requiring fields_view from start() to init(), or willStart() for
  heavy processing.
- Remove view_type attribute from views as it was used to call
  fields_view_get.
- Remove view_id parameter to views' init as it is no longer used.
- Move duplicate code from various views' init to the View widget.
- Remove view_loading() function from views as they now follow the classical
  lifecycle of widgets (init -> willStart -> start -> destroy).
- Searchview now extends View like all other views.
- Remove useless function guard_active() as it was used for the form_view's
  action buttons to wrap handlers to ensure that they are executed only if
  the form_view is the current active view. This is not useful anymore as
  from v9, views and their control panel are appended in the DOM
  simultaneously, so one can't click on a button of a view which is not the
  current active view.
2016-03-18 10:44:52 +01:00
Aaron Bohy 141f4d95bd [REF] web_kanban: render_buttons()
A special case for X2ManyKanban views was handled in the Kanban view itself.
This commit makes the X2Many case identical to the general case by setting
options.action_buttons to true if the X2Many field is not readonly.
2016-03-18 10:44:52 +01:00
Aaron Bohy 85066e7bcd [REF] web: /web/action/load: remove unused 'do_not_eval' argument
unused since rev. odoo/odoo@4a5cb1ebc4.
2016-03-18 10:44:52 +01:00
Yenthe 91163c8c1e [IMP] web: add restore database option on fresh install
Closes #11393
Closes #11080
Fixes #11079
2016-03-18 09:58:00 +01:00
Christophe Simonis 5238b77430 [MERGE] forward port of branch 9.0 up to e8b965f 2016-03-16 16:09:13 +01:00
Christophe Simonis a34d496069 [MERGE] forward port of branch saas-6 up to 1431ba2
Also include 2939800ed4 which seems to
have been forgotten during previous forward-ports
2016-03-16 15:30:03 +01:00
Christophe Simonis 1431ba2f9b [MERGE] forward port of branch 8.0 up to 7b7f3fa 2016-03-16 13:15:30 +01:00