Merge lp:~unifield-team/unifield-wm/us-409-485-767 into lp:unifield-wm

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~unifield-team/unifield-wm/us-409-485-767
Merge into: lp:unifield-wm
Diff against target: 136 lines (+43/-3)
7 files modified
consumption_calculation/weekly_forecast_report.py (+4/-1)
consumption_calculation/weekly_forecast_report_view.xml (+1/-1)
msf_profile/data/patches.xml (+5/-0)
product_list/product_list.py (+23/-0)
product_list/product_list_view.xml (+2/-1)
stock_override/wizard/stock_card_view.xml (+1/-0)
stock_override/wizard/stock_card_wizard.py (+7/-0)
To merge this branch: bzr merge lp:~unifield-team/unifield-wm/us-409-485-767
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+283079@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

2709. By Quentin THEURET @Amaris

US-409 [FIX] Put target filename on Periodical Forecast report

2708. By Quentin THEURET @Amaris

US-485 [IMP] Put 'Temporary' as default value for creator field on new product lists

2707. By Quentin THEURET @Amaris

US-485 [IMP] Add a new 'Temporary' option for product list creator field

2706. By Quentin THEURET @Amaris

Merge lp:~unifield-team/unifield-wm/us-485

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'consumption_calculation/weekly_forecast_report.py'
2--- consumption_calculation/weekly_forecast_report.py 2015-11-03 12:55:51 +0000
3+++ consumption_calculation/weekly_forecast_report.py 2016-01-19 10:40:59 +0000
4@@ -246,7 +246,10 @@
5 :return Return a dictionary with the action to open the report
6 :rtype dict
7 """
8- datas = {'ids': ids}
9+ datas = {
10+ 'ids': ids,
11+ 'target_filename': 'Periodical Forecast Report',
12+ }
13 return {
14 'type': 'ir.actions.report.xml',
15 'report_name': 'weekly.forecast.report_xls',
16
17=== modified file 'consumption_calculation/weekly_forecast_report_view.xml'
18--- consumption_calculation/weekly_forecast_report_view.xml 2014-04-11 09:24:16 +0000
19+++ consumption_calculation/weekly_forecast_report_view.xml 2016-01-19 10:40:59 +0000
20@@ -124,7 +124,7 @@
21 </record>
22
23 <record id="action_weekly_forecast_report" model="ir.actions.act_window">
24- <field name="name">Weekly forecast reports</field>
25+ <field name="name">Periodical forecast reports</field>
26 <field name="res_model">weekly.forecast.report</field>
27 <field name="view_type">form</field>
28 <field name="view_mode">tree,form</field>
29
30=== modified file 'msf_profile/data/patches.xml'
31--- msf_profile/data/patches.xml 2015-11-30 13:53:32 +0000
32+++ msf_profile/data/patches.xml 2016-01-19 10:40:59 +0000
33@@ -28,5 +28,10 @@
34 <field name="method">bar_action_patch</field>
35 </record>
36
37+ <record id="us_485_patch" model="patch.scripts">
38+ <field name="model">product.list</field>
39+ <field name="method">set_creator</field>
40+ </record>
41+
42 </data>
43 </openerp>
44
45=== modified file 'product_list/product_list.py'
46--- product_list/product_list.py 2015-09-08 09:32:08 +0000
47+++ product_list/product_list.py 2016-01-19 10:40:59 +0000
48@@ -89,6 +89,16 @@
49 string='Type',
50 required=True,
51 ),
52+ 'creator': fields.selection(
53+ selection=[
54+ ('hq', 'HQ'),
55+ ('coordo', 'Coordination'),
56+ ('project', 'Project'),
57+ ('temp', 'Temporary'),
58+ ],
59+ string='Creator',
60+ required=True,
61+ ),
62 'description': fields.char(
63 size=256,
64 string='Description',
65@@ -145,6 +155,7 @@
66
67 _defaults = {
68 'creation_date': lambda *a: time.strftime('%Y-%m-%d'),
69+ 'creator': lambda *a: 'temp',
70 }
71
72 _sql_constraints = [
73@@ -221,6 +232,18 @@
74 'context': context,
75 }
76
77+ def set_creator(self, cr, uid, *a, **b):
78+ """
79+ Called by the patch script - Set the creator of the existing product lists to Project
80+ @param cr: Cursor to the database
81+ @param uid: ID of the res.users that calls this method
82+ @param a: No-named arguments
83+ @param b: Named arguments
84+ @return: True
85+ """
86+ list_ids = self.search(cr, uid, [('creator', '=', False)])
87+ self.write(cr, uid, list_ids, {'creator': 'temp'})
88+
89 product_list()
90
91
92
93=== modified file 'product_list/product_list_view.xml'
94--- product_list/product_list_view.xml 2015-09-08 09:32:08 +0000
95+++ product_list/product_list_view.xml 2016-01-19 10:40:59 +0000
96@@ -64,8 +64,9 @@
97 <field name="ref" />
98 <field name="name" />
99 <field name="creation_date" />
100- <field name="description" />
101+ <field name="creator" />
102 <field name="last_update_date" />
103+ <field name="description" colspan="4" />
104 <group colspan="2" col="5">
105 <label string="" />
106 <field name="standard_list_ok" />
107
108=== modified file 'stock_override/wizard/stock_card_view.xml'
109--- stock_override/wizard/stock_card_view.xml 2014-03-14 10:51:54 +0000
110+++ stock_override/wizard/stock_card_view.xml 2016-01-19 10:40:59 +0000
111@@ -50,6 +50,7 @@
112 </group>
113 <field name="perishable" invisible="1" />
114 <field name="prodlot_id" attrs="{'invisible': [('perishable', '=', False)]}" readonly="1" />
115+ <field name="expiry_date" readonly="1" attrs="{'invisible': [('perishable', '=', False)]}" />
116 <separator colspan="4" string="Period" />
117 <field name="from_date" readonly="1" />
118 <field name="to_date" readonly="1" />
119
120=== modified file 'stock_override/wizard/stock_card_wizard.py'
121--- stock_override/wizard/stock_card_wizard.py 2015-02-05 16:24:37 +0000
122+++ stock_override/wizard/stock_card_wizard.py 2016-01-19 10:40:59 +0000
123@@ -38,6 +38,13 @@
124 'perishable': fields.boolean(string='Perishable'),
125 'prodlot_id': fields.many2one('stock.production.lot',
126 string='Batch number'),
127+ 'expiry_date': fields.related(
128+ 'prodlot_id',
129+ 'life_date',
130+ type='date',
131+ string='Expiry date',
132+ readonly=True,
133+ ),
134 'from_date': fields.date(string='From date'),
135 'to_date': fields.date(string='To date'),
136 'available_stock': fields.float(digits=(16,2), string='Available stock'),

Subscribers

People subscribed via source and target branches