Merge lp:~openerp-dev/openerp-web/6.1-opw-573669-ado into lp:openerp-web/6.1

Proposed by Amit Dodiya (OpenERP)
Status: Merged
Merged at revision: 2402
Proposed branch: lp:~openerp-dev/openerp-web/6.1-opw-573669-ado
Merge into: lp:openerp-web/6.1
Diff against target: 131 lines (+15/-15)
2 files modified
addons/web/static/src/js/view_editor.js (+8/-8)
addons/web/static/src/js/view_form.js (+7/-7)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/6.1-opw-573669-ado
Reviewer Review Type Date Requested Status
Amit Dodiya (OpenERP) (community) Needs Resubmitting
Xavier (Open ERP) (community) Needs Fixing
Naresh(OpenERP) Pending
Review via email: mp+101332@code.launchpad.net

Description of the change

Hello,

"[FIX] Message :The following fields are invalid can not be translated"

Regards,
Amit

To post a comment you must log in.
2301. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2302. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2303. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2304. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2305. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2306. By Fabien Meghazi (OpenERP)

[FIX] Honor field's @size with html's @maxlength

2307. By Fabien Meghazi (OpenERP)

[FIX] Calendar in web client does not display all fields

2308. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2309. By Xavier ALT

[MERGE] LP #965326: web: readonly field in a class linked by a many2one doesn't refresh after clicking on a button

2310. By Antony Lesuisse (OpenERP)

[FIX] honor homeaction

2311. By Antony Lesuisse (OpenERP)

[FIX] honor homepage, dirty hack to avoid -u board on production databases

2312. By Olivier Dony (Odoo)

[FIX] base.css: make sure read-only char field contents is always visible

min-height seems the original intention of the
CSS, while height is too restrictive and hides
parts of the field value when it is very long
(and switching to edit mode is not always an
option, e.g. for read-only records like emails)

2313. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2314. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2315. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2316. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2317. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

I believe I can see a number of other user-facing informations which are not marked as translatable:

* Widget `string` attributes in view_editor.js
* Arguments to alert() and do_warn() calls in view_editor.js and view_form.js
* Notifications (do_notify) arguments in view_form (some of which should also use _.str.sprintf rather than manual string concatenation)

Please fix them.

review: Needs Fixing
2318. By Xavier (Open ERP)

[FIX] restriction on database names during backup import

2319. By Xavier (Open ERP)

[MERGE] fix to classes set on editable list rows: oe_forms was not set in case of row being replaced

2320. By Fabien Meghazi (OpenERP)

[FIX] Fix multiple clicks on datetime picker icon causes picker to stay overlay forever.

Fixed datetimepicker addon not forwarding 'widget' option to original datepicker

2321. By Fabien Meghazi (OpenERP)

[FIX] Usability inconsistency -> exception: create != new + edit

2322. By Fabien Meghazi (OpenERP)

[FIX] Problems with statusbar widget under IE8

2323. By Xavier (Open ERP)

[MERGE] missing translation mark in import error dialogs

2324. By Xavier (Open ERP)

[MERGE] fix for form field translation dialog's button label translations

2325. By Fabien Meghazi (OpenERP)

[FIX] Set name when uploading an image is broken on 6.1

2326. By Fabien Meghazi (OpenERP)

[FIX] when dialog is resized, the content pane should reflect the new height too

2327. By Xavier (Open ERP)

[FIX] context and domain of an action being added to a dashboard

* The action's context and domain are needed because they are
  explicitly ignored by those codepaths when the action is ultimately
  executed in the dashboard, and their data are needed: such flags as
  group_by_no_leaf may be set in the action's context, or things like
  the leads/opportunities filters which need to remain in the
  dashboard view.

* On the other hand, some keys in the action's context may be
  detrimental to the correct behavior of the action in the dashboard,
  one such key (group) is the search_default_*: these default values
  for the search view may have been unset by the user before adding to
  the dashboard, we must not add them back. And since the dashboard
  will instantiate a full action/view manager for each action there
  will be (empty) search views which will try to make use of those
  defaults.

As a result, add the action's context and domain to those of the
research while *creating* the dashboard action/section, *but* filter
out search_default_* context keys while doing so.

If new problematic context keys are discovered, they should be added
to the filter.

2328. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2329. By Xavier (Open ERP)

[FIX] correctly save group_by context key when saving a search to a dashboard

2330. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2331. By Xavier (Open ERP)

[FIX] issue with handling of list view priorities in dashboard

dashboard would select the default list view (id=false) instead of the asked/needed one, breaking the application of filters

2332. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2333. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2334. By Olivier Dony (Odoo)

[FIX] data_import: allow importing m2o via name_search() on top of their XML ID

We do default to exporting the XML ID, but there are
many cases where completely new data needs to be
imported and there is no XML ID available to do so.
In that case allowing name_search() to be used as in
6.0 is a life-saver. This patch simply makes the
m2o field itself visible during import, so users can
use it in their CSV file or manually select it.

Some trivial examples:
- you need to import 2000 new leads with their countries,
  obviously you can't guess that base.be should be used
  for country Belgium
- you need to update 2000 unassigned leads in the system
  and assign them to some of the salemen... but you don't
  have their XML IDs and even if you had, the match is
  quite hard to do.

2335. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2336. By Christophe Simonis (OpenERP)

[FIX] web: correct jsonp behavior when len(payload) >= 2000

2337. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2338. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2339. By Xavier (Open ERP)

[FIX] handling of empty lines in CSV file being imported (ignore them)

2340. By Xavier (Open ERP)

[FIX] handling of get_selection in listview in case of non-selectable lists (e.g. editable o2ms?)

OPW 572764

2341. By Xavier (Open ERP)

[FIX] reloading of o2m forms in dialogs (popups) after clicking on a button

2342. By Xavier (Open ERP)

[FIX] handling of empty domains, context and view_id in action descriptors

* Some literal actions (not stored) provide an empty string for
  domains and contexts instead of (respectively) an empty array or an
  empty dict literal inside the string. Treat those case as nothing
  being provided.
* Likewise some literal actions provide nonsensical (but falsy, but
  not False) values for view_id (such as an empty list). Yield a
  ``False`` view_id for all falsy ``view_id`` received (``0`` should
  not be a valid view_id, so ``False`` works)

2343. By Xavier (Open ERP)

[IMP] performances when opening an m2o "search" without any filtering term

Don't prefilter via name_search if no data has been entered in the m2o
field, it's going to return all records (not paginated) so it's a
waste of time and resources

2344. By Xavier (Open ERP)

[FIX] incorrect handling of 'None of the following condition must match' advanced search combinator

Introduced during 'simple style fixes' (sic) of rev <email address hidden>

2345. By Olivier Dony (Odoo)

[MERGE] OPW 574895: fix incorrect matching of column headers when importing CSV files

- required fields may sometimes be provided by alternative columns,
  and all the alternatives are therefore not required (e.g. for
  a m2o the CSV can provide m2o or m2o/id columns)
- when fields share the same label, precedence when matching
  column headers should be given to the field with the exact
  same name, rather than just the first one encountered

2346. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2347. By Xavier (Open ERP)

[IMP] formatting of o2m and m2m fields in list views, courtesy of William Beltrán

backported from trunk revision <email address hidden>

2348. By Xavier (Open ERP)

[FIX] re-display [Add Pad] button after removing the pad from a document

2349. By Xavier (Open ERP)

[IMP] display clean error dialog when user tries to create a database which already exists

2350. By Xavier (Open ERP)

[FIX] Error while deleting a record when there is only one record in pageview

2351. By Xavier (Open ERP)

[ADD] handling of required attr on m2m fields

2352. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2353. By Xavier (Open ERP)

[FIX] mis-handling of url actions in sidebar

2354. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2355. By Fabien Meghazi (OpenERP)

[FIX] Fixed http header Content-Disposition for non-ascii filenames

2356. By Fabien Meghazi (OpenERP)

[FIX] In form view, <image> tag is not a binary image but an <img>

2357. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2358. By Olivier Dony (Odoo)

[FIX] base.xml: missing base URL for <img src> and <form action>, for embeddded mode

2359. By Olivier Dony (Odoo)

[MERGE] Missing tab title made multi-tab use of OpenERP quite difficult - now fixed.

2360. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2361. By Fabien Meghazi (OpenERP)

[REV] Revert revid:<email address hidden> which broke field@widget=image

2362. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2363. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2364. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2365. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2366. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2367. By Xavier (Open ERP)

[FIX] actually clear basic textual fields in search view when [Clear] button used, don't just reset to default value

2368. By Xavier (Open ERP)

[MERGE] vertically flipped x axis labels in MSIE

2369. By Xavier (Open ERP)

[FIX] incorrect clearing of default values on selection fields in search view

and simplification of the same on basic fields

2370. By Xavier (Open ERP)

[MERGE] move filtering of non-searchable fields to prune the fields list itself

if only the *display* list is filtered, the advanced search engine may
still attempt to *select* a non-searchable field (if it's the first
one) leading to broken/nonsensical behavior.

Non-searchable fields should be removed from the advanced search's
ability to find them altogether.

2371. By Xavier (Open ERP)

[MERGE] ensure exception information is correctly converted to string before being concatenated with the faultCode string (sic) of emulated XMLRPC faults

2372. By Xavier (Open ERP)

[IMP] simplify localconnector's exception converter: use Python's facilities correctly

2373. By Xavier (Open ERP)

[MERGE] visual effects fix on diagram nodes in firefox

2374. By Xavier (Open ERP)

[MERGE] behavioral fixes and changes to editable list o2ms

* Correctly propagate current validation status of row being edited
* Automatically save row being edited upon leaving it
* Replace "Save" button (floppy) by "Cancel" (cross)
* Allow easier overriding of Groups and List sub-widgets

2375. By Xavier (Open ERP)

[FIX] action buttons activated in editable o2m lists during or after row edition

2376. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2377. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2378. By Xavier ALT

[MERGE] OPW 573621: web_calendar: fix localisation of calendar view

   backport of trunk <email address hidden>

2379. By Xavier (Open ERP)

[FIX] server action not returning anything should be treated as an empty action descriptor

2380. By Xavier (Open ERP)

[FIX] action-type button from a list row being edited in an o2m

Issue 575065

Flow for a button[@type=action] requires going through multiple RPC
calls to execute action. Due to reloading behavior of o2m-list on
actions (saves containing form then executes action then reloads row),
internal form view gets removed while e.g. server action is being
fetched (in Views#do_execute_action).

Problem: there is guard on ``rpc`` call which drops response to
stopped widget (Widget#rpc) => action/load call never returns
successfully because linked form is dead.

Solution: instead of calling View#do_execute_action via the formview,
call it via the listview (do_execute_action was already partially
overridden to change the ``on_close`` callback, override it further).

=> widget still lives, and rpc requests execute correctly leading to
all actions being correctly called (mostly).

2381. By Xavier (Open ERP)

[FIX] Add new operator case to advanced search: field is set or is not set

2382. By Xavier (Open ERP)

[FIX] missing comma in CSS leading to incorrect selectors

2383. By Xavier (Open ERP)

[FIX] correctly pass along options in ProxyDataSet#write calls

2384. By Xavier (Open ERP)

[FIX] remove custom error handling on saving kanban records

hides actual error (which may be e.g. validation error) and adds no value

2385. By Xavier (Open ERP)

[FIX] make datepicker and timepicker translatable

2386. By Xavier (Open ERP)

[IMP] export translatable strings

2387. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2388. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2389. By Olivier Dony (Odoo)

[FIX] OPW 575804: web_gantt: hide internal dhtmlx duration for tasks/phases, as it is misleading

The `duration` used by the dhtmlx gantt component
corresponds to the calendar duration of the event
divided by 3. This makes sense only for events
spanning full days, and for working times
with 8 hours per day. Unfortunately these
hypotheses do not hold for most cases inside
OpenERP, so we should hide this information.
The actual duration of the items can always
been viewed by clicking on the corresponding
label.

2390. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2391. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2392. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

2393. By Xavier (Open ERP)

[ADD] crash manager to embedded client, otherwise RPC errors get silently supressed

2394. By Xavier (Open ERP)

[IMP] make embedded client crash manager configurable

Revision history for this message
Amit Dodiya (OpenERP) (ado-openerp) wrote :

Hello,

Code is changed as per the suggestion.

Regards,
Amit Dodiya

review: Needs Resubmitting
2395. By Amit Dodiya<email address hidden>

[FIX] Message translation issues in notification dialogs

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Corrected during merge, but next time please be careful: in many do_warn and do_notify calls you put _t() around all arguments, but that does not work _t can only be put around *a single* literal string.

Also when there is string concatenation, should be replaced by _.str.sprintf around _t like:

    "The attachment '" + name + "' has been deleted"

must become

    _.str.sprintf(_t("The attachment '%s' has been deleted"), name)

otherwise translation can not work

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/view_editor.js'
2--- addons/web/static/src/js/view_editor.js 2012-02-13 10:53:41 +0000
3+++ addons/web/static/src/js/view_editor.js 2012-07-05 13:53:19 +0000
4@@ -146,7 +146,7 @@
5 }
6 });
7 msg += "</ul>";
8- this.do_warn("The following fields are invalid :", msg);
9+ this.do_warn(_t("The following fields are invalid :"), msg);
10 },
11 add_node_name : function(node) {
12 if(node.tagName.toLowerCase() == "button" || node.tagName.toLowerCase() == "field"){
13@@ -245,7 +245,7 @@
14 "arch": view_arch_list});
15 });
16 } else {
17- self.do_warn("Please select view in list :");
18+ self.do_warn(_t("Please select view in list :"));
19 }
20 });
21 },
22@@ -372,10 +372,10 @@
23 self.inherited_view(selected_row);
24 }
25 }else{
26- alert("Can't Update View");
27+ alert(_t("Can't Update View"));
28 }
29 }else{
30- alert("Select an element");
31+ alert(_t("Select an element"));
32 }
33 }},
34 {text: _t("Preview"), click: function() {
35@@ -931,9 +931,9 @@
36 },
37 on_add_node: function(properties, fields){
38 var self = this;
39- var render_list = [{'name': 'node_type','selection': _.keys(_CHILDREN).sort(), 'value': 'field', 'string': 'Node Type','type': 'selection'},
40+ var render_list = [{'name': 'node_type','selection': _.keys(_CHILDREN).sort(), 'value': 'field', 'string': _t('Node Type'),'type': 'selection'},
41 {'name': 'field_value','selection': fields, 'value': false, 'string': '','type': 'selection'},
42- {'name': 'position','selection': ['After','Before','Inside'], 'value': false, 'string': 'Position','type': 'selection'}];
43+ {'name': 'position','selection': ['After','Before','Inside'], 'value': false, 'string': _t('Position'),'type': 'selection'}];
44 this.add_widget = [];
45 this.add_node_dialog = new openerp.web.Dialog(this,{
46 title: _t("Properties"),
47@@ -956,7 +956,7 @@
48 _.str.sprintf("<%s> </%s>",values.node_type,values.node_type);
49 self.do_save_update_arch("add_node", [tag, values.position]);
50 } else {
51- alert("Can't Update View");
52+ alert(_t("Can't Update View"));
53 }
54 }},
55 {text: _t("Cancel"), click: function() { self.add_node_dialog.close(); }}
56@@ -971,7 +971,7 @@
57 } else {
58 table_selector.append('<td align="right">' + node.string + '</td>' + type_widget.render() );
59 if (node.name == "field_value") {
60- table_selector.append('<td id="new_field" align="right" width="100px"> <button>New Field</button></td>');
61+ table_selector.append('<td id="new_field" align="right" width="100px"> <button>' + _t("New Field") + '</button></td>');
62 }
63 }
64 type_widget.start();
65
66=== modified file 'addons/web/static/src/js/view_form.js'
67--- addons/web/static/src/js/view_form.js 2012-06-29 15:28:11 +0000
68+++ addons/web/static/src/js/view_form.js 2012-07-05 13:53:19 +0000
69@@ -207,7 +207,7 @@
70 on_record_loaded: function(record) {
71 var self = this, set_values = [];
72 if (!record) {
73- this.do_warn("Form", "The record could not be found in the database.", true);
74+ this.do_warn(_t("Form", "The record could not be found in the database."), true);
75 return $.Deferred().reject();
76 }
77 this.datarecord = record;
78@@ -574,7 +574,7 @@
79 }
80 });
81 msg += "</ul>";
82- this.do_warn("The following fields are invalid :", msg);
83+ this.do_warn(_t("The following fields are invalid :"), msg);
84 },
85 on_saved: function(r, success) {
86 if (!r.result) {
87@@ -779,7 +779,7 @@
88 if (this.form.dataset.select_id(id)) {
89 return this.form.do_show();
90 } else {
91- this.do_warn("Could not find id in dataset");
92+ this.do_warn(_t("Could not find id in dataset"));
93 return $.Deferred().reject();
94 }
95 },
96@@ -838,7 +838,7 @@
97 }, function(r) {
98 $e.parent().remove();
99 self.do_update()
100- self.do_notify("Delete an attachment", "The attachment '" + name + "' has been deleted");
101+ self.do_notify(_t("Delete an attachment", "The attachment '" + name + "' has been deleted"));
102 });
103 }
104 }
105@@ -1558,7 +1558,7 @@
106 },
107 on_button_clicked: function() {
108 if (!this.value || !this.is_valid()) {
109- this.do_warn("E-mail error", "Can't send email to invalid e-mail address");
110+ this.do_warn(_t("E-mail error", "Can't send email to invalid e-mail address"));
111 } else {
112 location.href = 'mailto:' + this.value;
113 }
114@@ -1575,7 +1575,7 @@
115 },
116 on_button_clicked: function() {
117 if (!this.value) {
118- this.do_warn("Resource error", "This resource is empty");
119+ this.do_warn(_t("Resource error", "This resource is empty"));
120 } else {
121 window.open(this.value);
122 }
123@@ -3417,7 +3417,7 @@
124 on_file_uploaded: function(size, name, content_type, file_base64) {
125 delete(window[this.iframe]);
126 if (size === false) {
127- this.do_warn("File Upload", "There was a problem while uploading your file");
128+ this.do_warn(_t("File Upload", "There was a problem while uploading your file"));
129 // TODO: use openerp web crashmanager
130 console.warn("Error while uploading file : ", name);
131 } else {