Merge lp:~unifield-team/unifield-server/us-941 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 4150
Proposed branch: lp:~unifield-team/unifield-server/us-941
Merge into: lp:unifield-server
Diff against target: 134 lines (+50/-5) (has conflicts)
3 files modified
bin/addons/msf_outgoing/wizard/ppl_processor.py (+39/-2)
bin/addons/msf_outgoing/wizard/ppl_processor_view.xml (+4/-3)
bin/addons/msf_profile/i18n/fr_MF.po (+7/-0)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-941
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+314814@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_outgoing/wizard/ppl_processor.py'
2--- bin/addons/msf_outgoing/wizard/ppl_processor.py 2016-11-09 09:07:38 +0000
3+++ bin/addons/msf_outgoing/wizard/ppl_processor.py 2017-01-16 10:09:31 +0000
4@@ -48,7 +48,18 @@
5 ),
6 }
7
8- def do_ppl_step1(self, cr, uid, ids, context=None):
9+ def do_check_ppl(self, cr, uid, ids, context=None):
10+ """
11+ Run a check of the integrity of lines
12+ """
13+ if context is None:
14+ context = {}
15+
16+ res = self.do_ppl_step1(cr, uid, ids, context=context, just_check=True)
17+
18+ return res
19+
20+ def do_ppl_step1(self, cr, uid, ids, context=None, just_check=False):
21 """
22 Make some integrity checks and call the do_ppl_step1 method of the stock.picking object
23 """
24@@ -73,6 +84,7 @@
25 to_smaller_ids = []
26 overlap_ids = []
27 gap_ids = []
28+ ok_ids = []
29
30 for wizard in self.browse(cr, uid, ids, context=context):
31 # List of sequences
32@@ -80,6 +92,7 @@
33
34 for line in wizard.move_ids:
35 sequences.append((line.from_pack, line.to_pack, line.id))
36+ ok_ids.append(line.id)
37
38 # If no data, we return False
39 if not sequences:
40@@ -124,7 +137,10 @@
41 if gap_ids:
42 ppl_move_obj.write(cr, uid, gap_ids, {'integrity_status': 'gap'}, context=context)
43
44- if missing_ids or to_smaller_ids or overlap_ids or gap_ids:
45+ if not (missing_ids or to_smaller_ids or overlap_ids or gap_ids) and just_check:
46+ ppl_move_obj.write(cr, uid, ok_ids, {'integrity_status': 'empty'}, context=context)
47+
48+ if missing_ids or to_smaller_ids or overlap_ids or gap_ids or just_check:
49 view_id = data_obj.get_object_reference(cr, uid, 'msf_outgoing', 'ppl_processor_step1_form_view')[1]
50 return {
51 'type': 'ir.actions.act_window',
52@@ -643,6 +659,15 @@
53
54 return super(ppl_move_processor, self).create(cr, uid, vals, context=context)
55
56+ def write(self, cr, uid, ids, vals, context=None):
57+ """
58+ Remove the integrity status value if from_pack or to_pack is changed.
59+ """
60+ if vals.get('from_pack') or vals.get('to_pack'):
61+ vals['integrity_status'] = 'empty'
62+
63+ return super(ppl_move_processor, self).write(cr, uid, ids, vals, context=context)
64+
65 def _get_line_data(self, cr, uid, wizard=False, move=False, context=None):
66 """
67 Just put the stock move product quantity into the ppl.move.processor
68@@ -727,6 +752,18 @@
69
70 return pick_wiz_id
71
72+ # View methods
73+ def from_to_pack_change(self, cr, uid, ids, from_pack, to_pack):
74+ """
75+ Remove the integrity status when from/to pack value is changed
76+ """
77+ if from_pack or to_pack:
78+ return {
79+ 'value': {'integrity_status': 'empty',},
80+ }
81+
82+ return {}
83+
84 ppl_move_processor()
85
86 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
87
88=== modified file 'bin/addons/msf_outgoing/wizard/ppl_processor_view.xml'
89--- bin/addons/msf_outgoing/wizard/ppl_processor_view.xml 2016-10-28 15:31:38 +0000
90+++ bin/addons/msf_outgoing/wizard/ppl_processor_view.xml 2017-01-16 10:09:31 +0000
91@@ -15,8 +15,9 @@
92 colspan="4" nolabel="1" />
93 <group colspan="4" col="6" name="actions">
94 <separator string="Actions" colspan="6" />
95- <label colspan="4"> </label>
96+ <label colspan="3"> </label>
97 <button special="cancel" string="Cancel" icon="gtk-cancel" />
98+ <button name="do_check_ppl" type="object" string="Check integrity" icon="gtk-info" />
99 <button name="do_ppl_step1" type="object" string="Next" icon="gtk-go-forward" />
100 </group>
101 </form>
102@@ -79,8 +80,8 @@
103 />
104 <field name="prodlot_id" readonly="1" />
105 <field name="qty_per_pack" />
106- <field name="from_pack" />
107- <field name="to_pack" />
108+ <field name="from_pack" on_change="from_to_pack_change(from_pack, to_pack)" />
109+ <field name="to_pack" on_change="from_to_pack_change(from_pack, to_pack)" />
110 <button name="open_split_wizard"
111 type="object"
112 icon="terp-stock_effects-object-colorize"
113
114=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
115--- bin/addons/msf_profile/i18n/fr_MF.po 2017-01-02 08:52:42 +0000
116+++ bin/addons/msf_profile/i18n/fr_MF.po 2017-01-16 10:09:31 +0000
117@@ -75814,6 +75814,7 @@
118 msgid "Partner Created on this instance"
119 msgstr "Partenaire créé sur cette instance"
120
121+<<<<<<< TREE
122 #. module: account_reconciliation
123 #: code:addons/account_reconciliation/wizard/account_reconcile.py:207
124 #, python-format
125@@ -75854,3 +75855,9 @@
126 #, python-format
127 msgid "Wrong total: %.2f, instead of: %.2f"
128 msgstr "Total erroné : %.2f, au lieu de : %.2f"
129+=======
130+#. module: msf_outgoing
131+#: view:ppl.processor:0
132+msgid "Check integrity"
133+msgstr "Vérifier les erreurs"
134+>>>>>>> MERGE-SOURCE

Subscribers

People subscribed via source and target branches

to all changes: