Merge lp:~openerp-community/openobject-addons/addons-fix-finnished into lp:openobject-addons

Proposed by Niels Huylebroeck
Status: Merged
Merged at revision: 4283
Proposed branch: lp:~openerp-community/openobject-addons/addons-fix-finnished
Merge into: lp:openobject-addons
Diff against target: 261 lines (+26/-26)
11 files modified
mrp/mrp.py (+2/-2)
mrp/mrp_view.xml (+2/-2)
mrp/report/mrp_production_order.py (+3/-3)
mrp/report/mrp_production_order_view.xml (+1/-1)
mrp_operations/mrp_operations.py (+8/-8)
mrp_operations/mrp_operations_view.xml (+2/-2)
procurement/procurement.py (+3/-3)
procurement/procurement_workflow.xml (+1/-1)
sale/process/sale_process.xml (+1/-1)
stock/stock.py (+1/-1)
stock/stock_workflow.xml (+2/-2)
To merge this branch: bzr merge lp:~openerp-community/openobject-addons/addons-fix-finnished
Reviewer Review Type Date Requested Status
Borja López Soilán (NeoPolus) (community) Needs Fixing
OpenERP Core Team Pending
Review via email: mp+35523@code.launchpad.net

Description of the change

I have not included translation updates in this merge as I believe they are generated automatically by Launchpad ?

To post a comment you must log in.
Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

You should update the translation templates (*.pot) files at least, otherwise the new terms wouldn't be translatable in Launchpad (the translation templates are exported from OpenERP or edited by hand, Launchpad only imports them).

But it would be better to translate the source terms of the *.po files too! (So the translators don't have to do it by hand).

Otherwise I think it is a good idea to rename those fields.

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mrp/mrp.py'
2--- mrp/mrp.py 2010-09-08 04:30:24 +0000
3+++ mrp/mrp.py 2010-09-15 12:06:17 +0000
4@@ -450,7 +450,7 @@
5 'date_planned_date': fields.function(_production_date, method=True, type='date', string='Scheduled Date'),
6 'date_planned': fields.datetime('Scheduled date', required=True, select=1),
7 'date_start': fields.datetime('Start Date'),
8- 'date_finnished': fields.datetime('End Date'),
9+ 'date_finished': fields.datetime('End Date'),
10
11 'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)]),
12 'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', help="The list of operations (list of workcenters) to produce the finished product. The routing is mainly used to compute workcenter costs during operations and to plan future loads on workcenters based on production plannification."),
13@@ -652,7 +652,7 @@
14 """
15 for production in self.browse(cr, uid, ids):
16 self._costs_generate(cr, uid, production)
17- return self.write(cr, uid, ids, {'state': 'done', 'date_finnished': time.strftime('%Y-%m-%d %H:%M:%S')})
18+ return self.write(cr, uid, ids, {'state': 'done', 'date_finished': time.strftime('%Y-%m-%d %H:%M:%S')})
19
20 def test_production_done(self, cr, uid, ids):
21 """ Tests whether production is done or not.
22
23=== modified file 'mrp/mrp_view.xml'
24--- mrp/mrp_view.xml 2010-09-13 16:26:41 +0000
25+++ mrp/mrp_view.xml 2010-09-15 12:06:17 +0000
26@@ -530,7 +530,7 @@
27 <field name="model">mrp.production</field>
28 <field name="type">gantt</field>
29 <field name="arch" type="xml">
30- <gantt color="product_id" date_stop="date_finnished" date_start="date_start" string="Productions">
31+ <gantt color="product_id" date_stop="date_finished" date_start="date_start" string="Productions">
32 <level object="mrp.routing" link="routing_id" domain="[]">
33 <field name="name"/>
34 <field name="origin"/>
35@@ -696,7 +696,7 @@
36 <field name="priority" groups="base.group_extended"/>
37 <newline/>
38 <field name="date_start"/>
39- <field name="date_finnished"/>
40+ <field name="date_finished"/>
41 <field name="picking_id" groups="base.group_extended"/>
42 <field name="move_prod_id" groups="base.group_extended"/>
43 </page>
44
45=== modified file 'mrp/report/mrp_production_order.py'
46--- mrp/report/mrp_production_order.py 2010-08-05 10:20:52 +0000
47+++ mrp/report/mrp_production_order.py 2010-09-15 12:06:17 +0000
48@@ -51,7 +51,7 @@
49 'date_planned':fields.date('Scheduled Date'),
50 'location_src_id': fields.many2one('stock.location', 'Raw Materials Location', readonly=True),
51 'date_start': fields.datetime('Start Date',readonly=True),
52- 'date_finnished': fields.datetime('End Date',readonly=True),
53+ 'date_finished': fields.datetime('End Date',readonly=True),
54 'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', readonly=True),
55 'company_id': fields.many2one('res.company','Company',readonly=True),
56 'bom_id': fields.many2one('mrp.bom', 'Bill of Material',readonly=True),
57@@ -100,7 +100,7 @@
58 s.routing_id,
59 s.picking_id,
60 s.date_start,
61- s.date_finnished,
62+ s.date_finished,
63 to_date(to_char(s.date_planned, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_planned,
64 s.origin,
65 s.priority,
66@@ -128,7 +128,7 @@
67 to_date(to_char(s.date_planned, 'dd-MM-YYYY'),'dd-MM-YYYY'),
68 s.origin,
69 s.date_start,
70- s.date_finnished,
71+ s.date_finished,
72 s.company_id
73 )""")
74 mrp_production_order()
75
76=== modified file 'mrp/report/mrp_production_order_view.xml'
77--- mrp/report/mrp_production_order_view.xml 2010-07-30 11:04:14 +0000
78+++ mrp/report/mrp_production_order_view.xml 2010-09-15 12:06:17 +0000
79@@ -97,7 +97,7 @@
80 <newline/>
81 <field name="date_start"/>
82 <field name="date_planned"/>
83- <field name="date_finnished"/>
84+ <field name="date_finished"/>
85 </group>
86 </search>
87 </field>
88
89=== modified file 'mrp_operations/mrp_operations.py'
90--- mrp_operations/mrp_operations.py 2010-09-07 06:33:16 +0000
91+++ mrp_operations/mrp_operations.py 2010-09-15 12:06:17 +0000
92@@ -85,7 +85,7 @@
93 'date_planned': fields.datetime('Scheduled Date'),
94 'date_planned_end': fields.function(_get_date_end, method=True, string='End Date', type='datetime'),
95 'date_start': fields.datetime('Start Date'),
96- 'date_finnished': fields.datetime('End Date'),
97+ 'date_finished': fields.datetime('End Date'),
98 'delay': fields.float('Working Hours',help="This is lead time between operation start and stop in this workcenter",readonly=True),
99 'production_state':fields.related('production_id','state',
100 type='selection',
101@@ -171,7 +171,7 @@
102 delay += (date_finished-date_start).days * 24
103 delay += (date_finished-date_start).seconds / float(60*60)
104
105- self.write(cr, uid, ids, {'state':'done', 'date_finnished': date_now,'delay':delay})
106+ self.write(cr, uid, ids, {'state':'done', 'date_finished': date_now,'delay':delay})
107 self.modify_production_order_state(cr,uid,ids,'done')
108 return True
109
110@@ -280,7 +280,7 @@
111 dt_end = DateTime.strptime(wc.date_planned_end, '%Y-%m-%d %H:%M:%S')
112 old = wc.sequence or 0
113 super(mrp_production, self).write(cr, uid, [po.id], {
114- 'date_finnished': dt_end
115+ 'date_finished': dt_end
116 })
117 return dt_end
118
119@@ -298,7 +298,7 @@
120 if l.state in ('done','cancel','draft'):
121 continue
122 todo += l.move_dest_id_lines
123- if l.production_id and (l.production_id.date_finnished > dt):
124+ if l.production_id and (l.production_id.date_finished > dt):
125 if l.production_id.state not in ('done','cancel'):
126 for wc in l.production_id.workcenter_lines:
127 i = self.pool.get('resource.calendar').interval_min_get(
128@@ -327,8 +327,8 @@
129 break
130 if l.production_id.state in ('done','cancel'):
131 break
132- if l.production_id and (l.production_id.date_start < po.date_finnished):
133- self.write(cr, uid, [l.production_id.id], {'date_start': po.date_finnished})
134+ if l.production_id and (l.production_id.date_start < po.date_finished):
135+ self.write(cr, uid, [l.production_id.id], {'date_start': po.date_finished})
136 break
137
138
139@@ -503,7 +503,7 @@
140 if code.start_stop=='done':
141 tmp=self.pool.get('mrp.production.workcenter.line').action_done(cr,uid,wc_op_id)
142 wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_done', cr)
143- self.pool.get('mrp.production').write(cr,uid,vals['production_id'],{'date_finnished':DateTime.now().strftime('%Y-%m-%d %H:%M:%S')})
144+ self.pool.get('mrp.production').write(cr,uid,vals['production_id'],{'date_finished':DateTime.now().strftime('%Y-%m-%d %H:%M:%S')})
145
146 if code.start_stop=='pause':
147 tmp=self.pool.get('mrp.production.workcenter.line').action_pause(cr,uid,wc_op_id)
148@@ -524,7 +524,7 @@
149 line_vals['delay'] = delay
150 if vals.get('date_start',False):
151 if code.start_stop == 'done':
152- line_vals['date_finnished'] = vals['date_start']
153+ line_vals['date_finished'] = vals['date_start']
154 elif code.start_stop == 'start':
155 line_vals['date_start'] = vals['date_start']
156
157
158=== modified file 'mrp_operations/mrp_operations_view.xml'
159--- mrp_operations/mrp_operations_view.xml 2010-09-07 06:33:16 +0000
160+++ mrp_operations/mrp_operations_view.xml 2010-09-15 12:06:17 +0000
161@@ -101,7 +101,7 @@
162 <group colspan="2" col="2">
163 <separator string="Real" colspan="2"/>
164 <field name="date_start" readonly="1"/>
165- <field name="date_finnished" readonly="1"/>
166+ <field name="date_finished" readonly="1"/>
167 <field name="delay" widget="float_time"/>
168 </group>
169 <group colspan="2" col="2">
170@@ -170,7 +170,7 @@
171 <field name="model">mrp.production.workcenter.line</field>
172 <field name="type">calendar</field>
173 <field name="arch" type="xml">
174- <calendar color="product" date_stop="date_finnished" date_start="date_start" string="Operations">
175+ <calendar color="product" date_stop="date_finished" date_start="date_start" string="Operations">
176 <field name="workcenter_id"/>
177 <field name="production_id"/>
178 </calendar>
179
180=== modified file 'procurement/procurement.py'
181--- procurement/procurement.py 2010-09-07 07:49:46 +0000
182+++ procurement/procurement.py 2010-09-15 12:06:17 +0000
183@@ -440,7 +440,7 @@
184 wf_service.trg_trigger(uid, 'procurement.order', id, cr)
185 return True
186
187- def action_check_finnished(self, cr, uid, ids):
188+ def action_check_finished(self, cr, uid, ids):
189 return self.check_move_done(cr, uid, ids)
190
191 def action_check(self, cr, uid, ids):
192@@ -493,9 +493,9 @@
193 class StockPicking(osv.osv):
194 _inherit = 'stock.picking'
195
196- def test_finnished(self, cursor, user, ids):
197+ def test_finished(self, cursor, user, ids):
198 wf_service = netsvc.LocalService("workflow")
199- res = super(StockPicking, self).test_finnished(cursor, user, ids)
200+ res = super(StockPicking, self).test_finished(cursor, user, ids)
201 for picking in self.browse(cursor, user, ids):
202 for move in picking.move_lines:
203 if move.state == 'done' and move.procurements:
204
205=== modified file 'procurement/procurement_workflow.xml'
206--- procurement/procurement_workflow.xml 2010-09-01 21:53:24 +0000
207+++ procurement/procurement_workflow.xml 2010-09-15 12:06:17 +0000
208@@ -187,7 +187,7 @@
209 <record id="trans_make_done_done" model="workflow.transition">
210 <field name="act_from" ref="act_make_done"/>
211 <field name="act_to" ref="act_done"/>
212- <field name="condition">action_check_finnished()</field>
213+ <field name="condition">action_check_finished()</field>
214 <field name="trigger_model">stock.move</field>
215 <field name="trigger_expr_id">[move_id.id]</field>
216 </record>
217
218=== modified file 'sale/process/sale_process.xml'
219--- sale/process/sale_process.xml 2010-08-17 06:27:57 +0000
220+++ sale/process/sale_process.xml 2010-09-15 12:06:17 +0000
221@@ -261,7 +261,7 @@
222 </record>
223
224 <record id="process_transition_action_validate0" model="process.transition.action">
225- <field eval="&quot;&quot;&quot;test_finnished&quot;&quot;&quot;" name="action"/>
226+ <field eval="&quot;&quot;&quot;test_finished&quot;&quot;&quot;" name="action"/>
227 <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
228 <field eval="&quot;&quot;&quot;Validate&quot;&quot;&quot;" name="name"/>
229 <field name="transition_id" ref="process_transition_deliver0"/>
230
231=== modified file 'stock/stock.py'
232--- stock/stock.py 2010-09-07 13:20:08 +0000
233+++ stock/stock.py 2010-09-15 12:06:17 +0000
234@@ -786,7 +786,7 @@
235 self.log_picking(cr, uid, ids, context=context)
236 return True
237
238- def test_finnished(self, cr, uid, ids):
239+ def test_finished(self, cr, uid, ids):
240 """ Tests whether the move is in done or cancel state or not.
241 @return: True or False
242 """
243
244=== modified file 'stock/stock_workflow.xml'
245--- stock/stock_workflow.xml 2010-07-06 12:05:45 +0000
246+++ stock/stock_workflow.xml 2010-09-15 12:06:17 +0000
247@@ -86,12 +86,12 @@
248 <record id="trans_move_done" model="workflow.transition">
249 <field name="act_from" ref="act_move"/>
250 <field name="act_to" ref="act_done"/>
251- <field name="condition">test_finnished()</field>
252+ <field name="condition">test_finished()</field>
253 </record>
254 <record id="trans_move_confirmed" model="workflow.transition">
255 <field name="act_from" ref="act_move"/>
256 <field name="act_to" ref="act_confirmed"/>
257- <field name="condition">not test_finnished()</field>
258+ <field name="condition">not test_finished()</field>
259 </record>
260 <record id="trans_assigned_cancel" model="workflow.transition">
261 <field name="act_from" ref="act_assigned"/>

Subscribers

People subscribed via source and target branches

to all changes: