Merge lp:~unifield-team/unifield-wm/sync-us-208 into lp:unifield-wm/sync

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
Reviewer Review Type Date Requested Status
UniField Sync Reviewer Pending
Review via email: mp+260567@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
=== modified file 'msf_sync_data_server/data/sync_server.message_rule.csv'
--- msf_sync_data_server/data/sync_server.message_rule.csv 2015-04-27 11:39:49 +0000
+++ msf_sync_data_server/data/sync_server.message_rule.csv 2015-05-29 11:56:50 +0000
@@ -20,9 +20,9 @@
20create_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,Valid20create_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
21create_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,Valid21create_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
22reset_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,Valid22reset_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
23USB_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,Valid23USB_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
24USB_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,Valid24USB_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
25USB_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,Valid25USB_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
26USB_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,Valid26USB_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
27USB_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,Valid27USB_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
28USB_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,Valid28USB_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
2929
=== modified file 'msf_sync_data_server/data/sync_server.sync_rule.csv'
--- msf_sync_data_server/data/sync_server.sync_rule.csv 2015-05-29 11:54:39 +0000
+++ msf_sync_data_server/data/sync_server.sync_rule.csv 2015-05-29 11:56:50 +0000
@@ -124,8 +124,8 @@
124msf_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,,702124msf_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
125msf_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,,703125msf_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
126msf_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,,704126msf_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
127msf_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,,705127msf_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
128msf_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,,706128msf_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
129msf_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,,720129msf_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
130msf_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,,1000130msf_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
131msf_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,,1001131msf_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
132132
=== modified file 'sync_remote_warehouse/wizard/setup_remote_warehouse.py'
--- sync_remote_warehouse/wizard/setup_remote_warehouse.py 2015-03-03 14:55:29 +0000
+++ sync_remote_warehouse/wizard/setup_remote_warehouse.py 2015-05-29 11:56:50 +0000
@@ -204,7 +204,8 @@
204 204
205 def _revert_central_platform(self, cr, uid, entity_id, context=None):205 def _revert_central_platform(self, cr, uid, entity_id, context=None):
206 self._set_entity_type(cr, uid, entity_id, "", context=context)206 self._set_entity_type(cr, uid, entity_id, "", context=context)
207 self._set_sequence_suffix(cr, uid, suffix="-RW", context=context)207 #US-208: Do not change the suffixes of the documents
208 self._set_sequence_suffix(cr, uid, suffix="", context=context)
208 209
209 def _get_db_dump(self, database_name):210 def _get_db_dump(self, database_name):
210 """ Makes a dump of database_name and returns the base64 SQL """211 """ Makes a dump of database_name and returns the base64 SQL """
211212
=== modified file 'sync_so/so_po_common.py'
--- sync_so/so_po_common.py 2015-04-27 07:55:06 +0000
+++ sync_so/so_po_common.py 2015-05-29 11:56:50 +0000
@@ -231,8 +231,9 @@
231231
232 partner_id = self.get_partner_id(cr, uid, source, context)232 partner_id = self.get_partner_id(cr, uid, source, context)
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)
234 price_list = self.get_price_list_id(cr, uid, partner_id, context)
235 location_id = self.get_location(cr, uid, partner_id, context)234 location_id = self.get_location(cr, uid, partner_id, context)
235 # just roll back what has been modified --- NO MODIF HERE!
236 price_list = self.get_price_list_id(cr, uid, partner_id, context)
236237
237 header_result['partner_ref'] = source + "." + header_info.get('name')238 header_result['partner_ref'] = source + "." + header_info.get('name')
238 header_result['partner_id'] = partner_id239 header_result['partner_id'] = partner_id
@@ -307,7 +308,10 @@
307308
308 partner_id = self.get_partner_id(cr, uid, source, context)309 partner_id = self.get_partner_id(cr, uid, source, context)
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)
310 price_list = self.get_price_list_id(cr, uid, partner_id, context)311 if 'pricelist_id' in header_info:
312 price_list = header_info.get('pricelist_id')
313 else:
314 price_list = self.get_price_list_id(cr, uid, partner_id, context)
311315
312 header_result['client_order_ref'] = source + "." + header_info.get('name')316 header_result['client_order_ref'] = source + "." + header_info.get('name')
313 header_result['partner_id'] = partner_id317 header_result['partner_id'] = partner_id
314318
=== modified file 'sync_so/so_po_rw.py'
--- sync_so/so_po_rw.py 2014-11-30 20:32:39 +0000
+++ sync_so/so_po_rw.py 2015-05-29 11:56:50 +0000
@@ -126,10 +126,18 @@
126 if rec_id:126 if rec_id:
127 header_result['partner_id'] = rec_id127 header_result['partner_id'] = rec_id
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)
129 if partner.property_product_pricelist_purchase:129
130 # US-208: Retrieve the pricelist: if it's provided from sync, then use it
131 if 'pricelist_id' in so_dict and so_dict.get('pricelist_id', True):
132 pl_xmlid = so_dict.get('pricelist_id')['id']
133 if pl_xmlid:
134 header_result['pricelist_id'] = self.pool.get('product.pricelist').find_sd_ref(cr, uid, xmlid_to_sdref(pl_xmlid), context=context)
135 elif partner.property_product_pricelist_purchase:
130 header_result['pricelist_id'] = partner.property_product_pricelist_purchase.id136 header_result['pricelist_id'] = partner.property_product_pricelist_purchase.id
137 # In any case, if the code does not enter in the block above, the default pricelist_id is still used
131 138
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)
140
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 one141 # 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
134 partner_ref = source + "." + sync_values.name142 partner_ref = source + "." + sync_values.name
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)
@@ -155,7 +163,6 @@
155 line.update({'order_id': po_id})163 line.update({'order_id': po_id})
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)
157 165
158 name = self.browse(cr, uid, po_id, context=context).name
159 message = "The PO " + po_name + " has been well replicated at " + cr.dbname166 message = "The PO " + po_name + " has been well replicated at " + cr.dbname
160 self._logger.info(message)167 self._logger.info(message)
161 return message168 return message
162169
=== modified file 'sync_so/specific_xml_id.py'
--- sync_so/specific_xml_id.py 2015-05-28 11:41:07 +0000
+++ sync_so/specific_xml_id.py 2015-05-29 11:56:50 +0000
@@ -40,6 +40,7 @@
4040
41account_journal()41account_journal()
4242
43
43class ir_actions_act_window(osv.osv):44class ir_actions_act_window(osv.osv):
44 _inherit = 'ir.actions.act_window'45 _inherit = 'ir.actions.act_window'
4546
@@ -51,8 +52,38 @@
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'])
52 return get_valid_xml_name(origin_xmlid['module'], origin_xmlid['name'])53 return get_valid_xml_name(origin_xmlid['module'], origin_xmlid['name'])
5354
55 def write(self, cr, uid, ids, vals, context=None):
56 if context is None:
57 context = {}
58 if context.get('sync_update_execution') and 'groups_id/id' in context.get('fields', []) and 'groups_id' not in vals:
59 vals['groups_id'] = [(6, 0, [])]
60 return super(ir_actions_act_window, self).write(cr, uid, ids, vals, context)
61
62 def _get_is_remote_wh(self, cr, uid, ids, field_name, args, context=None):
63 return {}.fromkeys(ids, False)
64
65 def _search_is_remote_wh(self, cr, uid, obj, name, args, context=None):
66 if not args:
67 return []
68 rarg = []
69 for arg in args:
70 if arg[1] != '=':
71 raise osv.except_osv('Error', 'Filter on is_remote_wh not implemented')
72 model_data_obj = self.pool.get('ir.model.data')
73 mod_ids = model_data_obj.search(cr, uid, [('model', '=', obj._name), ('module', '=', 'sync_remote_warehouse')])
74 ids = []
75 for m in model_data_obj.read(cr, uid, mod_ids, ['res_id']):
76 ids.append(m['res_id'])
77 value = arg[2] not in (False, 'f', 'False')
78 rarg.append(('id', value and 'in' or 'not in', ids))
79 return rarg
80
81 _columns = {
82 'is_remote_wh': fields.function(_get_is_remote_wh, type='boolean', string="From RW module", fnct_search=_search_is_remote_wh, method=True),
83 }
54ir_actions_act_window()84ir_actions_act_window()
5585
86
56class bank_statement(osv.osv):87class bank_statement(osv.osv):
5788
58 _inherit = 'account.bank.statement'89 _inherit = 'account.bank.statement'
@@ -841,6 +872,29 @@
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])
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)
843874
875 def _get_is_remote_wh(self, cr, uid, ids, field_name, args, context=None):
876 return {}.fromkeys(ids, False)
877
878 def _search_is_remote_wh(self, cr, uid, obj, name, args, context=None):
879 if not args:
880 return []
881 rarg = []
882 for arg in args:
883 if arg[1] != '=':
884 raise osv.except_osv('Error', 'Filter on is_remote_wh not implemented')
885 model_data_obj = self.pool.get('ir.model.data')
886 mod_ids = model_data_obj.search(cr, uid, [('model', '=', obj._name), ('name', '=like', 'BAR_sync_remote_warehouse%')])
887 ids = []
888 for m in model_data_obj.read(cr, uid, mod_ids, ['res_id']):
889 ids.append(m['res_id'])
890 value = arg[2] not in (False, 'f', 'False')
891 rarg.append(('id', value and 'in' or 'not in', ids))
892 return rarg
893
894 _columns = {
895 'is_remote_wh': fields.function(_get_is_remote_wh, type='boolean', string="From RW module", fnct_search=_search_is_remote_wh, method=True),
896 }
897
844button_access_rule()898button_access_rule()
845899
846class hr_employee(osv.osv):900class hr_employee(osv.osv):

Subscribers

People subscribed via source and target branches

to all changes: