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

Proposed by jftempo
Status: Merged
Merged at revision: 4179
Proposed branch: lp:~unifield-team/unifield-server/us-1931
Merge into: lp:unifield-server
Diff against target: 64 lines (+7/-7)
4 files modified
bin/addons/msf_doc_import/sale_order.py (+2/-0)
bin/addons/msf_outgoing/msf_outgoing.py (+1/-1)
bin/addons/purchase_override/purchase.py (+3/-5)
bin/addons/sourcing/sale_order_line.py (+1/-1)
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-1931
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+315868@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jeff Allen (jr.allen) :

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/sale_order.py'
2--- bin/addons/msf_doc_import/sale_order.py 2016-08-18 08:32:03 +0000
3+++ bin/addons/msf_doc_import/sale_order.py 2017-02-02 13:42:30 +0000
4@@ -327,6 +327,8 @@
5 vals['to_correct_ok'] = False
6 vals['text_error'] = False
7
8+ if vals.get('state') in ('done', 'cancel'):
9+ context['bypass_product_constraints'] = True
10 return super(sale_order_line, self).write(cr, uid, ids, vals, context=context)
11
12 def create(self, cr, uid, vals, context=None):
13
14=== modified file 'bin/addons/msf_outgoing/msf_outgoing.py'
15--- bin/addons/msf_outgoing/msf_outgoing.py 2017-01-31 10:50:12 +0000
16+++ bin/addons/msf_outgoing/msf_outgoing.py 2017-02-02 13:42:30 +0000
17@@ -1271,7 +1271,7 @@
18 today = time.strftime(date_format)
19 today_db = time.strftime(db_date_format)
20 so_obj.write(cr, uid, [new_packing.sale_id.id], {'shipment_date': today_db, }, context=context)
21- so_obj.log(cr, uid, new_packing.sale_id.id, _("Shipment Date of the Field Order '%s' has been updated to %s.") % (new_packing.sale_id.name, today))
22+ so_obj.log(cr, uid, new_packing.sale_id.id, _("Shipment Date of the Field Order '%s' has been updated to %s.") % (new_packing.sale_id.name, tools.ustr(today)))
23
24 # update locations of stock moves
25 for move in new_packing.move_lines:
26
27=== modified file 'bin/addons/purchase_override/purchase.py'
28--- bin/addons/purchase_override/purchase.py 2017-01-23 16:14:11 +0000
29+++ bin/addons/purchase_override/purchase.py 2017-02-02 13:42:30 +0000
30@@ -1264,8 +1264,8 @@
31 if line.soq_updated:
32 reset_soq.append(line.id)
33
34- # check if the current product is stopped or not :
35- if line.product_id and line.product_id.state and line.product_id.state.id == stopped_id:
36+ # check if the current product is stopped or not : If the PO was created by Sync. engine, do not check
37+ if not po.push_fo and line.product_id and line.product_id.state and line.product_id.state.id == stopped_id:
38 raise osv.except_osv(_('Error'), _('You can not validate a PO with stopped products (line %s).') % (line.line_number, ))
39
40 message = _("Purchase order '%s' is validated.") % (po.name,)
41@@ -1600,9 +1600,7 @@
42
43 sol = sol_obj.browse(cr, uid, sol_ids[0], context=context)
44 so = sol.order_id
45- # do not update Internal Requests with internal requestor location
46- if so and so.procurement_request and so.location_requestor_id.usage != 'customer':
47- continue
48+ # US-1931: Remove code that do not update Internal Requests with internal requestor location
49
50 line_confirmed = False
51 # compute confirmed date for line
52
53=== modified file 'bin/addons/sourcing/sale_order_line.py'
54--- bin/addons/sourcing/sale_order_line.py 2016-11-17 10:50:45 +0000
55+++ bin/addons/sourcing/sale_order_line.py 2017-02-02 13:42:30 +0000
56@@ -1027,7 +1027,7 @@
57 _("You can't Source to an 'External' partner if you don't have product."),
58 )
59
60- if line.state not in ('draft', 'cancel') and line.product_id and line.supplier:
61+ if line.state not in ('draft', 'cancel') and line.product_id and line.supplier and not context.get('bypass_product_constraints'):
62 # Check product constraints (no external supply, no storage...)
63 check_fnct = product_obj._get_restriction_error
64 self._check_product_constraints(cr, uid, line.type, line.po_cft, line.product_id.id, line.supplier.id, check_fnct, context=context)

Subscribers

People subscribed via source and target branches

to all changes: