Merge lp:~unifield-team/unifield-wm/sync-us_484_rules into lp:unifield-wm/sync
- sync-us_484_rules
- Merge into sync_module_prod
Proposed by
Quentin THEURET @Amaris
Status: | Merged |
---|---|
Merged at revision: | 607 |
Proposed branch: | lp:~unifield-team/unifield-wm/sync-us_484_rules |
Merge into: | lp:unifield-wm/sync |
Diff against target: |
95 lines (+16/-12) 3 files modified
msf_sync_data_server/data/sync_server.sync_rule.csv (+5/-5) sync_client/message.py (+3/-4) sync_so/purchase.py (+8/-3) |
To merge this branch: | bzr merge lp:~unifield-team/unifield-wm/sync-us_484_rules |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Sync Reviewer | Pending | ||
Review via email:
|
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.sync_rule.csv' |
2 | --- msf_sync_data_server/data/sync_server.sync_rule.csv 2015-09-11 09:35:17 +0000 |
3 | +++ msf_sync_data_server/data/sync_server.sync_rule.csv 2015-10-09 08:08:50 +0000 |
4 | @@ -27,7 +27,7 @@ |
5 | msf_sync_data_server.fp_tree0,TRUE,TRUE,TRUE,bidirectional,Down,"[('category', 'in', ['FREE1', 'FREE2', 'DEST']),('parent_id', '!=', '')]","['parent_id/id', 'instance_id/id']",OC,account.analytic.account,instance_id,"DestF1F2 tree (only F1, F2 and Dest)",Valid,,126 |
6 | msf_sync_data_server.fp_tree,FALSE,TRUE,TRUE,bidirectional,Bidirectional,"[('category', 'in', ['FREE1', 'FREE2', 'DEST']),('parent_id', '!=', '')]",['parent_id/id'],MISSION,account.analytic.account,,"Analytic account tree (only F1, F2 and Dest) – Coordo/Projects only",Valid,,127 |
7 | msf_sync_data_server.currency_rate,TRUE,TRUE,TRUE,bidirectional,Down,"[('rate' , '!=' , ''),('currency_id', '!=', ''), ('currency_id', 'in', ('res.currency', 'id', [('active', 'in', ['t', 'f']), ('currency_table_id', '=', '')]))]","['currency_id/id', 'name', 'rate']",OC,res.currency.rate,,Currency Rate,Valid,,128 |
8 | -msf_sync_data_server.periods_state,TRUE,TRUE,TRUE,bidirectional,Bidirectional,[],"['state', 'period_id', 'instance_id']",OC,account.period.state,,Periods states,Valid,,129 |
9 | +msf_sync_data_server.periods_state,TRUE,TRUE,TRUE,bidirectional,Bidirectional,[],"['state', 'period_id/id', 'instance_id/id']",OC,account.period.state,,Periods states,Valid,,129 |
10 | msf_sync_data_server.analytic_distribution,TRUE,TRUE,FALSE,bidirectional,Bidirectional,[],['name'],OC,analytic.distribution,,Analytic Distribution,Valid,,200 |
11 | msf_sync_data_server.cost_center_distribution_line,TRUE,TRUE,TRUE,bidirectional,Bidirectional,"[('analytic_id' , 'in' , ('account.analytic.account' , 'id' , [('code','!=','cc-intermission')])), ('partner_type','=','internal')]","['amount', 'analytic_id/id', 'currency_id/id', 'date', 'destination_id/id', 'distribution_id/id', 'name', 'percentage', 'partner_type', 'source_date']",OC,cost.center.distribution.line,analytic_id,Cost Center Distribution Line - Internal partner,Valid,,201 |
12 | msf_sync_data_server.cost_center_distribution_line_non_internal,TRUE,TRUE,TRUE,bidirectional,Bidirectional-Private,"[('analytic_id' , 'in' , ('account.analytic.account' , 'id' , [('code','!=','cc-intermission')])), ('partner_type','!=','internal')]","['amount', 'analytic_id/id', 'currency_id/id', 'date', 'destination_id/id', 'distribution_id/id', 'name', 'percentage', 'partner_type', 'source_date']",OC,cost.center.distribution.line,analytic_id,Cost Center Distribution Line - Non internal partner,Valid,,202 |
13 | @@ -108,8 +108,8 @@ |
14 | msf_sync_data_server.country_code_mapping,TRUE,TRUE,TRUE,bidirectional,Down,[],"['instance_id/id', 'mapping_value']",COORDINATIONS,country.export.mapping,,Country Code Mapping,Valid,,571 |
15 | msf_sync_data_server.oc_product_creator_itc_esc_hq,TRUE,TRUE,FALSE,bidirectional,Down,"['|','|',('international_status','=','ITC'),('international_status','=','ESC'),('international_status','=','HQ')]","['alert_time', 'batch_management', 'categ_id/id', 'closed_article', 'code', 'cold_chain', 'composed_kit', 'xmlid_code', 'cost_method', 'country_restriction/id', 'dangerous_goods', 'default_code', 'description', 'description2', 'description_purchase', 'description_sale', 'gmdn_code', 'gmdn_description', 'heat_sensitive_item', 'international_status', 'justification_code_id/id', 'library', 'life_time', 'list_ids/id','med_device_class', 'name', 'name_template', 'narcotic', 'nomen_manda_0/id', 'nomen_manda_1/id', 'nomen_manda_2/id', 'nomen_manda_3/id', 'options_ids/id', 'perishable', 'procure_delay', 'procure_method', 'produce_delay', 'product_catalog_page', 'product_catalog_path', 'property_account_expense/id', 'property_account_income/id', 'property_stock_account_input/id', 'property_stock_account_output/id', 'restricted_country', 'short_shelf_life', 'single_use', 'sterilized', 'standard_price', 'sublist', 'subtype', 'asset_type_id', 'supply_method', 'type', 'un_code', 'uom_id/id', 'uom_po_id/id','use_time', 'valuation', 'weight', 'weight_net', 'state', 'old_code', 'function_value', 'form_value', 'fit_value', 'standard_ok','transport_ok','volume', 'soq_weight', 'soq_volume']",OC,product.product,,"OC Product (Creator = ITC, ESC or HQ)",Valid,,600 |
16 | msf_sync_data_server.mission_product_creator_local,TRUE,TRUE,FALSE,bidirectional,Down,"[('international_status','=','Local')]","['alert_time', 'batch_management', 'categ_id/id', 'closed_article', 'code', 'xmlid_code','cold_chain', 'composed_kit', 'cost_method', 'country_restriction/id', 'dangerous_goods', 'default_code', 'description', 'description2', 'description_purchase', 'description_sale', 'gmdn_code', 'gmdn_description', 'heat_sensitive_item', 'international_status', 'justification_code_id/id', 'library', 'life_time', 'list_ids/id','med_device_class', 'name', 'name_template', 'narcotic', 'nomen_manda_0/id', 'nomen_manda_1/id', 'nomen_manda_2/id', 'nomen_manda_3/id', 'options_ids/id', 'perishable', 'procure_delay', 'procure_method', 'produce_delay', 'product_catalog_page', 'product_catalog_path', 'property_account_expense/id', 'property_account_income/id', 'property_stock_account_input/id', 'property_stock_account_output/id', 'restricted_country', 'short_shelf_life', 'single_use', 'sterilized', 'standard_price', 'sublist', 'subtype', 'asset_type_id', 'supply_method', 'type', 'un_code', 'uom_id/id', 'uom_po_id/id','use_time', 'valuation', 'weight', 'weight_net', 'state', 'old_code', 'function_value', 'form_value', 'fit_value', 'standard_ok','transport_ok','volume','soq_weight','soq_volume']",MISSION,product.product,,Mission Product (Creator = local),Valid,,601 |
17 | -msf_sync_data_server.standard_product_list,TRUE,TRUE,FALSE,bidirectional,Down,"[('standard_list_ok','=','True')]","['creation_date', 'description', 'last_update_date', 'name', 'order_list_print_ok', 'ref', 'standard_list_ok', 'type']",OC,product.list,,Standard Product List,Valid,,605 |
18 | -msf_sync_data_server.standard_product_list_line,TRUE,TRUE,FALSE,bidirectional,Down,"[('list_id' , 'in', ('product.list', 'id', [('standard_list_ok','=','True')]))]","['comment','list_id/id','ref','name']",OC,product.list.line,,Standard Product List Line,Valid,,606 |
19 | +msf_sync_data_server.standard_product_list,TRUE,TRUE,TRUE,bidirectional,Down,"[('standard_list_ok','=','True')]","['creation_date', 'description', 'last_update_date', 'name', 'order_list_print_ok', 'ref', 'standard_list_ok', 'type']",OC,product.list,,Standard Product List,Valid,,605 |
20 | +msf_sync_data_server.standard_product_list_line,TRUE,TRUE,TRUE,bidirectional,Down,"[('list_id' , 'in', ('product.list', 'id', [('standard_list_ok','=','True')]))]","['comment','list_id/id','ref','name']",OC,product.list.line,,Standard Product List Line,Valid,,606 |
21 | msf_sync_data_server.tax_code,TRUE,TRUE,FALSE,bidirectional,Down,[],"['code', 'info', 'name', 'notprintable', 'sign']",OC,account.tax.code,,Tax Code,Valid,,610 |
22 | msf_sync_data_server.tax_code_tree,TRUE,TRUE,FALSE,bidirectional,Down,"[('parent_id','!=','')]",['parent_id/id'],OC,account.tax.code,,Tax Code Tree,Valid,,611 |
23 | msf_sync_data_server.account_tax,TRUE,TRUE,FALSE,bidirectional,Down,[],"['account_collected_id/id', 'account_paid_id/id', 'active', 'amount', 'applicable_type', 'base_code_id/id', 'base_sign', 'child_depend', 'description', 'domain', 'include_base_amount', 'name', 'price_include', 'python_applicable', 'python_compute', 'python_compute_inv', 'ref_base_code_id/id', 'ref_base_sign', 'ref_tax_code_id/id', 'ref_tax_sign', 'sequence', 'tax_code_id/id', 'tax_sign', 'type', 'type_tax_use']",OC,account.tax,,Account Tax,Valid,,612 |
24 | @@ -198,8 +198,8 @@ |
25 | msf_usb_sync_data_server.cp_product_price_list,TRUE,TRUE,FALSE,cp_to_rw,Bidirectional,[],"['active', 'company_id/id', 'currency_id/id', 'currency_name', 'name', 'type']",USB,product.pricelist,,[MASTER] Product_price_list,Valid,,1670 |
26 | msf_usb_sync_data_server.cp_country_restrictions,TRUE,TRUE,FALSE,cp_to_rw,Bidirectional,[],['name'],USB,res.country.restriction,,[MASTER] Country restrictions,Valid,,1680 |
27 | msf_usb_sync_data_server.cp_all_product,TRUE,TRUE,FALSE,cp_to_rw,Bidirectional,[],"['alert_time', 'batch_management', 'asset_type_id', 'categ_id/id', 'closed_article', 'code', 'cold_chain', 'composed_kit', 'cost_method', 'country_restriction/id', 'dangerous_goods', 'default_code', 'description', 'description2', 'description_purchase', 'description_sale', 'gmdn_code', 'gmdn_description', 'heat_sensitive_item', 'international_status', 'justification_code_id/id', 'library', 'life_time', 'list_ids/id','med_device_class', 'name', 'name_template', 'narcotic', 'nomen_manda_0/id', 'nomen_manda_1/id', 'nomen_manda_2/id', 'nomen_manda_3/id', 'options_ids/id', 'perishable', 'procure_delay', 'procure_method', 'produce_delay', 'product_catalog_page', 'product_catalog_path', 'property_account_expense/id', 'property_account_income/id', 'property_stock_account_input/id', 'property_stock_account_output/id', 'restricted_country', 'short_shelf_life', 'single_use', 'sterilized', 'standard_price', 'sublist', 'subtype', 'supply_method', 'type', 'un_code', 'uom_id/id', 'uom_po_id/id','use_time', 'valuation', 'weight', 'weight_net', 'xmlid_code', 'state', 'old_code', 'function_value', 'form_value', 'fit_value', 'standard_ok','transport_ok','volume','soq_weight','soq_volume']",USB,product.product,,[MASTER] Products,Valid,,1810 |
28 | -msf_usb_sync_data_server.cp_standard_product_list,TRUE,TRUE,FALSE,cp_to_rw,Bidirectional,"[('standard_list_ok','=','True')]","['creation_date', 'description', 'last_update_date', 'name', 'order_list_print_ok', 'ref', 'standard_list_ok', 'type']",USB,product.list,,[MASTER] Standard Product List,Valid,,1820 |
29 | -msf_usb_sync_data_server.cp_standard_product_list_line,TRUE,TRUE,FALSE,cp_to_rw,Bidirectional,"[('list_id' , 'in', ('product.list', 'id', [('standard_list_ok','=','True')]))]","['comment','list_id/id','ref','name/id']",USB,product.list.line,,[MASTER] Standard Product List Line,Valid,,1821 |
30 | +msf_usb_sync_data_server.cp_standard_product_list,TRUE,TRUE,TRUE,cp_to_rw,Bidirectional,"[('standard_list_ok','=','True')]","['creation_date', 'description', 'last_update_date', 'name', 'order_list_print_ok', 'ref', 'standard_list_ok', 'type']",USB,product.list,,[MASTER] Standard Product List,Valid,,1820 |
31 | +msf_usb_sync_data_server.cp_standard_product_list_line,TRUE,TRUE,TRUE,cp_to_rw,Bidirectional,"[('list_id' , 'in', ('product.list', 'id', [('standard_list_ok','=','True')]))]","['comment','list_id/id','ref','name/id']",USB,product.list.line,,[MASTER] Standard Product List Line,Valid,,1821 |
32 | msf_usb_sync_data_server.cp_composition_kit,TRUE,TRUE,FALSE,cp_to_rw,Bidirectional,"[('state','=','completed'),('composition_type','=','theoretical')]","['active', 'composition_creation_date', 'composition_description', 'composition_product_id/id', 'composition_type', 'composition_version', 'composition_version_txt', 'name', 'state']",USB,composition.kit,,[MASTER] Theoretical Kit Composition List,Valid,,1830 |
33 | msf_usb_sync_data_server.cp_composition_item,TRUE,TRUE,FALSE,cp_to_rw,Bidirectional,"[('item_kit_id' , 'in' , ('composition.kit' , 'id' , [('state','=','completed'),('composition_type','=','theoretical')]))]","['item_asset_id/id', 'item_kit_id/id', 'item_module', 'item_product_id/id', 'item_qty', 'item_uom_id/id']",USB,composition.item,,[MASTER] Theoretical Kit Composition List Line,Valid,,1831 |
34 | msf_usb_sync_data_server.cp_company,TRUE,TRUE,FALSE,cp_to_rw,Bidirectional,[],"['currency_id/id', 'name', 'partner_id/id', 'po_lead', 'rml_header', 'rml_header2', 'rml_header3', 'schedule_range', 'security_lead']",USB,res.company,,[MASTER] Company,Valid,,1890 |
35 | |
36 | === modified file 'sync_client/message.py' |
37 | --- sync_client/message.py 2015-03-16 17:06:06 +0000 |
38 | +++ sync_client/message.py 2015-10-09 08:08:50 +0000 |
39 | @@ -356,8 +356,7 @@ |
40 | #UTP-682: double check to make sure if the message has been executed, then skip it |
41 | if message.run: |
42 | continue |
43 | - cr.execute("SAVEPOINT exec_message") |
44 | - |
45 | + cr.commit() |
46 | try: |
47 | model, method = self.get_model_and_method(message.remote_call) |
48 | arg = self.get_arg(message.arguments) |
49 | @@ -368,7 +367,8 @@ |
50 | except BaseException, e: |
51 | error = e # Keep this message for the exception below |
52 | self._logger.exception("Message execution %d failed!" % message.id) |
53 | - cr.execute("ROLLBACK TO SAVEPOINT exec_message") |
54 | + cr.rollback() |
55 | + |
56 | if isinstance(e, osv.except_osv): |
57 | error_msg = e.value |
58 | else: |
59 | @@ -379,7 +379,6 @@ |
60 | 'log' : e.__class__.__name__+": "+tools.ustr(error_msg)+"\n\n--\n"+tools.ustr(traceback.format_exc()), |
61 | }, context=context) |
62 | else: |
63 | - cr.execute("RELEASE SAVEPOINT exec_message") |
64 | self.write(cr, uid, message.id, { |
65 | 'execution_date' : execution_date, |
66 | 'run' : True, |
67 | |
68 | === modified file 'sync_so/purchase.py' |
69 | --- sync_so/purchase.py 2015-07-22 13:03:42 +0000 |
70 | +++ sync_so/purchase.py 2015-10-09 08:08:50 +0000 |
71 | @@ -495,9 +495,6 @@ |
72 | |
73 | so_po_common = self.pool.get('so.po.common') |
74 | line_obj = self.pool.get('purchase.order.line') |
75 | - partner_type = so_po_common.get_partner_type(cr, uid, source, context) |
76 | - if partner_type == 'section': |
77 | - raise Exception, "Sorry, the push low is not available for intersection partner! " + source |
78 | |
79 | # UF-1830: TODO: DO NOT CREATE ANYTHING FROM A RESTORE CASE! |
80 | if context.get('restore_flag'): |
81 | @@ -516,6 +513,14 @@ |
82 | header_result['push_fo'] = True |
83 | header_result['origin'] = so_dict.get('name', False) |
84 | |
85 | + partner_type = so_po_common.get_partner_type(cr, uid, source, context) |
86 | + if partner_type == 'section': |
87 | + #US-620: If the FO type is donation or loan, then remove the analytic distribution |
88 | + if so_info.order_type in ('loan', 'donation_st', 'donation_exp'): |
89 | + del header_result['analytic_distribution_id'] |
90 | + else: |
91 | + raise Exception, "Sorry, Push Flow for intersection partner is only available for Donation or Loan FOs! " + source |
92 | + |
93 | # the case of intermission, the AD will be updated below, after creating the PO |
94 | if partner_type == 'intermission': |
95 | del header_result['analytic_distribution_id'] |