Merge lp:~unifield-team/unifield-wm/bklg-33-bis into lp:unifield-wm
- bklg-33-bis
- Merge into trunk
Proposed by
Quentin THEURET @Amaris
Status: | Merged |
---|---|
Merged at revision: | 2459 |
Proposed branch: | lp:~unifield-team/unifield-wm/bklg-33-bis |
Merge into: | lp:unifield-wm |
Diff against target: |
87 lines (+19/-19) 1 file modified
msf_supply_doc_export/msf_supply_doc_export.py (+19/-19) |
To merge this branch: | bzr merge lp:~unifield-team/unifield-wm/bklg-33-bis |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+254394@code.launchpad.net |
Commit message
Description of the change
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_supply_doc_export/msf_supply_doc_export.py' | |||
2 | --- msf_supply_doc_export/msf_supply_doc_export.py 2015-02-23 15:40:08 +0000 | |||
3 | +++ msf_supply_doc_export/msf_supply_doc_export.py 2015-03-27 13:36:23 +0000 | |||
4 | @@ -646,11 +646,11 @@ | |||
5 | 646 | # new_act = [] | 646 | # new_act = [] |
6 | 647 | # for v in values : | 647 | # for v in values : |
7 | 648 | # if v[2]['name'] == 'Purchase Order Excel Export' and context['_terp_view_name'] == 'Purchase Orders' \ | 648 | # if v[2]['name'] == 'Purchase Order Excel Export' and context['_terp_view_name'] == 'Purchase Orders' \ |
13 | 649 | # or v[2]['report_name'] == 'purchase.msf.order' and context['_terp_view_name'] == 'Purchase Orders' \ | 649 | # or v[2].get('report_name', False) == 'purchase.msf.order' and context['_terp_view_name'] == 'Purchase Orders' \ |
14 | 650 | # or v[2]['report_name'] == 'purchase.order.merged' and context['_terp_view_name'] == 'Purchase Orders' \ | 650 | # or v[2].get('report_name', False) == 'purchase.order.merged' and context['_terp_view_name'] == 'Purchase Orders' \ |
15 | 651 | # or v[2]['report_name'] == 'po.line.allocation.report' and context['_terp_view_name'] == 'Purchase Orders' \ | 651 | # or v[2].get('report_name', False) == 'po.line.allocation.report' and context['_terp_view_name'] == 'Purchase Orders' \ |
16 | 652 | # or v[2]['report_name'] == 'purchase.msf.quotation' and context['_terp_view_name'] == 'Requests for Quotation' \ | 652 | # or v[2].get('report_name', False) == 'purchase.msf.quotation' and context['_terp_view_name'] == 'Requests for Quotation' \ |
17 | 653 | # or v[2]['report_name'] == 'request.for.quotation_xls' and context['_terp_view_name'] == 'Requests for Quotation' : | 653 | # or v[2].get('report_name', False) == 'request.for.quotation_xls' and context['_terp_view_name'] == 'Requests for Quotation' : |
18 | 654 | # new_act.append(v) | 654 | # new_act.append(v) |
19 | 655 | # values = new_act | 655 | # values = new_act |
20 | 656 | 656 | ||
21 | @@ -661,12 +661,12 @@ | |||
22 | 661 | #field_orders_view = data_obj.get_object_reference(cr, uid, 'procurement_request', 'action_procurement_request')[1] | 661 | #field_orders_view = data_obj.get_object_reference(cr, uid, 'procurement_request', 'action_procurement_request')[1] |
23 | 662 | for v in values: | 662 | for v in values: |
24 | 663 | if context.get('procurement_request', False): | 663 | if context.get('procurement_request', False): |
26 | 664 | if v[2]['report_name'] in ('internal.request_xls', 'procurement.request.report') \ | 664 | if v[2].get('report_name', False) in ('internal.request_xls', 'procurement.request.report') \ |
27 | 665 | or v[1] == 'action_open_wizard_import': # this is an internal request, we only display import lines for client_action_multi --- using the name of screen, and the name of the action is definitely the wrong way to go... | 665 | or v[1] == 'action_open_wizard_import': # this is an internal request, we only display import lines for client_action_multi --- using the name of screen, and the name of the action is definitely the wrong way to go... |
28 | 666 | new_act.append(v) | 666 | new_act.append(v) |
29 | 667 | else: | 667 | else: |
32 | 668 | if v[2]['report_name'] == 'msf.sale.order' \ | 668 | if v[2].get('report_name', False) == 'msf.sale.order' \ |
33 | 669 | or v[2]['report_name'] == 'sale.order_xls' \ | 669 | or [2].get('report_name', False) == 'sale.order_xls' \ |
34 | 670 | or v[1] == 'Order Follow Up': # this is a sale order, we only display Order Follow Up for client_action_multi --- using the name of screen, and the name of the action is definitely the wrong way to go... | 670 | or v[1] == 'Order Follow Up': # this is a sale order, we only display Order Follow Up for client_action_multi --- using the name of screen, and the name of the action is definitely the wrong way to go... |
35 | 671 | new_act.append(v) | 671 | new_act.append(v) |
36 | 672 | values = new_act | 672 | values = new_act |
37 | @@ -681,11 +681,11 @@ | |||
38 | 681 | Delivery_Order = trans_obj.tr_view(cr, 'Delivery Order', context) | 681 | Delivery_Order = trans_obj.tr_view(cr, 'Delivery Order', context) |
39 | 682 | Internal_Moves = trans_obj.tr_view(cr, 'Internal Moves', context) | 682 | Internal_Moves = trans_obj.tr_view(cr, 'Internal Moves', context) |
40 | 683 | for v in values: | 683 | for v in values: |
46 | 684 | if v[2]['report_name'] == 'picking.ticket' and (context.get('_terp_view_name') in (Picking_Tickets, Picking_Ticket) or context.get('picking_type') == 'picking_ticket') and context.get('picking_screen', False)\ | 684 | if v[2].get('report_name', False) == 'picking.ticket' and (context.get('_terp_view_name') in (Picking_Tickets, Picking_Ticket) or context.get('picking_type') == 'picking_ticket') and context.get('picking_screen', False)\ |
47 | 685 | or v[2]['report_name'] == 'pre.packing.list' and context.get('_terp_view_name') in (Pre_Packing_Lists, Pre_Packing_List) and context.get('ppl_screen', False)\ | 685 | or v[2].get('report_name', False) == 'pre.packing.list' and context.get('_terp_view_name') in (Pre_Packing_Lists, Pre_Packing_List) and context.get('ppl_screen', False)\ |
48 | 686 | or v[2]['report_name'] == 'labels' and (context.get('_terp_view_name') in [Picking_Ticket, Picking_Tickets, Pre_Packing_List, Pre_Packing_Lists, Delivery_Orders, Delivery_Order] or context.get('picking_type', False) in ('delivery_order', 'picking_ticket'))\ | 686 | or v[2].get('report_name', False) == 'labels' and (context.get('_terp_view_name') in [Picking_Ticket, Picking_Tickets, Pre_Packing_List, Pre_Packing_Lists, Delivery_Orders, Delivery_Order] or context.get('picking_type', False) in ('delivery_order', 'picking_ticket'))\ |
49 | 687 | or v[2]['report_name'] in ('internal.move.xls', 'internal.move') and (('_terp_view_name' in context and context['_terp_view_name'] in [Internal_Moves]) or context.get('picking_type') == 'internal_move') \ | 687 | or v[2].get('report_name', False) in ('internal.move.xls', 'internal.move') and (('_terp_view_name' in context and context['_terp_view_name'] in [Internal_Moves]) or context.get('picking_type') == 'internal_move') \ |
50 | 688 | or v[2]['report_name'] == 'delivery.order' and (context.get('_terp_view_name') in [Delivery_Orders, Delivery_Order] or context.get('picking_type', False) == 'delivery_order'): | 688 | or v[2].get('report_name', False) == 'delivery.order' and (context.get('_terp_view_name') in [Delivery_Orders, Delivery_Order] or context.get('picking_type', False) == 'delivery_order'): |
51 | 689 | new_act.append(v) | 689 | new_act.append(v) |
52 | 690 | values = new_act | 690 | values = new_act |
53 | 691 | elif context.get('_terp_view_name') and key == 'action' and key2 == 'client_print_multi' and 'shipment' in [x[0] for x in models]: | 691 | elif context.get('_terp_view_name') and key == 'action' and key2 == 'client_print_multi' and 'shipment' in [x[0] for x in models]: |
54 | @@ -697,7 +697,7 @@ | |||
55 | 697 | Shipments = trans_obj.tr_view(cr, 'Shipments', context) | 697 | Shipments = trans_obj.tr_view(cr, 'Shipments', context) |
56 | 698 | Shipment = trans_obj.tr_view(cr, 'Shipment', context) | 698 | Shipment = trans_obj.tr_view(cr, 'Shipment', context) |
57 | 699 | for v in values: | 699 | for v in values: |
59 | 700 | if v[2]['report_name'] == 'packing.list' and context['_terp_view_name'] in (Packing_Lists, Packing_List) : | 700 | if v[2].get('report_name', False) == 'packing.list' and context['_terp_view_name'] in (Packing_Lists, Packing_List) : |
60 | 701 | new_act.append(v) | 701 | new_act.append(v) |
61 | 702 | elif context['_terp_view_name'] in (Shipment_Lists, Shipment_List, Shipments, Shipment): | 702 | elif context['_terp_view_name'] in (Shipment_Lists, Shipment_List, Shipments, Shipment): |
62 | 703 | new_act.append(v) | 703 | new_act.append(v) |
63 | @@ -706,19 +706,19 @@ | |||
64 | 706 | new_act = [] | 706 | new_act = [] |
65 | 707 | for v in values: | 707 | for v in values: |
66 | 708 | if v[2].get('report_name', False) : | 708 | if v[2].get('report_name', False) : |
68 | 709 | if v[2]['report_name'] in ('picking.ticket', 'labels'): | 709 | if v[2].get('report_name', False) in ('picking.ticket', 'labels'): |
69 | 710 | new_act.append(v) | 710 | new_act.append(v) |
70 | 711 | values = new_act | 711 | values = new_act |
71 | 712 | 712 | ||
72 | 713 | elif key == 'action' and key2 == 'client_print_multi' and 'composition.kit' in [x[0] for x in models]: | 713 | elif key == 'action' and key2 == 'client_print_multi' and 'composition.kit' in [x[0] for x in models]: |
73 | 714 | new_act = [] | 714 | new_act = [] |
74 | 715 | for v in values: | 715 | for v in values: |
77 | 716 | if context.get('composition_type')=='theoretical' and v[2]['report_name'] in ('composition.kit.xls', 'kit.report'): | 716 | if context.get('composition_type')=='theoretical' and v[2].get('report_name', False) in ('composition.kit.xls', 'kit.report'): |
78 | 717 | if v[2]['report_name'] == 'kit.report': | 717 | if v[2].get('report_name', False) == 'kit.report': |
79 | 718 | v[2]['name'] = _('Theoretical Kit') | 718 | v[2]['name'] = _('Theoretical Kit') |
80 | 719 | new_act.append(v) | 719 | new_act.append(v) |
83 | 720 | elif context.get('composition_type')=='real' and v[2]['report_name'] in ('real.composition.kit.xls', 'kit.report'): | 720 | elif context.get('composition_type')=='real' and v[2].get('report_name', False) in ('real.composition.kit.xls', 'kit.report'): |
84 | 721 | if v[2]['report_name'] == 'kit.report': | 721 | if v[2].get('report_name', False) == 'kit.report': |
85 | 722 | v[2]['name'] = _('Kit Composition') | 722 | v[2]['name'] = _('Kit Composition') |
86 | 723 | new_act.append(v) | 723 | new_act.append(v) |
87 | 724 | values = new_act | 724 | values = new_act |