Merge lp:~jfb-tempo-consulting/unifield-server/US-3697 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 4883
Proposed branch: lp:~jfb-tempo-consulting/unifield-server/US-3697
Merge into: lp:unifield-server
Diff against target: 53 lines (+15/-4)
2 files modified
bin/addons/msf_doc_import/wizard/wizard_in_simulation_screen.py (+9/-4)
bin/addons/msf_profile/i18n/fr_MF.po (+6/-0)
To merge this branch: bzr merge lp:~jfb-tempo-consulting/unifield-server/US-3697
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+343405@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_in_simulation_screen.py'
2--- bin/addons/msf_doc_import/wizard/wizard_in_simulation_screen.py 2017-11-25 16:09:54 +0000
3+++ bin/addons/msf_doc_import/wizard/wizard_in_simulation_screen.py 2018-04-17 09:12:13 +0000
4@@ -55,7 +55,7 @@
5 HEADER_COLUMNS = [
6 (1, _('Freight'), 'optionnal'),
7 (2, _('Picking Reference'), 'optionnal'),
8- (1, _('Origin'), 'optionnal'),
9+ (1, _('Origin'), 'mandatory'),
10 (4, _('Supplier'), 'optionnal'),
11 (5, _('Transport mode'), 'optionnal'),
12 (6, _('Notes'), 'optionnal'),
13@@ -441,8 +441,6 @@
14 error.append(_('Line %s, column %s, value %s is mandatory') % (index, nb+1, x[0]))
15 if row.cells[nb].data and x[3] == 'int':
16 try:
17- if row.cells[nb].type == 'float':
18- raise
19 int(row.cells[nb].data)
20 except:
21 error.append(_('Line %s, column %s, integer expected, found %s') % (index, nb+1, row.cells[nb].data))
22@@ -622,9 +620,16 @@
23
24 # Line 3: Origin
25 origin = values.get(3, ['', ''])[1]
26+ if origin != wiz.origin:
27+ message = _("Import aborted, the Origin (%s) is not the same as in the Incoming Shipment %s (%s).") \
28+ % (origin, wiz.picking_id.name, wiz.origin)
29+ self.write(cr, uid, [wiz.id], {'message': message, 'state': 'error'}, context)
30+ res = self.go_to_simulation(cr, uid, [wiz.id], context=context)
31+ cr.commit()
32+ cr.close(True)
33+ return res
34 header_values['imp_origin'] = origin
35
36-
37 # Line 5: Transport mode
38 transport_mode = values.get(5, ['', ''])[1]
39 header_values['imp_transport_mode'] = transport_mode
40
41=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
42--- bin/addons/msf_profile/i18n/fr_MF.po 2018-03-20 10:40:57 +0000
43+++ bin/addons/msf_profile/i18n/fr_MF.po 2018-04-17 09:12:13 +0000
44@@ -107519,3 +107519,9 @@
45 #, python-format
46 msgid "You have to load the template first."
47 msgstr "Vous devez d'abord charger le modèle."
48+
49+#. module: msf_doc_import
50+#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:625
51+#, python-format
52+msgid "Import aborted, the Origin (%s) is not the same as in the Incoming Shipment %s (%s)."
53+msgstr "Import interrompu, l'Origine (%s) n'est pas la même que dans la Livraison Entrante %s (%s)."

Subscribers

People subscribed via source and target branches