Merge lp:~dorian-kemps/unifield-server/US-10491 into lp:unifield-server

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~dorian-kemps/unifield-server/US-10491
Merge into: lp:unifield-server
Diff against target: 51 lines (+15/-9)
1 file modified
bin/addons/sync_so/picking.py (+15/-9)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-10491
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+431031@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

6295. By Dorian

US-10491 [FIX] IN sync: Prevent messages created from manually processed or already cancelled INs to be NRs

6294. By jftempo

Release UF26.0

6293. By jftempo

Release UF26.0rc2

6292. By jftempo

US-10275 [IMP] Auto Import: new object Destinations / new OneDrive protocol

lp:~jfb-tempo-consulting/unifield-server/US-10275

6291. By jftempo

Release UF26.0rc1

6290. By jftempo

US-10168 [IMP] Supply Doc Import: headers and constants should be case insensitive

lp:~jfb-tempo-consulting/unifield-server/US-10168

6289. By jftempo

US-3694 [IMP] Product stock level: extend default locations to compute stock

lp:~jfb-tempo-consulting/unifield-server/US-3694

6288. By jftempo

US-7388 [IMP] IR follow-up report: UC: OUT Cancelled / INT ref / OUT converted to P/P/S

lp:~jfb-tempo-consulting/unifield-server/US-7388

6287. By jftempo

US-8966 [IMP] FO/IR/PO: multiple cancel at header available on draft / draft-p / validated and validated-p states

lp:~jfb-tempo-consulting/unifield-server/US-8966

6286. By jftempo

[FIX] Translations file

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/sync_so/picking.py'
2--- bin/addons/sync_so/picking.py 2022-03-31 09:29:13 +0000
3+++ bin/addons/sync_so/picking.py 2022-10-05 09:10:07 +0000
4@@ -530,7 +530,7 @@
5 in_name, po_name,
6 )
7 self._logger.info(message)
8- raise Exception(message)
9+ return message
10
11 move_id = False
12 if move_ids and len(move_ids) == 1: # if there is only one move, take it for process
13@@ -628,24 +628,30 @@
14 # still try to check whether this IN has already been manually processed
15 in_id = so_po_common.get_in_id_by_state(cr, uid, po_id, po_name, ['done', 'shipped'], context)
16 if not in_id:
17- message = "The IN linked to " + po_name + " is not found in the system!"
18- self._logger.info(message)
19- raise Exception(message)
20+ in_cancel_id = so_po_common.get_in_id_by_state(cr, uid, po_id, po_name, ['cancel'], context)
21+ if not in_cancel_id:
22+ message = "The IN linked to " + po_name + " is not found in the system!"
23+ self._logger.info(message)
24+ raise Exception(message)
25+ else:
26+ message = "The IN linked to " + po_name + " is already cancelled in the system!"
27+ self._logger.info(message)
28+ return message
29
30 #UFTP-332: Check if shipment/out is given
31 if shipment_ref:
32 same_in = self.search(cr, uid, [('id', '=', in_id), ('shipment_ref', '=', shipment_ref)], context=context)
33- processed_in = None
34 if not same_in:
35 # Check if the IN has not been manually processed (forced)
36- processed_in = self.search(cr, uid, [('id', '=', in_id), ('state', '=', 'done')], context=context)
37- if processed_in:
38+ if self.search(cr, uid, [('id', '=', in_id), ('state', '=', 'done')], context=context):
39 in_name = self.browse(cr, uid, in_id, context=context)['name']
40 message = "Unable to receive Shipment Details into an Incoming Shipment in this instance as IN %s (%s) already fully/partially cancelled/Closed" % (
41 in_name, po_name,
42 )
43- if not same_in and not processed_in:
44- message = "Sorry, this seems to be an extra ship. This feature is not available now!"
45+ self._logger.info(message)
46+ return message
47+ else:
48+ message = "Sorry, this seems to be an extra ship. This feature is not available now!"
49 else:
50 same_in = self.search(cr, uid, [('id', '=', in_id)], context=context)
51 message = "Sorry, this seems to be an extra ship. This feature is not available now!"

Subscribers

People subscribed via source and target branches