Merge lp:~dorian-kemps/unifield-server/US-2725 into lp:unifield-server

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~dorian-kemps/unifield-server/US-2725
Merge into: lp:unifield-server
Diff against target: 61 lines (+26/-1) (has conflicts)
3 files modified
bin/addons/msf_profile/data/patches.xml (+8/-0)
bin/addons/msf_profile/msf_profile.py (+14/-0)
bin/addons/product_attributes/product_attributes.py (+4/-1)
Text conflict in bin/addons/msf_profile/data/patches.xml
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-2725
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+388869@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 2020-08-04 08:00:56 +0000
3+++ bin/addons/msf_profile/data/patches.xml 2020-08-07 07:53:40 +0000
4@@ -577,9 +577,17 @@
5 <field name="method">us_7412_set_fy_closure_settings</field>
6 </record>
7
8+<<<<<<< TREE
9 <record id="us_6453_set_ref_on_in" model="patch.scripts">
10 <field name="method">us_6453_set_ref_on_in</field>
11 </record>
12
13+=======
14+ <!-- UF19.0 -->
15+ <record id="us_2725_uf_write_date_on_products" model="patch.scripts">
16+ <field name="method">us_2725_uf_write_date_on_products</field>
17+ </record>
18+
19+>>>>>>> MERGE-SOURCE
20 </data>
21 </openerp>
22
23=== modified file 'bin/addons/msf_profile/msf_profile.py'
24--- bin/addons/msf_profile/msf_profile.py 2020-08-04 08:00:56 +0000
25+++ bin/addons/msf_profile/msf_profile.py 2020-08-07 07:53:40 +0000
26@@ -52,6 +52,20 @@
27 'model': lambda *a: 'patch.scripts',
28 }
29
30+ # UF19.0
31+ def us_2725_uf_write_date_on_products(self, cr, uid, *a, **b):
32+ '''
33+ Set the uf_write_date of products which don't have one to the date of creation
34+ '''
35+ prod_obj = self.pool.get('product.product')
36+
37+ cr.execute('''
38+ UPDATE product_product SET uf_write_date = uf_create_date WHERE uf_write_date is NULL
39+ ''')
40+ self._logger.warn('The uf_write_date has been modified on %s products' % (cr.rowcount,))
41+
42+ return True
43+
44 # UF18.0
45 def us_7412_set_fy_closure_settings(self, cr, uid, *a, **b):
46 """
47
48=== modified file 'bin/addons/product_attributes/product_attributes.py'
49--- bin/addons/product_attributes/product_attributes.py 2020-05-04 16:40:38 +0000
50+++ bin/addons/product_attributes/product_attributes.py 2020-08-07 07:53:40 +0000
51@@ -1419,7 +1419,10 @@
52 if f in vals and not vals.get(f):
53 vals[f] = 'no'
54
55- vals['uf_create_date'] = vals.get('uf_create_date') or datetime.now()
56+ vals.update({
57+ 'uf_create_date': vals.get('uf_create_date') or datetime.now(),
58+ 'uf_write_date': vals.get('uf_write_date') or datetime.now(),
59+ })
60
61 self.convert_price(cr, uid, vals, context)
62

Subscribers

People subscribed via source and target branches