Merge lp:~unifield-team/unifield-wm/us-698 into lp:unifield-wm

Proposed by jftempo
Status: Merged
Merged at revision: 2711
Proposed branch: lp:~unifield-team/unifield-wm/us-698
Merge into: lp:unifield-wm
Diff against target: 41 lines (+10/-2)
2 files modified
msf_doc_import/check_line.py (+8/-1)
msf_doc_import/wizard/wizard_import_picking_line.py (+2/-1)
To merge this branch: bzr merge lp:~unifield-team/unifield-wm/us-698
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+283076@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'msf_doc_import/check_line.py'
2--- msf_doc_import/check_line.py 2015-11-10 09:13:05 +0000
3+++ msf_doc_import/check_line.py 2016-01-19 10:40:32 +0000
4@@ -479,6 +479,7 @@
5 date_format = kwargs['date_format']
6 error_list = kwargs['to_write']['error_list']
7 warning_list = kwargs['to_write']['warning_list']
8+ picking_type = kwargs.get('picking_type', 'internal')
9 batch_name = None
10 expiry_date = None
11 batch_number = None
12@@ -504,8 +505,14 @@
13 error_list.append(_('The expiry date doesn\'t match with the expiry date of the batch. Batch not selected'))
14 else:
15 error_list.append(_('The expiry date doesn\'t match with the expiry date of the batch. Expiry date not selected'))
16+ elif bn_mgmt and picking_type == 'in':
17+ bn_ids = [bn_obj.create(cr, uid, {
18+ 'product_id': product_id,
19+ 'name': batch_name,
20+ 'life_date': expiry_date.strftime('%Y-%m-%d'),
21+ })]
22 else:
23- error_list.append(_('Batch not found.'))
24+ error_list.append(_('Batch not found'))
25 elif not bn_ids and product_id and expiry_date:
26 if bn_mgmt:
27 error_list.append(_('The Batch number is not set.'))
28
29=== modified file 'msf_doc_import/wizard/wizard_import_picking_line.py'
30--- msf_doc_import/wizard/wizard_import_picking_line.py 2015-11-23 16:52:52 +0000
31+++ msf_doc_import/wizard/wizard_import_picking_line.py 2016-01-19 10:40:32 +0000
32@@ -230,7 +230,8 @@
33 product_obj=product_obj,
34 bn_cell_nb=6, ed_cell_nb=7,
35 date_format=date_format,
36- product_id=to_write.get('product_id'),)
37+ product_id=to_write.get('product_id'),
38+ picking_type=picking.type)
39
40 # Create the internal batch number if not exists
41 if not product.batch_management and product.perishable and batch_value['expired_date'] and not batch_value['prodlot_id'] and not batch_value['error_list']:

Subscribers

People subscribed via source and target branches