Merge lp:~julie-w/unifield-server/US-6354 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5503
Proposed branch: lp:~julie-w/unifield-server/US-6354
Merge into: lp:unifield-server
Diff against target: 65 lines (+25/-2)
3 files modified
bin/addons/msf_profile/data/patches.xml (+5/-0)
bin/addons/msf_profile/msf_profile.py (+19/-1)
bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv (+1/-1)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-6354
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+372585@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 'bin/addons/msf_profile/data/patches.xml'
2--- bin/addons/msf_profile/data/patches.xml 2019-08-19 09:44:42 +0000
3+++ bin/addons/msf_profile/data/patches.xml 2019-09-11 07:42:29 +0000
4@@ -447,5 +447,10 @@
5 <field name="method">us_6342_cancel_ir</field>
6 </record>
7
8+ <!-- UF15.0 -->
9+ <record id="us_6354_trigger_donation_account_sync" model="patch.scripts">
10+ <field name="method">us_6354_trigger_donation_account_sync</field>
11+ </record>
12+
13 </data>
14 </openerp>
15
16=== modified file 'bin/addons/msf_profile/msf_profile.py'
17--- bin/addons/msf_profile/msf_profile.py 2019-08-19 09:44:42 +0000
18+++ bin/addons/msf_profile/msf_profile.py 2019-09-11 07:42:29 +0000
19@@ -52,6 +52,25 @@
20 'model': lambda *a: 'patch.scripts',
21 }
22
23+ # UF15.0
24+ def us_6354_trigger_donation_account_sync(self, cr, uid, *a, **b):
25+ """
26+ Triggers a synch. on the Intersection Partners at HQ, so that their Donation Payable Account is retrieved in the lower instances
27+ """
28+ if _get_instance_level(self, cr, uid) == 'hq':
29+ cr.execute("""
30+ UPDATE ir_model_data
31+ SET touched ='[''donation_payable_account'']', last_modification = NOW()
32+ WHERE module='sd'
33+ AND model='res.partner'
34+ AND res_id IN (
35+ SELECT id
36+ FROM res_partner
37+ WHERE partner_type = 'section'
38+ );
39+ """)
40+ self._logger.warn('Sync. triggered on %s Intersection Partner(s).' % (cr.rowcount,))
41+
42 # UF14.0
43 def us_6342_cancel_ir(self, cr, uid, *a, **b):
44 """
45@@ -95,7 +114,6 @@
46 cr.execute("update ir_cron set function='send_backup_bg' where function='send_backup' and model='msf.instance.cloud'")
47 return True
48
49- # UF14.0
50 def us_6075_set_paid_invoices_as_closed(self, cr, uid, *a, **b):
51 cr.execute('''SELECT i.id, i.number
52 FROM account_invoice i
53
54=== modified file 'bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv'
55--- bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2019-08-08 13:55:43 +0000
56+++ bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2019-09-11 07:42:29 +0000
57@@ -53,7 +53,7 @@
58 msf_sync_data_server.section_partner,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"[('partner_type' , '=' , 'esc')]","['comment', 'credit_limit', 'customer', 'customer_lt', 'lang', 'manufacturer', 'name', 'partner_type', 'po_by_project', 'procurement_lt', 'property_account_payable/id', 'property_account_position/id', 'property_account_receivable/id', 'property_payment_term/id', 'property_product_pricelist/id', 'property_product_pricelist_purchase/id', 'property_stock_customer/id', 'property_stock_supplier/id', 'ref', 'split_po', 'supplier', 'supplier_lt', 'transport_0', 'transport_0_lt', 'transport_1', 'transport_1_lt', 'transport_2', 'transport_2_lt', 'transporter', 'zone']",OC,res.partner,,Section Partner,Valid,"{'active':False}",300
59 msf_sync_data_server.section_partner_tree,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"[('partner_type','=','esc') , ('parent_id', '!=', '')]",['parent_id/id'],OC,res.partner,,Section Partner Tree,Valid,,301
60 msf_sync_data_server.section_partner_address,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"[('partner_id' , 'in' , ('res.partner' , 'id' , [('partner_type','=','esc')]))]","['active', 'city', 'country_id/id', 'email', 'fax', 'function', 'mobile', 'name', 'partner_id/id', 'phone', 'state_id/id', 'street', 'street2', 'title/id', 'type', 'zip']",OC,res.partner.address,,Section Partner Address,Valid,,302
61-msf_sync_data_server.intersection_partner,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"['|', ('active', '=', ''), ('active', '!=', ''),('partner_type' , '=' , 'section')]","['customer', 'manufacturer', 'name', 'partner_type', 'property_account_payable/id', 'property_account_receivable/id', 'ref', 'supplier', 'transporter', 'property_product_pricelist/id', 'property_product_pricelist_purchase/id']",OC,res.partner,,Intersection Partner,Valid,"{'customer': True, 'supplier': True, 'active': False}",306
62+msf_sync_data_server.intersection_partner,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"['|', ('active', '=', ''), ('active', '!=', ''),('partner_type' , '=' , 'section')]","['customer', 'manufacturer', 'name', 'partner_type', 'property_account_payable/id', 'property_account_receivable/id', 'ref', 'supplier', 'transporter', 'property_product_pricelist/id', 'property_product_pricelist_purchase/id', 'donation_payable_account/id']",OC,res.partner,,Intersection Partner,Valid,"{'customer': True, 'supplier': True, 'active': False}",306
63 msf_sync_data_server.intersection_partner_tree,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"['|', ('active', '=', ''), ('active', '!=', ''),('partner_type','=','section') , ('parent_id', '!=', '')]",['parent_id/id'],OC,res.partner,,Intersection Partner Tree,Valid,,307
64 msf_sync_data_server.intersection_partner_address,TRUE,TRUE,FALSE,TRUE,bidirectional,Down,"['|', ('active', '=', ''), ('active', '!=', ''),('partner_id' , 'in' , ('res.partner' , 'id' , [('partner_type','=','section')]))]","['active', 'city', 'country_id/id', 'email', 'fax', 'function', 'mobile', 'name', 'partner_id/id', 'phone', 'state_id/id', 'street', 'street2', 'title/id', 'type', 'zip']",OC,res.partner.address,,Intersection Partner Address,Valid,,308
65 msf_sync_data_server.external_partner,TRUE,TRUE,FALSE,TRUE,bidirectional,Bidirectional,"[('partner_type' , '=' , 'external'),('name','!=','Local Market')]","['name', 'partner_type', 'property_account_receivable/id', 'property_account_payable/id', 'ref', 'customer','supplier','zone', 'lang', 'property_product_pricelist/id', 'property_product_pricelist_purchase/id', 'donation_payable_account/id', 'po_by_project', 'manufacturer', 'transporter']",HQ + MISSION,res.partner,,External Partner,Valid,"{'active':False}",309

Subscribers

People subscribed via source and target branches