Merge lp:~unifield-team/unifield-web/jfb-uf-2028-2027-2032 into lp:unifield-web

Proposed by jftempo
Status: Merged
Merged at revision: 4712
Proposed branch: lp:~unifield-team/unifield-web/jfb-uf-2028-2027-2032
Merge into: lp:unifield-web
Diff against target: 57 lines (+13/-8)
2 files modified
addons/openerp/static/javascript/form_state.js (+6/-1)
addons/openerp/widgets/_interface.py (+7/-7)
To merge this branch: bzr merge lp:~unifield-team/unifield-web/jfb-uf-2028-2027-2032
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+166182@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/openerp/static/javascript/form_state.js'
2--- addons/openerp/static/javascript/form_state.js 2013-05-22 15:04:36 +0000
3+++ addons/openerp/static/javascript/form_state.js 2013-05-29 07:04:13 +0000
4@@ -223,8 +223,10 @@
5 if (typeof(n) == "number") { // {'invisible': [1]}
6 return form_onAttrChange(container, widget, attr, n, $this);
7 }
8+ var name = prefix + n[0];
9+ var field = openobject.dom.get(name);
10 if (row_is_editable) {
11- var $field = jQuery(this).bind('onAttrChange', partial(form_onAttrChange, container, widget, attr, attrs[attr], $this));
12+ var $field = jQuery(field).bind('onAttrChange', partial(form_onAttrChange, container, widget, attr, attrs[attr], $this));
13 $field.change(partial(form_onAttrChange, container, widget, attr, attrs[attr], $this));
14 }
15 return form_onAttrChange(container, widget, attr, attrs[attr], $this);
16@@ -305,6 +307,9 @@
17 stack.push(ex[0]);
18 continue;
19 }
20+ if (!elem || !elem.length) {
21+ continue
22+ }
23 var val = ex[2];
24
25 var elem_value;
26
27=== modified file 'addons/openerp/widgets/_interface.py'
28--- addons/openerp/widgets/_interface.py 2013-05-22 15:04:36 +0000
29+++ addons/openerp/widgets/_interface.py 2013-05-29 07:04:13 +0000
30@@ -214,7 +214,7 @@
31 editable=self.editable,
32 inline=self.inline,
33 attrs={
34- 'attrs': self.attributes or None,
35+ #'attrs': self.attributes or None,
36 'change_default': self.change_default or None,
37 'callback': self.callback or None,
38 'onchange': self.onchange
39@@ -222,12 +222,12 @@
40
41 if self.readonly:
42 params['attrs']['disabled'] = 'disabled'
43- if self.states:
44- states = self.states
45- # convert into JS
46- if isinstance(states, dict):
47- states = dict([(k, dict(v)) for k, v in states.iteritems()])
48- params['attrs']['states'] = simplejson.dumps(states)
49+ #if self.states:
50+ # states = self.states
51+ # # convert into JS
52+ # if isinstance(states, dict):
53+ # states = dict([(k, dict(v)) for k, v in states.iteritems()])
54+ # params['attrs']['states'] = simplejson.dumps(states)
55
56
57 class ConcurrencyInfo(TinyInputWidget):

Subscribers

People subscribed via source and target branches

to all changes: