Merge lp:~unifield-team/unifield-wm/sync-us-208 into lp:unifield-wm/sync
- sync-us-208
- Merge into sync_module_prod
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 576 |
Proposed branch: | lp:~unifield-team/unifield-wm/sync-us-208 |
Merge into: | lp:unifield-wm/sync |
Diff against target: |
185 lines (+76/-10) 6 files modified
msf_sync_data_server/data/sync_server.message_rule.csv (+3/-3) msf_sync_data_server/data/sync_server.sync_rule.csv (+2/-2) sync_remote_warehouse/wizard/setup_remote_warehouse.py (+2/-1) sync_so/so_po_common.py (+6/-2) sync_so/so_po_rw.py (+9/-2) sync_so/specific_xml_id.py (+54/-0) |
To merge this branch: | bzr merge lp:~unifield-team/unifield-wm/sync-us-208 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Sync Reviewer | Pending | ||
Review via email: mp+260567@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_sync_data_server/data/sync_server.message_rule.csv' | |||
2 | --- msf_sync_data_server/data/sync_server.message_rule.csv 2015-04-27 11:39:49 +0000 | |||
3 | +++ msf_sync_data_server/data/sync_server.message_rule.csv 2015-05-29 11:56:50 +0000 | |||
4 | @@ -20,9 +20,9 @@ | |||
5 | 20 | create_batch_object,TRUE,TRUE,"['name', 'xmlid_name', 'prefix', 'product_id/id', 'partner_id/id', 'date', 'ref','life_date','sequence_id','type']","[('name', '=', False)]",partner_id,MISSION,stock.picking.create_batch_number,stock.production.lot,Create Batch Object,1001,Valid | 20 | create_batch_object,TRUE,TRUE,"['name', 'xmlid_name', 'prefix', 'product_id/id', 'partner_id/id', 'date', 'ref','life_date','sequence_id','type']","[('name', '=', False)]",partner_id,MISSION,stock.picking.create_batch_number,stock.production.lot,Create Batch Object,1001,Valid |
6 | 21 | create_asset_object,TRUE,TRUE,"['name', 'xmlid_name', 'arrival_date', 'asset_type_id/id', 'partner_id/id', 'brand', 'comment', 'description', 'hq_ref', 'international_po', 'invo_certif_depreciation', 'invo_currency/id', 'invo_date', 'invo_donator_code', 'invo_num', 'invo_supplier', 'invo_value', 'local_ref', 'model', 'orig_mission_code', 'product_id/id', 'project_po', 'receipt_place', 'serial_nb', 'type', 'year']","[('name', '=', False)]",partner_id,MISSION,stock.picking.create_asset,product.asset,Create Asset Object,1002,Valid | 21 | create_asset_object,TRUE,TRUE,"['name', 'xmlid_name', 'arrival_date', 'asset_type_id/id', 'partner_id/id', 'brand', 'comment', 'description', 'hq_ref', 'international_po', 'invo_certif_depreciation', 'invo_currency/id', 'invo_date', 'invo_donator_code', 'invo_num', 'invo_supplier', 'invo_value', 'local_ref', 'model', 'orig_mission_code', 'product_id/id', 'project_po', 'receipt_place', 'serial_nb', 'type', 'year']","[('name', '=', False)]",partner_id,MISSION,stock.picking.create_asset,product.asset,Create Asset Object,1002,Valid |
7 | 22 | reset_ref_by_recovery_mode,TRUE,TRUE,['name'],"[('name', '=', False)]",partner_id,MISSION,sale.order.reset_ref_by_recovery_mode,sale.order,Reset Due to Recovery,1003,Valid | 22 | reset_ref_by_recovery_mode,TRUE,TRUE,['name'],"[('name', '=', False)]",partner_id,MISSION,sale.order.reset_ref_by_recovery_mode,sale.order,Reset Due to Recovery,1003,Valid |
11 | 23 | USB_replicate_po,TRUE,TRUE,"['name', 'analytic_distribution_id/id', 'partner_id/id','delivery_requested_date','details','notes', 'origin', 'categ', 'order_type', 'priority', 'loan_duration', 'is_a_counterpart', 'cross_docking_ok', 'order_line/product_id/id', 'order_line/product_id/name','order_line/id', 'order_line/name', 'order_line/product_qty', 'order_line/product_uom', 'order_line/price_unit', 'order_line/analytic_distribution_id/id','order_line/comment','order_line/have_analytic_distribution_from_header','order_line/line_number', 'order_line/nomen_manda_0/id','order_line/nomen_manda_1/id','order_line/nomen_manda_2/id','order_line/nomen_manda_3/id', 'order_line/sync_order_line_db_id', 'order_line/nomenclature_description','order_line/notes','order_line/default_name','order_line/default_code','order_line/is_line_split','order_line/date_planned','order_line/procurement_id/id']","[('state','in',['approved', 'done'])]",partner_id,USB,purchase.order.usb_replicate_po,purchase.order,USB_replicate_po,2000,Valid | 23 | USB_replicate_po,TRUE,TRUE,"['name', 'analytic_distribution_id/id', 'partner_id/id','pricelist_id/id','delivery_requested_date','details','notes', 'origin', 'categ', 'order_type', 'priority', 'loan_duration', 'is_a_counterpart', 'cross_docking_ok', 'order_line/product_id/id', 'order_line/product_id/name','order_line/id', 'order_line/name', 'order_line/product_qty', 'order_line/product_uom', 'order_line/price_unit', 'order_line/analytic_distribution_id/id','order_line/comment','order_line/have_analytic_distribution_from_header','order_line/line_number', 'order_line/nomen_manda_0/id','order_line/nomen_manda_1/id','order_line/nomen_manda_2/id','order_line/nomen_manda_3/id', 'order_line/sync_order_line_db_id', 'order_line/nomenclature_description','order_line/notes','order_line/default_name','order_line/default_code','order_line/is_line_split','order_line/date_planned','order_line/procurement_id/id']","[('state','in',['approved', 'done'])]",partner_id,USB,purchase.order.usb_replicate_po,purchase.order,USB_replicate_po,2000,Valid |
12 | 24 | USB_replicate_fo,TRUE,TRUE,"['name', 'location_requestor_id/id', 'analytic_distribution_id/id', 'partner_id/id','delivery_requested_date','details','notes', 'origin', 'categ', 'order_type', 'priority', 'loan_duration', 'is_a_counterpart', 'order_line/product_id/id', 'order_line/product_id/name','order_line/id', 'order_line/name', 'order_line/product_uom_qty', 'order_line/product_uom', 'order_line/price_unit', 'order_line/analytic_distribution_id/id','order_line/comment','order_line/have_analytic_distribution_from_header','order_line/line_number', 'order_line/nomen_manda_0/id','order_line/nomen_manda_1/id','order_line/nomen_manda_2/id','order_line/nomen_manda_3/id', 'order_line/sync_order_line_db_id', 'order_line/nomenclature_description','order_line/notes','order_line/default_name','order_line/default_code','order_line/is_line_split','order_line/date_planned','order_line/procurement_id/id']","[('state','in',['manual','done','progress'])]",partner_id,USB,sale.order.usb_replicate_fo,sale.order,USB_replicate_fo,2001,Valid | 24 | USB_replicate_fo,TRUE,TRUE,"['name', 'location_requestor_id/id', 'analytic_distribution_id/id', 'partner_id/id','pricelist_id/id','delivery_requested_date','details','notes', 'origin', 'categ', 'order_type', 'priority', 'loan_duration', 'is_a_counterpart', 'order_line/product_id/id', 'order_line/product_id/name','order_line/id', 'order_line/name', 'order_line/product_uom_qty', 'order_line/product_uom', 'order_line/price_unit', 'order_line/analytic_distribution_id/id','order_line/comment','order_line/have_analytic_distribution_from_header','order_line/line_number', 'order_line/nomen_manda_0/id','order_line/nomen_manda_1/id','order_line/nomen_manda_2/id','order_line/nomen_manda_3/id', 'order_line/sync_order_line_db_id', 'order_line/nomenclature_description','order_line/notes','order_line/default_name','order_line/default_code','order_line/is_line_split','order_line/date_planned','order_line/procurement_id/id']","[('state','in',['manual','done','progress'])]",partner_id,USB,sale.order.usb_replicate_fo,sale.order,USB_replicate_fo,2001,Valid |
13 | 25 | USB_replicate_ir,TRUE,TRUE,"['name', 'location_requestor_id/id', 'analytic_distribution_id/id', 'partner_id/id','delivery_requested_date','details','notes', 'origin', 'categ', 'order_type', 'priority', 'loan_duration', 'is_a_counterpart', 'order_line/product_id/id', 'order_line/product_id/name','order_line/id', 'order_line/name', 'order_line/product_uom_qty', 'order_line/product_uom', 'order_line/price_unit','order_line/cost_price', 'order_line/analytic_distribution_id/id','order_line/comment','order_line/have_analytic_distribution_from_header','order_line/line_number', 'order_line/nomen_manda_0/id','order_line/nomen_manda_1/id','order_line/nomen_manda_2/id','order_line/nomen_manda_3/id', 'order_line/sync_order_line_db_id', 'order_line/nomenclature_description','order_line/notes','order_line/default_name','order_line/default_code','order_line/is_line_split','order_line/date_planned','order_line/procurement_id/id']","[('procurement_request', '=', True), ('state', 'in', ['progress','done'])]",partner_id,USB,sale.order.usb_replicate_fo,sale.order,USB_replicate_ir,2003,Valid | 25 | USB_replicate_ir,TRUE,TRUE,"['name', 'location_requestor_id/id', 'analytic_distribution_id/id', 'partner_id/id','pricelist_id/id','delivery_requested_date','details','notes', 'origin', 'categ', 'order_type', 'priority', 'loan_duration', 'is_a_counterpart', 'order_line/product_id/id', 'order_line/product_id/name','order_line/id', 'order_line/name', 'order_line/product_uom_qty', 'order_line/product_uom', 'order_line/price_unit','order_line/cost_price', 'order_line/analytic_distribution_id/id','order_line/comment','order_line/have_analytic_distribution_from_header','order_line/line_number', 'order_line/nomen_manda_0/id','order_line/nomen_manda_1/id','order_line/nomen_manda_2/id','order_line/nomen_manda_3/id', 'order_line/sync_order_line_db_id', 'order_line/nomenclature_description','order_line/notes','order_line/default_name','order_line/default_code','order_line/is_line_split','order_line/date_planned','order_line/procurement_id/id']","[('procurement_request', '=', True), ('state', 'in', ['progress','done'])]",partner_id,USB,sale.order.usb_replicate_fo,sale.order,USB_replicate_ir,2003,Valid |
14 | 26 | USB_replicate_in,TRUE,TRUE,"['name','subtype','rw_force_seq','from_wkf','state','stock_journal_id/id','origin','purchase_id/id', 'sale_id/id', 'shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_requestor_rw/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['assigned']),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_replicate_in,stock.picking,USB_replicate_in,2010,Valid | 26 | USB_replicate_in,TRUE,TRUE,"['name','subtype','rw_force_seq','from_wkf','state','stock_journal_id/id','origin','purchase_id/id', 'sale_id/id', 'shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_requestor_rw/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['assigned']),('already_replicated', '=', False),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_replicate_in,stock.picking,USB_replicate_in,2010,Valid |
15 | 27 | USB_update_in_shipped_available,TRUE,TRUE,"['name','from_wkf','subtype','rw_force_seq','state','stock_journal_id/id','origin','purchase_id/id', 'sale_id/id', 'shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_requestor_rw/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['shipped']),('partner_id', '!=', False),('already_replicated', '=', False)]",partner_id,USB,stock.picking.usb_update_in_shipped_available,stock.picking,USB_update_in_shipped_available,2011,Valid | 27 | USB_update_in_shipped_available,TRUE,TRUE,"['name','from_wkf','subtype','rw_force_seq','state','stock_journal_id/id','origin','purchase_id/id', 'sale_id/id', 'shipment_id/name','shipment_id/num_of_packs','previous_step_id/name','location_id/id','backorder_ids/id', 'backorder_ids/rw_sdref_counterpart', 'backorder_id/id','warehouse_id/id','order_category','overall_qty','change_reason','cross_docking_ok','location_dest_id/id','address_id', 'partner_type_stock_picking', 'delivered','reason_type_id/id','min_date', 'note', 'partner_id', 'move_type', 'type', 'dpo_out', 'flow_type', 'transport_order_id/id', 'direct_incoming','shipment_id/name', 'move_lines/processed_stock_move', 'move_lines/id', 'move_lines/state','move_lines/original_qty_partial', 'move_lines/line_number', 'move_lines/name', 'move_lines/change_reason', 'move_lines/reason_type_id/id','move_lines/product_id/id', 'move_lines/product_id/name', 'move_lines/product_qty', 'move_lines/product_uos_qty', 'move_lines/prodlot_id/id', 'move_lines/expired_date', 'move_lines/asset_id/id','move_lines/product_uom/id', 'move_lines/product_uom/name', 'move_lines/date', 'move_lines/date_expected', 'move_lines/note', 'move_lines/location_dest_id/id','move_lines/location_requestor_rw/id','move_lines/location_id/id','move_lines/from_pack','move_lines/to_pack','move_lines/width','move_lines/height','move_lines/weight','move_lines/length','move_lines/pack_type','move_lines/purchase_line_id/id','move_lines/sale_line_id/id','move_lines/price_unit']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['shipped']),('partner_id', '!=', False),('already_replicated', '=', False)]",partner_id,USB,stock.picking.usb_update_in_shipped_available,stock.picking,USB_update_in_shipped_available,2011,Valid |
16 | 28 | USB_cancel_in,TRUE,TRUE,"['name','subtype','origin']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['cancel']),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_cancel_in,stock.picking,USB_cancel_in,2012,Valid | 28 | USB_cancel_in,TRUE,TRUE,"['name','subtype','origin']","[('type', '=', 'in'),('subtype', '=', 'standard'),('state', 'in', ['cancel']),('partner_id', '!=', False)]",partner_id,USB,stock.picking.usb_cancel_in,stock.picking,USB_cancel_in,2012,Valid |
17 | 29 | 29 | ||
18 | === modified file 'msf_sync_data_server/data/sync_server.sync_rule.csv' | |||
19 | --- msf_sync_data_server/data/sync_server.sync_rule.csv 2015-05-29 11:54:39 +0000 | |||
20 | +++ msf_sync_data_server/data/sync_server.sync_rule.csv 2015-05-29 11:56:50 +0000 | |||
21 | @@ -124,8 +124,8 @@ | |||
22 | 124 | msf_sync_data_server.record_rules,TRUE,TRUE,TRUE,bidirectional,Down,[],"['domain_force', 'global', 'groups/id', 'model_id/id', 'name', 'perm_create', 'perm_read', 'perm_unlink', 'perm_write']",OC,ir.rule,,Record Rules,Valid,,702 | 124 | msf_sync_data_server.record_rules,TRUE,TRUE,TRUE,bidirectional,Down,[],"['domain_force', 'global', 'groups/id', 'model_id/id', 'name', 'perm_create', 'perm_read', 'perm_unlink', 'perm_write']",OC,ir.rule,,Record Rules,Valid,,702 |
23 | 125 | msf_sync_data_server.access_rights_header,TRUE,TRUE,TRUE,bidirectional,Down,[],"['active', 'comment', 'domain_id/id', 'domain_text', 'family_model_ids/id', 'group_ids/id', 'instance_level', 'model_id/id', 'model_name', 'name', 'status']",OC,msf_field_access_rights.field_access_rule,,Field Access Rules,Valid,,703 | 125 | msf_sync_data_server.access_rights_header,TRUE,TRUE,TRUE,bidirectional,Down,[],"['active', 'comment', 'domain_id/id', 'domain_text', 'family_model_ids/id', 'group_ids/id', 'instance_level', 'model_id/id', 'model_name', 'name', 'status']",OC,msf_field_access_rights.field_access_rule,,Field Access Rules,Valid,,703 |
24 | 126 | msf_sync_data_server.access_rights_lines,TRUE,TRUE,TRUE,bidirectional,Down,[],"['field/id', 'field_access_rule/id', 'field_access_rule_model_id', 'field_name', 'value_not_synchronized_on_create', 'value_not_synchronized_on_write', 'write_access']",OC,msf_field_access_rights.field_access_rule_line,,Field Access Rule Lines,Valid,,704 | 126 | msf_sync_data_server.access_rights_lines,TRUE,TRUE,TRUE,bidirectional,Down,[],"['field/id', 'field_access_rule/id', 'field_access_rule_model_id', 'field_name', 'value_not_synchronized_on_create', 'value_not_synchronized_on_write', 'write_access']",OC,msf_field_access_rights.field_access_rule_line,,Field Access Rule Lines,Valid,,704 |
27 | 127 | msf_sync_data_server.button_access_rules,TRUE,TRUE,FALSE,bidirectional,Down,[],"['active', 'comment', 'group_ids/id', 'group_names', 'label', 'model_id/id', 'name', 'type', 'view_id/id']",OC,msf_button_access_rights.button_access_rule,,Button Access Rules,Valid,,705 | 127 | msf_sync_data_server.button_access_rules,TRUE,TRUE,FALSE,bidirectional,Down,"[('is_remote_wh', '=', False)]","['active', 'comment', 'group_ids/id', 'group_names', 'label', 'model_id/id', 'name', 'type', 'view_id/id']",OC,msf_button_access_rights.button_access_rule,,Button Access Rules,Valid,,705 |
28 | 128 | msf_sync_data_server.window_actions,TRUE,TRUE,FALSE,bidirectional,Down,"[('res_model','!=','audittrail.log.line')]",['groups_id/id'],OC,ir.actions.act_window,,Window Action groups,Valid,,706 | 128 | msf_sync_data_server.window_actions,TRUE,TRUE,FALSE,bidirectional,Down,"[('res_model','!=','audittrail.log.line'), ('is_remote_wh', '=', False)]",['groups_id/id'],OC,ir.actions.act_window,,Window Action groups,Valid,,706 |
29 | 129 | msf_sync_data.sync_monitor,TRUE,TRUE,FALSE,bidirectional,Bidirectional-Private,"[('status', '=', 'ok')]","['instance_id/id', 'nb_msg_pull', 'nb_data_pull', 'nb_msg_push', 'nb_data_push', 'nb_msg_not_run', 'nb_data_not_run', 'start', 'end', 'destination_instance_id/id']",OC,sync.monitor,destination_instance_id,Sync Monitor,Valid,,720 | 129 | msf_sync_data.sync_monitor,TRUE,TRUE,FALSE,bidirectional,Bidirectional-Private,"[('status', '=', 'ok')]","['instance_id/id', 'nb_msg_pull', 'nb_data_pull', 'nb_msg_push', 'nb_data_push', 'nb_msg_not_run', 'nb_data_not_run', 'start', 'end', 'destination_instance_id/id']",OC,sync.monitor,destination_instance_id,Sync Monitor,Valid,,720 |
30 | 130 | msf_usb_sync_data_server.cp_res_groups,TRUE,TRUE,TRUE,cp_to_rw,Bidirectional,[],"['comment', 'from_file_import_res_groups', 'name', 'visible_res_groups', 'is_an_admin_profile']",USB,res.groups,,[CONFIG] Group,Valid,,1000 | 130 | msf_usb_sync_data_server.cp_res_groups,TRUE,TRUE,TRUE,cp_to_rw,Bidirectional,[],"['comment', 'from_file_import_res_groups', 'name', 'visible_res_groups', 'is_an_admin_profile']",USB,res.groups,,[CONFIG] Group,Valid,,1000 |
31 | 131 | msf_usb_sync_data_server.cp_res_users,TRUE,TRUE,FALSE,cp_to_rw,Bidirectional,"[('active', '=', True)]","['email', 'login', 'name', 'user_email']",USB,res.users,,[CONFIG] Res Users,Valid,,1001 | 131 | msf_usb_sync_data_server.cp_res_users,TRUE,TRUE,FALSE,cp_to_rw,Bidirectional,"[('active', '=', True)]","['email', 'login', 'name', 'user_email']",USB,res.users,,[CONFIG] Res Users,Valid,,1001 |
32 | 132 | 132 | ||
33 | === modified file 'sync_remote_warehouse/wizard/setup_remote_warehouse.py' | |||
34 | --- sync_remote_warehouse/wizard/setup_remote_warehouse.py 2015-03-03 14:55:29 +0000 | |||
35 | +++ sync_remote_warehouse/wizard/setup_remote_warehouse.py 2015-05-29 11:56:50 +0000 | |||
36 | @@ -204,7 +204,8 @@ | |||
37 | 204 | 204 | ||
38 | 205 | def _revert_central_platform(self, cr, uid, entity_id, context=None): | 205 | def _revert_central_platform(self, cr, uid, entity_id, context=None): |
39 | 206 | self._set_entity_type(cr, uid, entity_id, "", context=context) | 206 | self._set_entity_type(cr, uid, entity_id, "", context=context) |
41 | 207 | self._set_sequence_suffix(cr, uid, suffix="-RW", context=context) | 207 | #US-208: Do not change the suffixes of the documents |
42 | 208 | self._set_sequence_suffix(cr, uid, suffix="", context=context) | ||
43 | 208 | 209 | ||
44 | 209 | def _get_db_dump(self, database_name): | 210 | def _get_db_dump(self, database_name): |
45 | 210 | """ Makes a dump of database_name and returns the base64 SQL """ | 211 | """ Makes a dump of database_name and returns the base64 SQL """ |
46 | 211 | 212 | ||
47 | === modified file 'sync_so/so_po_common.py' | |||
48 | --- sync_so/so_po_common.py 2015-04-27 07:55:06 +0000 | |||
49 | +++ sync_so/so_po_common.py 2015-05-29 11:56:50 +0000 | |||
50 | @@ -231,8 +231,9 @@ | |||
51 | 231 | 231 | ||
52 | 232 | partner_id = self.get_partner_id(cr, uid, source, context) | 232 | partner_id = self.get_partner_id(cr, uid, source, context) |
53 | 233 | address_id = self.get_partner_address_id(cr, uid, partner_id, context) | 233 | address_id = self.get_partner_address_id(cr, uid, partner_id, context) |
54 | 234 | price_list = self.get_price_list_id(cr, uid, partner_id, context) | ||
55 | 235 | location_id = self.get_location(cr, uid, partner_id, context) | 234 | location_id = self.get_location(cr, uid, partner_id, context) |
56 | 235 | # just roll back what has been modified --- NO MODIF HERE! | ||
57 | 236 | price_list = self.get_price_list_id(cr, uid, partner_id, context) | ||
58 | 236 | 237 | ||
59 | 237 | header_result['partner_ref'] = source + "." + header_info.get('name') | 238 | header_result['partner_ref'] = source + "." + header_info.get('name') |
60 | 238 | header_result['partner_id'] = partner_id | 239 | header_result['partner_id'] = partner_id |
61 | @@ -307,7 +308,10 @@ | |||
62 | 307 | 308 | ||
63 | 308 | partner_id = self.get_partner_id(cr, uid, source, context) | 309 | partner_id = self.get_partner_id(cr, uid, source, context) |
64 | 309 | address_id = self.get_partner_address_id(cr, uid, partner_id, context) | 310 | address_id = self.get_partner_address_id(cr, uid, partner_id, context) |
66 | 310 | price_list = self.get_price_list_id(cr, uid, partner_id, context) | 311 | if 'pricelist_id' in header_info: |
67 | 312 | price_list = header_info.get('pricelist_id') | ||
68 | 313 | else: | ||
69 | 314 | price_list = self.get_price_list_id(cr, uid, partner_id, context) | ||
70 | 311 | 315 | ||
71 | 312 | header_result['client_order_ref'] = source + "." + header_info.get('name') | 316 | header_result['client_order_ref'] = source + "." + header_info.get('name') |
72 | 313 | header_result['partner_id'] = partner_id | 317 | header_result['partner_id'] = partner_id |
73 | 314 | 318 | ||
74 | === modified file 'sync_so/so_po_rw.py' | |||
75 | --- sync_so/so_po_rw.py 2014-11-30 20:32:39 +0000 | |||
76 | +++ sync_so/so_po_rw.py 2015-05-29 11:56:50 +0000 | |||
77 | @@ -126,10 +126,18 @@ | |||
78 | 126 | if rec_id: | 126 | if rec_id: |
79 | 127 | header_result['partner_id'] = rec_id | 127 | header_result['partner_id'] = rec_id |
80 | 128 | partner = self.pool.get('res.partner').browse(cr, uid, rec_id, context=context) | 128 | partner = self.pool.get('res.partner').browse(cr, uid, rec_id, context=context) |
82 | 129 | if partner.property_product_pricelist_purchase: | 129 | |
83 | 130 | # US-208: Retrieve the pricelist: if it's provided from sync, then use it | ||
84 | 131 | if 'pricelist_id' in so_dict and so_dict.get('pricelist_id', True): | ||
85 | 132 | pl_xmlid = so_dict.get('pricelist_id')['id'] | ||
86 | 133 | if pl_xmlid: | ||
87 | 134 | header_result['pricelist_id'] = self.pool.get('product.pricelist').find_sd_ref(cr, uid, xmlid_to_sdref(pl_xmlid), context=context) | ||
88 | 135 | elif partner.property_product_pricelist_purchase: | ||
89 | 130 | header_result['pricelist_id'] = partner.property_product_pricelist_purchase.id | 136 | header_result['pricelist_id'] = partner.property_product_pricelist_purchase.id |
90 | 137 | # In any case, if the code does not enter in the block above, the default pricelist_id is still used | ||
91 | 131 | 138 | ||
92 | 132 | header_result['cross_docking_ok'] = so_dict.get('cross_docking_ok', False) | 139 | header_result['cross_docking_ok'] = so_dict.get('cross_docking_ok', False) |
93 | 140 | |||
94 | 133 | # check whether this FO has already been sent before! if it's the case, then just update the existing PO, and not creating a new one | 141 | # check whether this FO has already been sent before! if it's the case, then just update the existing PO, and not creating a new one |
95 | 134 | partner_ref = source + "." + sync_values.name | 142 | partner_ref = source + "." + sync_values.name |
96 | 135 | existing_ids = self.search(cr, uid, [('name', '=', po_name), ('partner_ref', '=', partner_ref), ('state', '=', 'rw')], context=context) | 143 | existing_ids = self.search(cr, uid, [('name', '=', po_name), ('partner_ref', '=', partner_ref), ('state', '=', 'rw')], context=context) |
97 | @@ -155,7 +163,6 @@ | |||
98 | 155 | line.update({'order_id': po_id}) | 163 | line.update({'order_id': po_id}) |
99 | 156 | so_po_common.create_rw_xml_for_line(cr, uid, line_obj,line, context =context) | 164 | so_po_common.create_rw_xml_for_line(cr, uid, line_obj,line, context =context) |
100 | 157 | 165 | ||
101 | 158 | name = self.browse(cr, uid, po_id, context=context).name | ||
102 | 159 | message = "The PO " + po_name + " has been well replicated at " + cr.dbname | 166 | message = "The PO " + po_name + " has been well replicated at " + cr.dbname |
103 | 160 | self._logger.info(message) | 167 | self._logger.info(message) |
104 | 161 | return message | 168 | return message |
105 | 162 | 169 | ||
106 | === modified file 'sync_so/specific_xml_id.py' | |||
107 | --- sync_so/specific_xml_id.py 2015-05-28 11:41:07 +0000 | |||
108 | +++ sync_so/specific_xml_id.py 2015-05-29 11:56:50 +0000 | |||
109 | @@ -40,6 +40,7 @@ | |||
110 | 40 | 40 | ||
111 | 41 | account_journal() | 41 | account_journal() |
112 | 42 | 42 | ||
113 | 43 | |||
114 | 43 | class ir_actions_act_window(osv.osv): | 44 | class ir_actions_act_window(osv.osv): |
115 | 44 | _inherit = 'ir.actions.act_window' | 45 | _inherit = 'ir.actions.act_window' |
116 | 45 | 46 | ||
117 | @@ -51,8 +52,38 @@ | |||
118 | 51 | origin_xmlid = model_data_obj.read(cr, uid, sdref_ids[0], ['module', 'name']) | 52 | origin_xmlid = model_data_obj.read(cr, uid, sdref_ids[0], ['module', 'name']) |
119 | 52 | return get_valid_xml_name(origin_xmlid['module'], origin_xmlid['name']) | 53 | return get_valid_xml_name(origin_xmlid['module'], origin_xmlid['name']) |
120 | 53 | 54 | ||
121 | 55 | def write(self, cr, uid, ids, vals, context=None): | ||
122 | 56 | if context is None: | ||
123 | 57 | context = {} | ||
124 | 58 | if context.get('sync_update_execution') and 'groups_id/id' in context.get('fields', []) and 'groups_id' not in vals: | ||
125 | 59 | vals['groups_id'] = [(6, 0, [])] | ||
126 | 60 | return super(ir_actions_act_window, self).write(cr, uid, ids, vals, context) | ||
127 | 61 | |||
128 | 62 | def _get_is_remote_wh(self, cr, uid, ids, field_name, args, context=None): | ||
129 | 63 | return {}.fromkeys(ids, False) | ||
130 | 64 | |||
131 | 65 | def _search_is_remote_wh(self, cr, uid, obj, name, args, context=None): | ||
132 | 66 | if not args: | ||
133 | 67 | return [] | ||
134 | 68 | rarg = [] | ||
135 | 69 | for arg in args: | ||
136 | 70 | if arg[1] != '=': | ||
137 | 71 | raise osv.except_osv('Error', 'Filter on is_remote_wh not implemented') | ||
138 | 72 | model_data_obj = self.pool.get('ir.model.data') | ||
139 | 73 | mod_ids = model_data_obj.search(cr, uid, [('model', '=', obj._name), ('module', '=', 'sync_remote_warehouse')]) | ||
140 | 74 | ids = [] | ||
141 | 75 | for m in model_data_obj.read(cr, uid, mod_ids, ['res_id']): | ||
142 | 76 | ids.append(m['res_id']) | ||
143 | 77 | value = arg[2] not in (False, 'f', 'False') | ||
144 | 78 | rarg.append(('id', value and 'in' or 'not in', ids)) | ||
145 | 79 | return rarg | ||
146 | 80 | |||
147 | 81 | _columns = { | ||
148 | 82 | 'is_remote_wh': fields.function(_get_is_remote_wh, type='boolean', string="From RW module", fnct_search=_search_is_remote_wh, method=True), | ||
149 | 83 | } | ||
150 | 54 | ir_actions_act_window() | 84 | ir_actions_act_window() |
151 | 55 | 85 | ||
152 | 86 | |||
153 | 56 | class bank_statement(osv.osv): | 87 | class bank_statement(osv.osv): |
154 | 57 | 88 | ||
155 | 58 | _inherit = 'account.bank.statement' | 89 | _inherit = 'account.bank.statement' |
156 | @@ -841,6 +872,29 @@ | |||
157 | 841 | view_xml_id = self.pool.get('ir.ui.view').get_xml_id(cr, 1, [bar.view_id.id]) | 872 | view_xml_id = self.pool.get('ir.ui.view').get_xml_id(cr, 1, [bar.view_id.id]) |
158 | 842 | return get_valid_xml_name('BAR', view_xml_id[bar.view_id.id], bar.name) | 873 | return get_valid_xml_name('BAR', view_xml_id[bar.view_id.id], bar.name) |
159 | 843 | 874 | ||
160 | 875 | def _get_is_remote_wh(self, cr, uid, ids, field_name, args, context=None): | ||
161 | 876 | return {}.fromkeys(ids, False) | ||
162 | 877 | |||
163 | 878 | def _search_is_remote_wh(self, cr, uid, obj, name, args, context=None): | ||
164 | 879 | if not args: | ||
165 | 880 | return [] | ||
166 | 881 | rarg = [] | ||
167 | 882 | for arg in args: | ||
168 | 883 | if arg[1] != '=': | ||
169 | 884 | raise osv.except_osv('Error', 'Filter on is_remote_wh not implemented') | ||
170 | 885 | model_data_obj = self.pool.get('ir.model.data') | ||
171 | 886 | mod_ids = model_data_obj.search(cr, uid, [('model', '=', obj._name), ('name', '=like', 'BAR_sync_remote_warehouse%')]) | ||
172 | 887 | ids = [] | ||
173 | 888 | for m in model_data_obj.read(cr, uid, mod_ids, ['res_id']): | ||
174 | 889 | ids.append(m['res_id']) | ||
175 | 890 | value = arg[2] not in (False, 'f', 'False') | ||
176 | 891 | rarg.append(('id', value and 'in' or 'not in', ids)) | ||
177 | 892 | return rarg | ||
178 | 893 | |||
179 | 894 | _columns = { | ||
180 | 895 | 'is_remote_wh': fields.function(_get_is_remote_wh, type='boolean', string="From RW module", fnct_search=_search_is_remote_wh, method=True), | ||
181 | 896 | } | ||
182 | 897 | |||
183 | 844 | button_access_rule() | 898 | button_access_rule() |
184 | 845 | 899 | ||
185 | 846 | class hr_employee(osv.osv): | 900 | class hr_employee(osv.osv): |