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
=== modified file 'bin/addons/msf_doc_import/sale_order.py'
--- bin/addons/msf_doc_import/sale_order.py 2016-08-18 08:32:03 +0000
+++ bin/addons/msf_doc_import/sale_order.py 2017-02-02 13:42:30 +0000
@@ -327,6 +327,8 @@
327 vals['to_correct_ok'] = False327 vals['to_correct_ok'] = False
328 vals['text_error'] = False328 vals['text_error'] = False
329329
330 if vals.get('state') in ('done', 'cancel'):
331 context['bypass_product_constraints'] = True
330 return super(sale_order_line, self).write(cr, uid, ids, vals, context=context)332 return super(sale_order_line, self).write(cr, uid, ids, vals, context=context)
331333
332 def create(self, cr, uid, vals, context=None):334 def create(self, cr, uid, vals, context=None):
333335
=== modified file 'bin/addons/msf_outgoing/msf_outgoing.py'
--- bin/addons/msf_outgoing/msf_outgoing.py 2017-01-31 10:50:12 +0000
+++ bin/addons/msf_outgoing/msf_outgoing.py 2017-02-02 13:42:30 +0000
@@ -1271,7 +1271,7 @@
1271 today = time.strftime(date_format)1271 today = time.strftime(date_format)
1272 today_db = time.strftime(db_date_format)1272 today_db = time.strftime(db_date_format)
1273 so_obj.write(cr, uid, [new_packing.sale_id.id], {'shipment_date': today_db, }, context=context)1273 so_obj.write(cr, uid, [new_packing.sale_id.id], {'shipment_date': today_db, }, context=context)
1274 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))1274 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)))
12751275
1276 # update locations of stock moves1276 # update locations of stock moves
1277 for move in new_packing.move_lines:1277 for move in new_packing.move_lines:
12781278
=== modified file 'bin/addons/purchase_override/purchase.py'
--- bin/addons/purchase_override/purchase.py 2017-01-23 16:14:11 +0000
+++ bin/addons/purchase_override/purchase.py 2017-02-02 13:42:30 +0000
@@ -1264,8 +1264,8 @@
1264 if line.soq_updated:1264 if line.soq_updated:
1265 reset_soq.append(line.id)1265 reset_soq.append(line.id)
12661266
1267 # check if the current product is stopped or not :1267 # check if the current product is stopped or not : If the PO was created by Sync. engine, do not check
1268 if line.product_id and line.product_id.state and line.product_id.state.id == stopped_id:1268 if not po.push_fo and line.product_id and line.product_id.state and line.product_id.state.id == stopped_id:
1269 raise osv.except_osv(_('Error'), _('You can not validate a PO with stopped products (line %s).') % (line.line_number, ))1269 raise osv.except_osv(_('Error'), _('You can not validate a PO with stopped products (line %s).') % (line.line_number, ))
12701270
1271 message = _("Purchase order '%s' is validated.") % (po.name,)1271 message = _("Purchase order '%s' is validated.") % (po.name,)
@@ -1600,9 +1600,7 @@
16001600
1601 sol = sol_obj.browse(cr, uid, sol_ids[0], context=context)1601 sol = sol_obj.browse(cr, uid, sol_ids[0], context=context)
1602 so = sol.order_id1602 so = sol.order_id
1603 # do not update Internal Requests with internal requestor location1603 # US-1931: Remove code that do not update Internal Requests with internal requestor location
1604 if so and so.procurement_request and so.location_requestor_id.usage != 'customer':
1605 continue
16061604
1607 line_confirmed = False1605 line_confirmed = False
1608 # compute confirmed date for line1606 # compute confirmed date for line
16091607
=== modified file 'bin/addons/sourcing/sale_order_line.py'
--- bin/addons/sourcing/sale_order_line.py 2016-11-17 10:50:45 +0000
+++ bin/addons/sourcing/sale_order_line.py 2017-02-02 13:42:30 +0000
@@ -1027,7 +1027,7 @@
1027 _("You can't Source to an 'External' partner if you don't have product."),1027 _("You can't Source to an 'External' partner if you don't have product."),
1028 )1028 )
10291029
1030 if line.state not in ('draft', 'cancel') and line.product_id and line.supplier:1030 if line.state not in ('draft', 'cancel') and line.product_id and line.supplier and not context.get('bypass_product_constraints'):
1031 # Check product constraints (no external supply, no storage...)1031 # Check product constraints (no external supply, no storage...)
1032 check_fnct = product_obj._get_restriction_error1032 check_fnct = product_obj._get_restriction_error
1033 self._check_product_constraints(cr, uid, line.type, line.po_cft, line.product_id.id, line.supplier.id, check_fnct, context=context)1033 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: