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

Proposed by jftempo
Status: Merged
Merge reported by: jftempo
Merged at revision: not available
Proposed branch: lp:~unifield-team/unifield-server/us-2194
Merge into: lp:unifield-server
Diff against target: 70 lines (+21/-7) (has conflicts)
2 files modified
bin/addons/msf_outgoing/msf_outgoing.py (+13/-0)
bin/addons/sale_override/sale.py (+8/-7)
Text conflict in bin/addons/msf_outgoing/msf_outgoing.py
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-2194
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+314718@code.launchpad.net
To post a comment you must log in.
4137. By Quentin THEURET @Amaris

US-2194 [FIX] When a FO line is C&R at Coordo, do not cancel the OUT line atProject

4138. By Quentin THEURET @Amaris

US-2194 [FIX] Do not remove the OUT line if the canceled IN line is resourced

4139. By Quentin THEURET @Amaris

US-2194 [FIX] Fix bad indent

4140. By Quentin THEURET @Amaris

US-2194 [FIX] Fix bad indent

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/msf_outgoing/msf_outgoing.py'
2--- bin/addons/msf_outgoing/msf_outgoing.py 2017-01-17 13:31:02 +0000
3+++ bin/addons/msf_outgoing/msf_outgoing.py 2017-01-19 09:38:14 +0000
4@@ -4772,7 +4772,11 @@
5 pick_obj = self.pool.get('stock.picking')
6 sol_obj = self.pool.get('sale.order.line')
7 uom_obj = self.pool.get('product.uom')
8+<<<<<<< TREE
9 #solc_obj = self.pool.get('sale.order.line.cancel')
10+=======
11+ solc_obj = self.pool.get('sale.order.line.cancel')
12+>>>>>>> MERGE-SOURCE
13
14 if context is None:
15 context = {}
16@@ -4817,12 +4821,21 @@
17 for sol in sol_obj.browse(cr, uid, sol_ids, context=context):
18 if sol.order_id.procurement_request and pick_cancel:
19 continue
20+<<<<<<< TREE
21
22 # If the line will be sourced in another way, do not cancel the OUT move
23 #if solc_obj.search(cr, uid, [('sync_order_line_db_id', '=', sol.sync_order_line_db_id)],
24 # limit=1, order='NO_ORDER', context=context):
25 # continue
26
27+=======
28+
29+ # If the line will be sourced in another way, do not cancel the OUT move
30+ if solc_obj.search(cr, uid, [('fo_sync_order_line_db_id', '=', sol.sync_order_line_db_id), ('resource_sync_line_db_id', '!=', False)],
31+ limit=1, order='NO_ORDER', context=context):
32+ continue
33+
34+>>>>>>> MERGE-SOURCE
35 diff_qty = uom_obj._compute_qty(cr, uid, move.product_uom.id, move.product_qty, sol.product_uom.id)
36 if move.has_to_be_resourced or move.picking_id.has_to_be_resourced:
37 sol_obj.add_resource_line(cr, uid, sol.id, False, diff_qty, context=context)
38
39=== modified file 'bin/addons/sale_override/sale.py'
40--- bin/addons/sale_override/sale.py 2017-01-17 10:55:37 +0000
41+++ bin/addons/sale_override/sale.py 2017-01-19 09:38:14 +0000
42@@ -3007,12 +3007,13 @@
43 if move['picking_id']:
44 picking_ids.add(move['picking_id'][0])
45
46- if line.order_id.procurement_request and line.order_id.location_requestor_id.usage == 'customer':
47- move_obj.write(cr, uid, move_ids, {'state': 'draft'}, context=context)
48- move_obj.unlink(cr, uid, move_ids, context=context)
49- else:
50- move_obj.write(cr, uid, move_ids, {'state': 'cancel'}, context=context)
51- move_obj.action_cancel(cr, uid, move_ids, context=context)
52+ if not context.get('no_cancel_out'):
53+ if line.order_id.procurement_request and line.order_id.location_requestor_id.usage == 'customer':
54+ move_obj.write(cr, uid, move_ids, {'state': 'draft'}, context=context)
55+ move_obj.unlink(cr, uid, move_ids, context=context)
56+ else:
57+ move_obj.write(cr, uid, move_ids, {'state': 'cancel'}, context=context)
58+ move_obj.action_cancel(cr, uid, move_ids, context=context)
59
60 for pick in pick_obj.browse(cr, uid, list(picking_ids), context=context):
61 if not len(pick.move_lines) or (pick.subtype == 'standard' and all(m.state == 'cancel' for m in pick.move_lines)):
62@@ -3048,7 +3049,7 @@
63 elif line.order_id.procurement_request:
64 # UFTP-82: flagging SO is an IR and its PO is cancelled
65 self.pool.get('sale.order').write(cr, uid, [line.order_id.id], {'is_ir_from_po_cancel': True}, context=context)
66- if proc and context.get('cancel_type'):
67+ if proc and context.get('cancel_type') and not context.get('no_cancel_out'):
68 proc_obj.write(cr, uid, [proc], {'product_qty': 0.00}, context=context)
69 proc_obj.action_cancel(cr, uid, [proc])
70 else:

Subscribers

People subscribed via source and target branches

to all changes: