Merge lp:~jfb-tempo-consulting/unifield-web/US-7940 into lp:unifield-web

Proposed by jftempo
Status: Merged
Merged at revision: 5001
Proposed branch: lp:~jfb-tempo-consulting/unifield-web/US-7940
Merge into: lp:unifield-web
Diff against target: 129 lines (+16/-13)
7 files modified
addons/openerp/static/css/screen.css (+5/-2)
addons/openerp/static/javascript/form.js (+0/-4)
addons/openerp/static/javascript/listgrid.js (+2/-2)
addons/openerp/widgets/form/_form.py (+2/-2)
addons/openerp/widgets/templates/listgrid/listgrid.mako (+2/-2)
addons/openerp/widgets/templates/pager.mako (+1/-0)
openobject/i18n/format.py (+4/-1)
To merge this branch: bzr merge lp:~jfb-tempo-consulting/unifield-web/US-7940
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+393181@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/css/screen.css'
2--- addons/openerp/static/css/screen.css 2020-02-25 13:27:26 +0000
3+++ addons/openerp/static/css/screen.css 2020-11-02 12:53:20 +0000
4@@ -2447,11 +2447,14 @@
5 }
6 #rr-chrono .elt {
7 }
8+#rr-chrono .oplt {
9+ width: 16.66%;
10+}
11 #rr-chrono .oclt {
12- width: 25%;
13+ width: 16.66%;
14 }
15 #rr-chrono .ovlt {
16- width: 25%;
17+ width: 16.66%;
18 }
19 #rr-chrono .slt {
20 width: 25%;
21
22=== modified file 'addons/openerp/static/javascript/form.js'
23--- addons/openerp/static/javascript/form.js 2020-08-06 14:23:27 +0000
24+++ addons/openerp/static/javascript/form.js 2020-11-02 12:53:20 +0000
25@@ -441,10 +441,6 @@
26 s_ids = ListView('move_lines').getSelectedRecords();
27 } else if (model == 'shipment' && jQuery('[id="pack_family_memory_ids"]').length > 0){
28 s_ids = ListView('pack_family_memory_ids').getSelectedRecords();
29- } else if (model =='replenishment.inventory.review' && jQuery('[id="line_ids"]').length > 0){
30- s_ids = ListView('line_ids').getSelectedRecords();
31- } else if (model =='replenishment.segment' && jQuery('[id="line_ids"]').length > 0){
32- s_ids = ListView('line_ids').getSelectedRecords();
33 } else if (model =='wizard.compare.rfq' && jQuery('[id="line_ids"]').length > 0){
34 s_ids = ListView('line_ids').getSelectedRecords();
35 }
36
37=== modified file 'addons/openerp/static/javascript/listgrid.js'
38--- addons/openerp/static/javascript/listgrid.js 2020-01-13 15:25:16 +0000
39+++ addons/openerp/static/javascript/listgrid.js 2020-11-02 12:53:20 +0000
40@@ -131,11 +131,11 @@
41 selectedRow_sum: function() {
42 var selected_ids = this.getSelectedRecords();
43 var $delete_record_option = jQuery(idSelector(this.name + '_delete_record')).parent();
44-
45+
46 if (selected_ids.length != 0) {
47 $delete_record_option.show();
48 } else {
49- $delete_record_option.hide();
50+ $delete_record_option.hide();
51 }
52
53 var $sum_fields = jQuery('.field_sum', idSelector(this.name));
54
55=== modified file 'addons/openerp/widgets/form/_form.py'
56--- addons/openerp/widgets/form/_form.py 2020-06-15 13:17:38 +0000
57+++ addons/openerp/widgets/form/_form.py 2020-11-02 12:53:20 +0000
58@@ -493,7 +493,7 @@
59 # self.default = 0.0
60
61 def set_value(self, value):
62- if self.with_null and value is False:
63+ if self.with_null and (value is False or value is None):
64 self.default = ''
65 else:
66 self.default = value or 0.0
67@@ -970,7 +970,7 @@
68 elif node.localName=='separator':
69 views.append(Separator(**attrs))
70
71- elif node.localName=='label':
72+ elif node.localName=='label' and not attrs.get('html'):
73 text = attrs.get('string', '')
74
75 if not text:
76
77=== modified file 'addons/openerp/widgets/templates/listgrid/listgrid.mako'
78--- addons/openerp/widgets/templates/listgrid/listgrid.mako 2020-08-06 14:23:27 +0000
79+++ addons/openerp/widgets/templates/listgrid/listgrid.mako 2020-11-02 12:53:20 +0000
80@@ -102,7 +102,7 @@
81 if selector == "radio":
82 selector_click += " do_select();"
83 %>
84- <input type="${selector}" class="${selector} grid-record-selector"
85+ <input type="${selector}" class="${selector} grid-record-selector ignore_changes_when_leaving_page"
86 id="${name}/${data['id']}" name="${(checkbox_name or None) and name}"
87 value="${data['id']}"
88 onclick="${selector_click}"/>
89@@ -341,7 +341,7 @@
90 % if selector:
91 <th width="1" class="grid-cell selector">
92 % if selector == 'checkbox' and not m2m:
93- <input type="checkbox" class="checkbox grid-record-selector" id="${name}_check_all" onclick="new ListView('${name}').checkAll(!this.checked)"/>
94+ <input type="checkbox" class="checkbox grid-record-selector ignore_changes_when_leaving_page" id="${name}_check_all" onclick="new ListView('${name}').checkAll(!this.checked)"/>
95 % endif
96 % if selector != 'checkbox' and not m2m:
97 <span>&nbsp;</span>
98
99=== modified file 'addons/openerp/widgets/templates/pager.mako'
100--- addons/openerp/widgets/templates/pager.mako 2017-06-01 13:48:36 +0000
101+++ addons/openerp/widgets/templates/pager.mako 2020-11-02 12:53:20 +0000
102@@ -42,6 +42,7 @@
103 <select id='_${name+str(pager_id)}_limit'
104 action="filter"
105 relation="${name}"
106+ class="ignore_changes_when_leaving_page"
107 onchange="jQuery('[id=${name_base}_terp_limit]').val(jQuery(this).val());
108 jQuery('[id=${name_base}_terp_offset]').val(0);
109 pager_action(this)" style="min-width: 25px;">
110
111=== modified file 'openobject/i18n/format.py'
112--- openobject/i18n/format.py 2018-09-17 13:18:04 +0000
113+++ openobject/i18n/format.py 2020-11-02 12:53:20 +0000
114@@ -307,12 +307,15 @@
115 if kwargs.get('computation', False):
116 # fixed min decimal value
117 min_digits = 2
118+ if kwargs['computation'] == -1:
119+ min_digits = 0
120 # remove trailing zeros
121 decimals = decimals.rstrip('0')
122 # if less than two digits, we add padding - possible improvement, add the padding size in the decimal precision object
123 if len(decimals) < min_digits:
124 decimals = decimals + '0'*(min_digits - len(decimals))
125-
126+ if not decimals:
127+ return val
128 result = val + unicode(numbers.get_decimal_symbol(locale) + decimals)
129 return result
130

Subscribers

People subscribed via source and target branches