Commit Graph

1626 Commits

Author SHA1 Message Date
Antony Lesuisse 2d296cb779 [MERGE] ir-ui-view split active and show_customize
Split the ternary field application in active and show_customize, all four
possible value are now needed for the customize theme popup.
2014-08-31 16:56:44 +02:00
andreparames 0908376221 [FIX] Load translations for selection fields
Selection fields in the new QWeb reports aren't being translated, because the context with the language isn't being passed.
2014-08-28 16:41:45 +01:00
Xavier Morel e6b56412a0 [ADD] views documentation 2014-08-28 15:02:33 +02:00
Raphael Collet 2ad092b5e5 [ADD] doc: new documentation, with training tutorials, and new scaffolding 2014-08-22 17:51:20 +02:00
Martin Trigaux 80d8532370 Forward port of branch saas-5 up to rev 4895281e 2014-08-22 09:12:14 +02:00
Martin Trigaux 4895281e58 Forward port of branch saas-4 up to rev 15a3a2a 2014-08-21 18:17:35 +02:00
Martin Trigaux 15a3a2a63a Forward port of branch saas-3 up to 7bcefaf 2014-08-21 18:14:22 +02:00
Martin Trigaux 7bcefaf232 Forward port of branch 7.0 up to 0ab88f5 2014-08-21 17:57:57 +02:00
Martin Trigaux 0ab88f54f9 [FIX] ir_model: invalidate cache when adding new fields
When a new ir.model.field is created, add the new field in the fields_by_model (cache of custom fields). This is required as the __init__ method would not retrieve the new field if fields_by_model is already set.
Otherwise, the _columns would not contain the new fields and we could not access it without restarting the server (e.g. the installation of a module adds ir.model.fields and use it in the a view.
2014-08-21 17:24:45 +02:00
Martin Trigaux 768b3592c2 [FIX] base: wrong model change check
Comparing an id and a browse record will always fail so the exception would have always been raised when changing a model (e.g. updating a module with custom fields).
2014-08-21 14:30:10 +02:00
Thibault Delavallée 4c6dcd7fcb [FIX] ir_actions: server action: when creating or writing value on a record
through a server action, try to correctly set the value to write on a given
fields according to its type. For example many2one fields should receive an
int, not a unique containing the id of the new value.
2014-08-21 11:03:15 +02:00
Thibault Delavallée 43fe825870 [FIX] ir_actions: server action: check the validity of write_expresison only if defined. Also check for the related model only if set in the onchange. 2014-08-21 11:03:15 +02:00
Christophe Simonis 5dff035878 [MERGE] forward port of branch saas-5 up to 39bee35 2014-08-20 20:33:17 +02:00
Fabien Meghazi c0132100ce [FIX] website translation bug
Sometimes a node can't be translated using the website Translate
mode. The translation is added to the Application term list but
the id of the view is not correct.

This happen when a translatable node is a children of a inherited
node whose branding could not be kept. data-oe-source-id was left
over because it was not registered in MOVABLE_BRANDING
2014-08-20 17:16:29 +02:00
Christophe Simonis 81ce316ada [FIX] base: show "application" in view view 2014-08-19 17:13:10 +02:00
Fabien Meghazi 8402625f10 [IMP] Cache bundles in ir.attachments instead of LRU 2014-08-18 18:35:36 +02:00
Olivier Dony e11eddf753 [MERGE] Forward-port of saas-5 up to 20cc18d 2014-08-13 20:46:47 +02:00
Olivier Dony 2a94d1d811 [MERGE] Forward-port saas-4 up to 2694ed1 2014-08-13 17:34:27 +02:00
Olivier Dony 2694ed1472 [MERGE] Forward-port saas-3 up to b9275da 2014-08-13 17:33:12 +02:00
Olivier Dony b9275da8a5 [MERGE] Forward-port 7.0 up to 23cffab 2014-08-13 17:30:06 +02:00
Samus CTO 1a7c8953fe [IMP] calculating nextcall datetime of a cron SHOULD use the cron's user 2014-08-13 14:58:55 +02:00
Olivier Dony 868a77616d [FIX] ir.translation: export/import of QWeb terms
Fixes the translation term import/export logic to
support terms inside QWeb templates.

Refactored a bit the export code so the babel-based
QWeb terms extractor for ./static/src/*.xml files
uses the same logic as the regular extractor for
ir.ui.views with type QWeb.

Server-side QWeb rendering uses a mix of the native
 view inheritance mechanism and the template inclusion
(t-call) mechanism. During rendering the translations
are only applied at "template" level, *after* the
view inheritance has already been resolved.
As a result translations are local to a template,
not to the inherited view in which they are actually
written.
In terms of exporting PO[T] files, this is done by
resolving the "root" QWeb template a view belongs
to, and using it as the location of the translated term.

During import there is one extra quirk for QWeb
terms: they need to be linked to the `website` model
rather than the actual `ir.ui.view` model they
are really pointing to, so the rendering phase can
properly recognize them.
2014-08-13 11:08:02 +02:00
Fabien Meghazi bbbd1465e5 Merge pull request #1424 from odoo-dev/saas-5-handlemissingjs-nse
[FIX] Do not raise 500 error when an asset is missing

Note: those features are already present in master but could not be backported because the asset bundles are now completely different since the sass and less support where added.

If a forward porting occurs, you can drop this merge and keep master's version
2014-08-12 14:27:03 +02:00
Fabien Meghazi c68ba88563 Added stylesheet warning for missing css asset 2014-08-12 14:22:05 +02:00
Fabien Meghazi 228d422828 Use console.error 2014-08-12 14:14:31 +02:00
Christophe Simonis fda1e7d290 [FIX] ir_cron: typo introduced in commit a3d6b3a 2014-08-11 17:37:46 +02:00
Richard Mathot a3d6b3ae4b [FIX] ir_cron: typo introduced in fwdport
ae65be2b2a
2014-08-11 16:52:11 +02:00
Denis Ledoux 233670d681 [FIX] ir_cron: forgotten conflict from forward port ae65be2b2a 2014-08-11 16:03:41 +02:00
Denis Ledoux ae65be2b2a [MERGE] forward port of branch saas-5 up to 0739bc4 2014-08-11 15:58:02 +02:00
Denis Ledoux 0739bc4eda [MERGE] forward port of branch saas-4 up to 7ecaab9 2014-08-11 15:31:04 +02:00
Denis Ledoux 7ecaab9fe2 [MERGE] forward port of branch saas-3 up to 2f4be42 2014-08-11 15:30:37 +02:00
Denis Ledoux 2f4be42d8c [MERGE] forward port of branch 7.0 up to 3632949 2014-08-11 15:28:54 +02:00
Samus CTO c16884364b [FIX] Calculate date interval using super user time zone
When you set the date of a cron the July 1st at midnight, if the user
time zone has a positive offset, then the converted UTC date is the
June 30th and adding 1 month will end up on July 30th translating to
July 31th instead of September 1st.

To solve this issue we use the super user time zone for the date
calculation.
2014-08-08 18:01:13 +02:00
Olivier Dony d837d4b497 [IMP] ir.qweb: avoid repeatedly searching the registry for nonexistant widget models 2014-08-07 18:03:08 +02:00
Christophe Simonis fd4fd35e32 [MERGE] forward port of branch saas-5 up to e4cb520 2014-07-30 20:52:14 +02:00
Christophe Simonis e4cb5202a0 [MERGE] forward port of branch saas-4 up to fa07bc8 2014-07-30 20:30:14 +02:00
Olivier Dony 7b84dfb302 [FIX] ir.actions.server: ir.values ref (`More` menu entry) should not be copied 2014-07-30 18:56:56 +02:00
Christophe Combelles b64bd885b0 [FIX] base: ir.qweb: ensure element.tail is correctly encoded
element.{text,tail} are either ascii-compatible `str`, or `unicode`
when non-ascii-compatible. This could force the implicit decoding
of utf-8 encoded contents when joining template bits, breaking
the rendering.

Fixes #1085, and related to #1130
2014-07-30 11:41:15 +02:00
Nicolas Seinlet ee67d65801 handle missing JS files with a console log 2014-07-29 12:39:51 +02:00
Denis Ledoux 88c022dfc8 [MERGE] forward port of branch 7.0 up to bbb8d8f25a 2014-07-29 11:42:10 +02:00
Denis Ledoux 6b1a804b29 [MERGE] forward port of branch 7.0 up to b91a75f7ef
Conflicts:
	addons/base_vat/base_vat.py
	openerp/tools/safe_eval.py
2014-07-29 10:42:50 +02:00
Martin Trigaux 6dc94f0c4e Forward port of branch saas-5 up to eda2f06 2014-07-28 16:37:56 +02:00
Martin Trigaux cd013aa09a Revert 3dec090 "[FIX] ir_values: fallback when no condition"
An ir.value without condition should not match when searching with a condition.
When a field with change_default on it is modified, the method get_defaults is called with the new value. This means that manually modifying a field with this trigger would put back the default value (opw 611193).
2014-07-28 14:35:44 +02:00
Martin Trigaux f138aa2608 [FIX] models: display_name and name_get mismatch
- display_name uses name_get and not the other way around:
name_get should not call _compute_display_name, _compute_display_name should call name_get.
The previous behaviour was not backward-compatible with the old api.
All the models redefining name_get would have 2 different behaviors between name_get and display_name.

- Do not set an inverse function to display_name:
In most cases, writing on display_name writes on _rec_name (if any, not mandatory).
If the display_name computation is redefined, we need to redefine as well the inverse method to avoid unexpected behaviour
This required to also modify tests in base_import as readonly fields are avoided.

- Remove search method on display_name:
For the same reason as for the first point, it could be good that searching on display_name use name_search (and not the other way around).
However doing this would be very inefficiant (need to do the search, without limit, extract the ids of the name_get result just to generate
a subdomain ('id', 'in', [...]). As in most cases it would anyway mean to search on the _rec_name it's better to directly do so.

- Changing label to avoid mismatch:
In view displaying the list of fields or when a match is made on the label of a field (e.g. when importing csv file,
matching is made on both label and technical name), the fact that display_name field has '
Calling it 'Display Name' will avoid most errors.

- remove display_name definition from website_forum_doc,ir_model:
These fields are doing the same thing as the display_name of the new api, we can remove them.
We need to keep the one for res.partner as it's a stored field.
2014-07-25 13:58:59 +02:00
Denis Ledoux 133becd966 [FIX] ir_fields: allow accent on selection import
If the selection label (not value) had accents, it wasn't possible to import it using the label having accents
2014-07-25 11:53:30 +02:00
Olivier Dony 6be6a5a801 [IMP] ir.logging: add index on dbname/type, important with high number of log lines 2014-07-25 10:46:12 +02:00
Denis Ledoux b4ef87f1ec [FIX] ir_attachment: _filestore cache ignore uid
replace ormcache_context by ormcache: use the context in the cache key is useless
set skiparg=3 (default skiparg=2) so the uid is not used in the cache key: the filestore path is the same for all database users
2014-07-24 11:53:57 +02:00
Olivier Dony ef53a831c6 [MERGE] Forward-port saas-5 up to a5f7891 2014-07-23 16:58:00 +02:00
Denis Ledoux a5f7891b68 [MERGE] forward port of branch saas-4 up to 5739aebfb1 2014-07-23 13:18:30 +02:00
Denis Ledoux 5739aebfb1 [MERGE] forward port of branch saas-3 up to 474eae9a43 2014-07-23 12:14:14 +02:00