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
=== modified file 'consumption_calculation/weekly_forecast_report.py'
--- consumption_calculation/weekly_forecast_report.py 2015-11-03 12:55:51 +0000
+++ consumption_calculation/weekly_forecast_report.py 2016-01-19 10:40:59 +0000
@@ -246,7 +246,10 @@
246 :return Return a dictionary with the action to open the report246 :return Return a dictionary with the action to open the report
247 :rtype dict247 :rtype dict
248 """248 """
249 datas = {'ids': ids}249 datas = {
250 'ids': ids,
251 'target_filename': 'Periodical Forecast Report',
252 }
250 return {253 return {
251 'type': 'ir.actions.report.xml',254 'type': 'ir.actions.report.xml',
252 'report_name': 'weekly.forecast.report_xls',255 'report_name': 'weekly.forecast.report_xls',
253256
=== modified file 'consumption_calculation/weekly_forecast_report_view.xml'
--- consumption_calculation/weekly_forecast_report_view.xml 2014-04-11 09:24:16 +0000
+++ consumption_calculation/weekly_forecast_report_view.xml 2016-01-19 10:40:59 +0000
@@ -124,7 +124,7 @@
124 </record>124 </record>
125125
126 <record id="action_weekly_forecast_report" model="ir.actions.act_window">126 <record id="action_weekly_forecast_report" model="ir.actions.act_window">
127 <field name="name">Weekly forecast reports</field>127 <field name="name">Periodical forecast reports</field>
128 <field name="res_model">weekly.forecast.report</field>128 <field name="res_model">weekly.forecast.report</field>
129 <field name="view_type">form</field>129 <field name="view_type">form</field>
130 <field name="view_mode">tree,form</field>130 <field name="view_mode">tree,form</field>
131131
=== modified file 'msf_profile/data/patches.xml'
--- msf_profile/data/patches.xml 2015-11-30 13:53:32 +0000
+++ msf_profile/data/patches.xml 2016-01-19 10:40:59 +0000
@@ -28,5 +28,10 @@
28 <field name="method">bar_action_patch</field>28 <field name="method">bar_action_patch</field>
29 </record>29 </record>
3030
31 <record id="us_485_patch" model="patch.scripts">
32 <field name="model">product.list</field>
33 <field name="method">set_creator</field>
34 </record>
35
31 </data>36 </data>
32</openerp>37</openerp>
3338
=== modified file 'product_list/product_list.py'
--- product_list/product_list.py 2015-09-08 09:32:08 +0000
+++ product_list/product_list.py 2016-01-19 10:40:59 +0000
@@ -89,6 +89,16 @@
89 string='Type',89 string='Type',
90 required=True,90 required=True,
91 ),91 ),
92 'creator': fields.selection(
93 selection=[
94 ('hq', 'HQ'),
95 ('coordo', 'Coordination'),
96 ('project', 'Project'),
97 ('temp', 'Temporary'),
98 ],
99 string='Creator',
100 required=True,
101 ),
92 'description': fields.char(102 'description': fields.char(
93 size=256,103 size=256,
94 string='Description',104 string='Description',
@@ -145,6 +155,7 @@
145155
146 _defaults = {156 _defaults = {
147 'creation_date': lambda *a: time.strftime('%Y-%m-%d'),157 'creation_date': lambda *a: time.strftime('%Y-%m-%d'),
158 'creator': lambda *a: 'temp',
148 }159 }
149160
150 _sql_constraints = [161 _sql_constraints = [
@@ -221,6 +232,18 @@
221 'context': context,232 'context': context,
222 }233 }
223234
235 def set_creator(self, cr, uid, *a, **b):
236 """
237 Called by the patch script - Set the creator of the existing product lists to Project
238 @param cr: Cursor to the database
239 @param uid: ID of the res.users that calls this method
240 @param a: No-named arguments
241 @param b: Named arguments
242 @return: True
243 """
244 list_ids = self.search(cr, uid, [('creator', '=', False)])
245 self.write(cr, uid, list_ids, {'creator': 'temp'})
246
224product_list()247product_list()
225248
226249
227250
=== modified file 'product_list/product_list_view.xml'
--- product_list/product_list_view.xml 2015-09-08 09:32:08 +0000
+++ product_list/product_list_view.xml 2016-01-19 10:40:59 +0000
@@ -64,8 +64,9 @@
64 <field name="ref" />64 <field name="ref" />
65 <field name="name" />65 <field name="name" />
66 <field name="creation_date" />66 <field name="creation_date" />
67 <field name="description" />67 <field name="creator" />
68 <field name="last_update_date" />68 <field name="last_update_date" />
69 <field name="description" colspan="4" />
69 <group colspan="2" col="5">70 <group colspan="2" col="5">
70 <label string="" />71 <label string="" />
71 <field name="standard_list_ok" />72 <field name="standard_list_ok" />
7273
=== modified file 'stock_override/wizard/stock_card_view.xml'
--- stock_override/wizard/stock_card_view.xml 2014-03-14 10:51:54 +0000
+++ stock_override/wizard/stock_card_view.xml 2016-01-19 10:40:59 +0000
@@ -50,6 +50,7 @@
50 </group>50 </group>
51 <field name="perishable" invisible="1" />51 <field name="perishable" invisible="1" />
52 <field name="prodlot_id" attrs="{'invisible': [('perishable', '=', False)]}" readonly="1" />52 <field name="prodlot_id" attrs="{'invisible': [('perishable', '=', False)]}" readonly="1" />
53 <field name="expiry_date" readonly="1" attrs="{'invisible': [('perishable', '=', False)]}" />
53 <separator colspan="4" string="Period" />54 <separator colspan="4" string="Period" />
54 <field name="from_date" readonly="1" />55 <field name="from_date" readonly="1" />
55 <field name="to_date" readonly="1" />56 <field name="to_date" readonly="1" />
5657
=== modified file 'stock_override/wizard/stock_card_wizard.py'
--- stock_override/wizard/stock_card_wizard.py 2015-02-05 16:24:37 +0000
+++ stock_override/wizard/stock_card_wizard.py 2016-01-19 10:40:59 +0000
@@ -38,6 +38,13 @@
38 'perishable': fields.boolean(string='Perishable'),38 'perishable': fields.boolean(string='Perishable'),
39 'prodlot_id': fields.many2one('stock.production.lot',39 'prodlot_id': fields.many2one('stock.production.lot',
40 string='Batch number'),40 string='Batch number'),
41 'expiry_date': fields.related(
42 'prodlot_id',
43 'life_date',
44 type='date',
45 string='Expiry date',
46 readonly=True,
47 ),
41 'from_date': fields.date(string='From date'),48 'from_date': fields.date(string='From date'),
42 'to_date': fields.date(string='To date'),49 'to_date': fields.date(string='To date'),
43 'available_stock': fields.float(digits=(16,2), string='Available stock'),50 'available_stock': fields.float(digits=(16,2), string='Available stock'),

Subscribers

People subscribed via source and target branches