Merge lp:~dorian-kemps/unifield-server/US-2226 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5025
Proposed branch: lp:~dorian-kemps/unifield-server/US-2226
Merge into: lp:unifield-server
Diff against target: 210 lines (+44/-20) (has conflicts)
2 files modified
bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py (+24/-20)
bin/addons/msf_profile/i18n/fr_MF.po (+20/-0)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-2226
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+350941@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 'bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py'
2--- bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py 2018-07-11 14:31:55 +0000
3+++ bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py 2018-07-25 16:11:35 +0000
4@@ -788,6 +788,7 @@
5 # Check mandatory fields
6 not_ok = False
7 file_line_error = []
8+ line_number = values.get(x, [''])[0] and int(values.get(x, [''])[0]) or False
9 for manda_field in LINES_COLUMNS:
10 if manda_field[2] == 'mandatory' and not values.get(x, [])[manda_field[0]]:
11 # Removed by QT on UFTP-370
12@@ -807,11 +808,10 @@
13 if required_field:
14 not_ok = True
15 err1 = _('The column \'%s\' mustn\'t be empty%s') % (manda_field[1], manda_field[0] == 0 and ' - Line not imported' or '')
16- err = _('Line %s of the file: %s') % (x, err1)
17+ err = _('Line %s of the PO: %s') % (line_number, err1)
18 values_line_errors.append(err)
19 file_line_error.append(err1)
20
21- line_number = values.get(x, [''])[0] and int(values.get(x, [''])[0]) or False
22 ext_ref = values.get(x, ['', ''])[1] and tools.ustr(values.get(x, ['', ''])[1])
23
24 if not line_number and not ext_ref:
25@@ -824,7 +824,7 @@
26 if line_number and ext_ref and (ext_ref not in LN_BY_EXT_REF[wiz.id].keys() or line_number not in LN_BY_EXT_REF[wiz.id][ext_ref]):
27 not_ok = True
28 err1 = _('The line cannot have both Line no. and Ext. Ref')
29- err = _('Line %s of the file: %s') % (x, err1)
30+ err = _('Line %s of the PO: %s') % (line_number, err1)
31 values_line_errors.append(err)
32 file_line_error.append(err1)
33
34@@ -879,19 +879,19 @@
35 file line and the simulation screen line.
36 '''
37 to_del = []
38- for x, fl in file_lines.iteritems():
39+ for x, fl in sorted(file_lines.iteritems()):
40 # Search lines with same product, same UoM and same qty
41 matching_lines = SIMU_LINES.get(wiz.id, {}).get(fl[0], {})
42 tmp_wl_ids = matching_lines.get(fl[1], {}).get(fl[2], {}).get(fl[3], [])
43 no_match = True
44 for l in tmp_wl_ids:
45 if l not in file_po_lines:
46- file_po_lines[l] = [(x, 'match')]
47+ file_po_lines[l] = [(x, 'match', fl[0])]
48 to_del.append(x)
49 no_match = False
50 break
51 if tmp_wl_ids and no_match:
52- file_po_lines[l].append((x, 'split'))
53+ file_po_lines[l].append((x, 'split', fl[0]))
54 to_del.append(x)
55 # Clear the dict
56 for x in to_del:
57@@ -906,12 +906,12 @@
58 no_match = True
59 for l in tmp_wl_ids:
60 if l not in file_po_lines:
61- file_po_lines[l] = [(x, 'match')]
62+ file_po_lines[l] = [(x, 'match', fl[0])]
63 to_del.append(x)
64 no_match = False
65 break
66 if tmp_wl_ids and no_match:
67- file_po_lines[l].append((x, 'split'))
68+ file_po_lines[l].append((x, 'split', fl[0]))
69 to_del.append(x)
70 # Clear the dict
71 for x in to_del:
72@@ -925,12 +925,12 @@
73 no_match = True
74 for l in tmp_wl_ids:
75 if l not in file_po_lines:
76- file_po_lines[l] = [(x, 'match')]
77+ file_po_lines[l] = [(x, 'match', fl[0])]
78 to_del.append(x)
79 no_match = False
80 break
81 if tmp_wl_ids and no_match:
82- file_po_lines[l].append((x, 'split'))
83+ file_po_lines[l].append((x, 'split', fl[0]))
84 to_del.append(x)
85 # Clear the dict
86 for x in to_del:
87@@ -944,12 +944,12 @@
88 no_match = True
89 for l in tmp_wl_ids:
90 if l not in file_po_lines:
91- file_po_lines[l] = [(x, 'match')]
92+ file_po_lines[l] = [(x, 'match', fl[0])]
93 to_del.append(x)
94 no_match = False
95 break
96 if tmp_wl_ids and no_match:
97- file_po_lines[l].append((x, 'split'))
98+ file_po_lines[l].append((x, 'split', fl[0]))
99 to_del.append(x)
100 # Clear the dict
101 for x in to_del:
102@@ -991,7 +991,7 @@
103
104 if err_msg:
105 for err in err_msg:
106- err = 'Line %s of the file: %s' % (file_line[0], err)
107+ err = 'Line %s of the PO: %s' % (file_line[2], err)
108 values_line_errors.append(err)
109
110
111@@ -1013,9 +1013,13 @@
112 if po_line in not_ok_file_lines:
113 wl_obj.write(cr, uid, [new_wl_id], {'type_change': 'error', 'error_msg': not_ok_file_lines[po_line]}, context=context)
114
115+ line_n = vals[0] or False
116 if err_msg:
117 for err in err_msg:
118- err = 'Line %s of the file: %s' % (po_line, err)
119+ if line_n:
120+ err = 'Line %s of the PO: %s' % (line_n, err)
121+ else:
122+ err = 'Line %s of the file: %s' % (po_line, err)
123 values_line_errors.append(err)
124 # Commit modifications
125 cr.commit()
126@@ -1307,7 +1311,7 @@
127 'in_ext_ref': fields.char(size=256, string='External Ref.', readonly=True),
128 'type_change': fields.selection([('', ''), ('error', 'Error'), ('new', 'New'),
129 ('split', 'Split'), ('del', 'Del'),
130- ('ignore', 'Ignore')],
131+ ('ignore', 'Ignore'), ('warning', 'Warning')],
132 string='CHG', readonly=True),
133 'imp_product_id': fields.many2one('product.product', string='Product',
134 readonly=True),
135@@ -1367,7 +1371,7 @@
136
137 if line.po_line_id.state in ('confirmed', 'done', 'cancel', 'cancel_r'):
138 write_vals['type_change'] = 'error'
139- errors.append(_('PO line #%s has been confirmed or cancelled and consequently is not editable') % line.in_line_number)
140+ errors.append(_('PO line has been confirmed or cancelled and consequently is not editable'))
141
142 # Comment
143 write_vals['imp_comment'] = values[15] and values[15].strip()
144@@ -1380,11 +1384,11 @@
145 if not pol_ids and not (write_vals['imp_comment'] and write_vals['imp_comment'] == '[DELETE]'):
146 errors.append(_('Line no is not consistent with validated PO.'))
147 write_vals['in_line_number'] = False
148- write_vals['type_change'] = 'error'
149+ write_vals['type_change'] = 'warning'
150
151 if (write_vals['imp_comment'] and write_vals['imp_comment'] == '[DELETE]'):
152 if not pol_ids:
153- write_vals['type_change'] = 'error'
154+ write_vals['type_change'] = 'warning'
155 if line.in_line_number:
156 errors.append(_('The import file is inconsistent. Line no. %s is not existing or was previously deleted') % line.in_line_number)
157 else:
158@@ -1419,7 +1423,7 @@
159 prod_ids = prod_obj.search(cr, uid, [('default_code', '=', values[2])], context=context)
160 if not prod_ids:
161 write_vals['type_change'] = 'error'
162- errors.append(_('Product not found in database'))
163+ errors.append(_('Product %s not found in database') % values[2])
164 else:
165 write_vals['imp_product_id'] = prod_ids[0]
166 else:
167@@ -1573,7 +1577,7 @@
168 if line.error_msg:
169 write_vals['type_change'] = 'error'
170
171- if write_vals.get('type_change') == 'error':
172+ if write_vals.get('type_change') in ['error', 'warning']:
173 err_msg = line.error_msg or ''
174 for err in errors:
175 if err_msg:
176
177=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
178--- bin/addons/msf_profile/i18n/fr_MF.po 2018-07-17 14:12:28 +0000
179+++ bin/addons/msf_profile/i18n/fr_MF.po 2018-07-25 16:11:35 +0000
180@@ -101196,6 +101196,7 @@
181 msgid "Not Invoice"
182 msgstr "Pas de Facture"
183
184+<<<<<<< TREE
185 #. module: analytic_distribution
186 #: view:mass.reallocation.wizard:0
187 msgid "- Items booked on accounts set as \"Prevent correction on analytic accounts\""
188@@ -101332,3 +101333,22 @@
189 #, python-format
190 msgid "Line %s. Please fill in either a Booking Debit or a Booking Credit value."
191 msgstr "Ligne %s. Veuillez renseigner une valeur en devise d'enregistrement, soit en débit soit en crédit."
192+=======
193+#. module: msf_doc_import
194+#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:811
195+#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:827
196+#, python-format
197+msgid "Line %s of the PO: %s"
198+msgstr "Ligne %s du BC: %s"
199+
200+#. module: msf_doc_import
201+#: selection:wizard.import.po.simulation.screen.line,type_change:0
202+msgid "Warning"
203+msgstr "Attention"
204+
205+#. module: msf_doc_import
206+#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1374
207+#, python-format
208+msgid "PO line has been confirmed or cancelled and consequently is not editable"
209+msgstr "La ligne du BC a été confirmée ou annulée et n'est donc plus éditable"
210+>>>>>>> MERGE-SOURCE

Subscribers

People subscribed via source and target branches