Merge lp:~unifield-team/unifield-wm/us-285-299-307-416 into lp:unifield-wm

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~unifield-team/unifield-wm/us-285-299-307-416
Merge into: lp:unifield-wm
Diff against target: 116 lines (+37/-0) (has conflicts)
3 files modified
msf_outgoing/msf_outgoing.py (+19/-0)
register_accounting/account_bank_statement.py (+9/-0)
sale_override/sale.py (+9/-0)
Text conflict in register_accounting/account_bank_statement.py
To merge this branch: bzr merge lp:~unifield-team/unifield-wm/us-285-299-307-416
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+265796@code.launchpad.net
To post a comment you must log in.
2557. By Quentin THEURET @Amaris

Merge latest US-416 modifications

2558. By Quentin THEURET @Amaris

US-416 [FIX] Run procurement automatically for lines sourced from stock

Unmerged revisions

2558. By Quentin THEURET @Amaris

US-416 [FIX] Run procurement automatically for lines sourced from stock

2557. By Quentin THEURET @Amaris

Merge latest US-416 modifications

2556. By Quentin THEURET @Amaris

US-285 [IMP] At import of Physical inventory and product cost reevaluation, take care of only the product code (not the product name) to find the good product

2555. By Quentin THEURET @Amaris

US-416 [MERGE] Merge US-416 branch :: lp:~unifield-team/unifield-wm/us-416

2554. By Quentin THEURET @Amaris

US-307 [MERGE] Merge US-307 branch :: lp:~unifield-team/unifield-wm/us-307

2553. By Quentin THEURET @Amaris

US-299 [MERGE] Merge US-299 branch :: lp:~unifield-team/unifield-wm/us-299

2552. By Quentin THEURET @Amaris

US-285 [MERGE] Merge US-285 branch :: lp:~unifield-team/unifield-wm/us-285

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_hq_entries/wizard/hq_entries_import.py'
2=== modified file 'analytic_override/analytic_line.py'
3=== modified file 'delivery_mechanism/delivery_mechanism.py'
4=== modified file 'msf_outgoing/msf_outgoing.py'
5--- msf_outgoing/msf_outgoing.py 2015-08-04 11:45:10 +0000
6+++ msf_outgoing/msf_outgoing.py 2015-08-07 08:26:53 +0000
7@@ -4500,13 +4500,20 @@
8 '''
9 pol_obj = self.pool.get('purchase.order.line')
10 proc_obj = self.pool.get('procurement.order')
11+ pick_obj = self.pool.get('stock.picking')
12 sol_obj = self.pool.get('sale.order.line')
13 uom_obj = self.pool.get('product.uom')
14
15 if context is None:
16 context = {}
17
18+ move_to_done = []
19+ pick_to_check = set()
20+
21 for move in self.browse(cr, uid, ids, context=context):
22+ if move.product_qty == 0.00:
23+ move_to_done.append(move.id)
24+ ids.remove(move.id)
25 """
26 A stock move can be re-sourced but there are some conditions
27
28@@ -4532,6 +4539,9 @@
29 pick_state = move.picking_id.state
30 subtype_ok = pick_type == 'out' and (pick_subtype == 'standard' or (pick_subtype == 'picking' and pick_state == 'draft'))
31
32+ if pick_subtype == 'picking' and pick_state == 'draft':
33+ pick_to_check.add(move.picking_id.id)
34+
35 if pick_type == 'in' and move.purchase_line_id:
36 sol_ids = pol_obj.get_sol_ids_from_pol_ids(cr, uid, [move.purchase_line_id.id], context=context)
37 for sol in sol_obj.browse(cr, uid, sol_ids, context=context):
38@@ -4568,6 +4578,8 @@
39 {'move_id': other_out_move_ids[0]},
40 context=context)
41
42+ self.action_done(cr, uid, move_to_done, context=context)
43+
44 # Search only non unlink move
45 ids = self.search(cr, uid, [('id', 'in', ids)])
46 res = super(stock_move, self).action_cancel(cr, uid, ids, context=context)
47@@ -4582,6 +4594,13 @@
48 # else:
49 # wf_service.trg_validate(uid, 'procurement.order', proc.id, 'button_check', cr)
50
51+ for ptc in pick_obj.browse(cr, uid, list(pick_to_check), context=context):
52+ if ptc.subtype == 'picking' and ptc.state == 'draft' and not pick_obj.has_picking_ticket_in_progress(cr, uid, [ptc.id], context=context)[ptc.id] and all(m.state == 'cancel' or m.product_qty == 0.00 for m in ptc.move_lines):
53+ moves_to_done = self.search(cr, uid, [('picking_id', '=', ptc.id), ('product_qty', '=', 0.00), ('state', 'not in', ['done', 'cancel'])], context=context)
54+ if moves_to_done:
55+ self.action_done(cr, uid, moves_to_done, context=context)
56+ ptc.action_done(context=context)
57+
58 return res
59
60 def update_linked_documents(self, cr, uid, ids, new_id, context=None):
61
62=== modified file 'register_accounting/account_bank_statement.py'
63--- register_accounting/account_bank_statement.py 2015-08-05 13:43:27 +0000
64+++ register_accounting/account_bank_statement.py 2015-08-07 08:26:53 +0000
65@@ -1907,12 +1907,21 @@
66
67 old_distrib = False
68 if line.get('analytic_distribution_id', False):
69+<<<<<<< TREE
70 old_distrib = line.get('analytic_distribution_id')[0]
71
72 # US-427: Do not update the AD from Employee/Third party if it comes from sync, only use the one provided by sync
73 if not context.get('sync_update_execution'):
74 values = self.update_employee_analytic_distribution(cr, uid, values) # this should only be done at local instance
75
76+=======
77+ old_distrib = line.get('analytic_distribution_id')[0]
78+
79+ # US-427: Do not update the AD from Employee/Third party if it comes from sync, only use the one provided by sync
80+ if not context.get('sync_update_execution'):
81+ values = self.update_employee_analytic_distribution(cr, uid, values) # this should only be done at local instance
82+
83+>>>>>>> MERGE-SOURCE
84 tmp = super(account_bank_statement_line, self).write(cr, uid, line.get('id'), values, context=context)
85 res.append(tmp)
86
87
88=== modified file 'res_currency_functional/account_move_compute_currency.py'
89=== modified file 'res_currency_functional/account_move_line_compute_currency.py'
90=== modified file 'sale_override/sale.py'
91--- sale_override/sale.py 2015-08-06 08:49:25 +0000
92+++ sale_override/sale.py 2015-08-07 08:26:53 +0000
93@@ -1640,6 +1640,9 @@
94
95 wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_confirm', cr)
96
97+ if line.type == 'make_to_stock' and line.procurement_id:
98+ wf_service.trg_validate(uid, 'procurement.order', line.procurement_id.id, 'button_check', cr)
99+
100 line_done += 1
101 prog_id = self.update_sourcing_progress(cr, uid, order, prog_id, {
102 'line_completed': _('In progress (%s/%s)') % (line_done, line_total),
103@@ -2324,7 +2327,13 @@
104 # - purchase_order_line.cancel_sol()
105 if not 'update_or_cancel_line_not_delete' in context \
106 or not context['update_or_cancel_line_not_delete']:
107+ tmp_ctx = context.get('call_unlink', None)
108+ context['call_unlink'] = True
109 self.unlink(cr, uid, [line.id], context=context)
110+ if tmp_ctx is None:
111+ del context['call_unlink']
112+ else:
113+ context['call_unlink'] = tmp_ctx
114 elif line.order_id.procurement_request:
115 # UFTP-82: flagging SO is an IR and its PO is cancelled
116 self.pool.get('sale.order').write(cr, uid, [line.order_id.id], {'is_ir_from_po_cancel': True}, context=context)

Subscribers

People subscribed via source and target branches