[FIX] Removed all code and XML mentions of "finnished", as it's written "finished" (Bug #326160)
bzr revid: niels@bubbles-it.be-20100915115812-j6lec74or0y61psp
This commit is contained in:
+2
-2
@@ -450,7 +450,7 @@ class mrp_production(osv.osv):
|
||||
'date_planned_date': fields.function(_production_date, method=True, type='date', string='Scheduled Date'),
|
||||
'date_planned': fields.datetime('Scheduled date', required=True, select=1),
|
||||
'date_start': fields.datetime('Start Date'),
|
||||
'date_finnished': fields.datetime('End Date'),
|
||||
'date_finished': fields.datetime('End Date'),
|
||||
|
||||
'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)]),
|
||||
'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."),
|
||||
@@ -652,7 +652,7 @@ class mrp_production(osv.osv):
|
||||
"""
|
||||
for production in self.browse(cr, uid, ids):
|
||||
self._costs_generate(cr, uid, production)
|
||||
return self.write(cr, uid, ids, {'state': 'done', 'date_finnished': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
return self.write(cr, uid, ids, {'state': 'done', 'date_finished': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
|
||||
def test_production_done(self, cr, uid, ids):
|
||||
""" Tests whether production is done or not.
|
||||
|
||||
@@ -530,7 +530,7 @@
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="type">gantt</field>
|
||||
<field name="arch" type="xml">
|
||||
<gantt color="product_id" date_stop="date_finnished" date_start="date_start" string="Productions">
|
||||
<gantt color="product_id" date_stop="date_finished" date_start="date_start" string="Productions">
|
||||
<level object="mrp.routing" link="routing_id" domain="[]">
|
||||
<field name="name"/>
|
||||
<field name="origin"/>
|
||||
@@ -696,7 +696,7 @@
|
||||
<field name="priority" groups="base.group_extended"/>
|
||||
<newline/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_finnished"/>
|
||||
<field name="date_finished"/>
|
||||
<field name="picking_id" groups="base.group_extended"/>
|
||||
<field name="move_prod_id" groups="base.group_extended"/>
|
||||
</page>
|
||||
|
||||
@@ -51,7 +51,7 @@ class mrp_production_order(osv.osv):
|
||||
'date_planned':fields.date('Scheduled Date'),
|
||||
'location_src_id': fields.many2one('stock.location', 'Raw Materials Location', readonly=True),
|
||||
'date_start': fields.datetime('Start Date',readonly=True),
|
||||
'date_finnished': fields.datetime('End Date',readonly=True),
|
||||
'date_finished': fields.datetime('End Date',readonly=True),
|
||||
'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', readonly=True),
|
||||
'company_id': fields.many2one('res.company','Company',readonly=True),
|
||||
'bom_id': fields.many2one('mrp.bom', 'Bill of Material',readonly=True),
|
||||
@@ -100,7 +100,7 @@ class mrp_production_order(osv.osv):
|
||||
s.routing_id,
|
||||
s.picking_id,
|
||||
s.date_start,
|
||||
s.date_finnished,
|
||||
s.date_finished,
|
||||
to_date(to_char(s.date_planned, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_planned,
|
||||
s.origin,
|
||||
s.priority,
|
||||
@@ -128,7 +128,7 @@ class mrp_production_order(osv.osv):
|
||||
to_date(to_char(s.date_planned, 'dd-MM-YYYY'),'dd-MM-YYYY'),
|
||||
s.origin,
|
||||
s.date_start,
|
||||
s.date_finnished,
|
||||
s.date_finished,
|
||||
s.company_id
|
||||
)""")
|
||||
mrp_production_order()
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<newline/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="date_finnished"/>
|
||||
<field name="date_finished"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -85,7 +85,7 @@ class mrp_production_workcenter_line(osv.osv):
|
||||
'date_planned': fields.datetime('Scheduled Date'),
|
||||
'date_planned_end': fields.function(_get_date_end, method=True, string='End Date', type='datetime'),
|
||||
'date_start': fields.datetime('Start Date'),
|
||||
'date_finnished': fields.datetime('End Date'),
|
||||
'date_finished': fields.datetime('End Date'),
|
||||
'delay': fields.float('Working Hours',help="This is lead time between operation start and stop in this workcenter",readonly=True),
|
||||
'production_state':fields.related('production_id','state',
|
||||
type='selection',
|
||||
@@ -171,7 +171,7 @@ class mrp_production_workcenter_line(osv.osv):
|
||||
delay += (date_finished-date_start).days * 24
|
||||
delay += (date_finished-date_start).seconds / float(60*60)
|
||||
|
||||
self.write(cr, uid, ids, {'state':'done', 'date_finnished': date_now,'delay':delay})
|
||||
self.write(cr, uid, ids, {'state':'done', 'date_finished': date_now,'delay':delay})
|
||||
self.modify_production_order_state(cr,uid,ids,'done')
|
||||
return True
|
||||
|
||||
@@ -280,7 +280,7 @@ class mrp_production(osv.osv):
|
||||
dt_end = DateTime.strptime(wc.date_planned_end, '%Y-%m-%d %H:%M:%S')
|
||||
old = wc.sequence or 0
|
||||
super(mrp_production, self).write(cr, uid, [po.id], {
|
||||
'date_finnished': dt_end
|
||||
'date_finished': dt_end
|
||||
})
|
||||
return dt_end
|
||||
|
||||
@@ -298,7 +298,7 @@ class mrp_production(osv.osv):
|
||||
if l.state in ('done','cancel','draft'):
|
||||
continue
|
||||
todo += l.move_dest_id_lines
|
||||
if l.production_id and (l.production_id.date_finnished > dt):
|
||||
if l.production_id and (l.production_id.date_finished > dt):
|
||||
if l.production_id.state not in ('done','cancel'):
|
||||
for wc in l.production_id.workcenter_lines:
|
||||
i = self.pool.get('resource.calendar').interval_min_get(
|
||||
@@ -327,8 +327,8 @@ class mrp_production(osv.osv):
|
||||
break
|
||||
if l.production_id.state in ('done','cancel'):
|
||||
break
|
||||
if l.production_id and (l.production_id.date_start < po.date_finnished):
|
||||
self.write(cr, uid, [l.production_id.id], {'date_start': po.date_finnished})
|
||||
if l.production_id and (l.production_id.date_start < po.date_finished):
|
||||
self.write(cr, uid, [l.production_id.id], {'date_start': po.date_finished})
|
||||
break
|
||||
|
||||
|
||||
@@ -503,7 +503,7 @@ class mrp_operations_operation(osv.osv):
|
||||
if code.start_stop=='done':
|
||||
tmp=self.pool.get('mrp.production.workcenter.line').action_done(cr,uid,wc_op_id)
|
||||
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_done', cr)
|
||||
self.pool.get('mrp.production').write(cr,uid,vals['production_id'],{'date_finnished':DateTime.now().strftime('%Y-%m-%d %H:%M:%S')})
|
||||
self.pool.get('mrp.production').write(cr,uid,vals['production_id'],{'date_finished':DateTime.now().strftime('%Y-%m-%d %H:%M:%S')})
|
||||
|
||||
if code.start_stop=='pause':
|
||||
tmp=self.pool.get('mrp.production.workcenter.line').action_pause(cr,uid,wc_op_id)
|
||||
@@ -524,7 +524,7 @@ class mrp_operations_operation(osv.osv):
|
||||
line_vals['delay'] = delay
|
||||
if vals.get('date_start',False):
|
||||
if code.start_stop == 'done':
|
||||
line_vals['date_finnished'] = vals['date_start']
|
||||
line_vals['date_finished'] = vals['date_start']
|
||||
elif code.start_stop == 'start':
|
||||
line_vals['date_start'] = vals['date_start']
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Real" colspan="2"/>
|
||||
<field name="date_start" readonly="1"/>
|
||||
<field name="date_finnished" readonly="1"/>
|
||||
<field name="date_finished" readonly="1"/>
|
||||
<field name="delay" widget="float_time"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
@@ -170,7 +170,7 @@
|
||||
<field name="model">mrp.production.workcenter.line</field>
|
||||
<field name="type">calendar</field>
|
||||
<field name="arch" type="xml">
|
||||
<calendar color="product" date_stop="date_finnished" date_start="date_start" string="Operations">
|
||||
<calendar color="product" date_stop="date_finished" date_start="date_start" string="Operations">
|
||||
<field name="workcenter_id"/>
|
||||
<field name="production_id"/>
|
||||
</calendar>
|
||||
|
||||
@@ -440,7 +440,7 @@ class procurement_order(osv.osv):
|
||||
wf_service.trg_trigger(uid, 'procurement.order', id, cr)
|
||||
return True
|
||||
|
||||
def action_check_finnished(self, cr, uid, ids):
|
||||
def action_check_finished(self, cr, uid, ids):
|
||||
return self.check_move_done(cr, uid, ids)
|
||||
|
||||
def action_check(self, cr, uid, ids):
|
||||
@@ -493,9 +493,9 @@ procurement_order()
|
||||
class StockPicking(osv.osv):
|
||||
_inherit = 'stock.picking'
|
||||
|
||||
def test_finnished(self, cursor, user, ids):
|
||||
def test_finished(self, cursor, user, ids):
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
res = super(StockPicking, self).test_finnished(cursor, user, ids)
|
||||
res = super(StockPicking, self).test_finished(cursor, user, ids)
|
||||
for picking in self.browse(cursor, user, ids):
|
||||
for move in picking.move_lines:
|
||||
if move.state == 'done' and move.procurements:
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
<record id="trans_make_done_done" model="workflow.transition">
|
||||
<field name="act_from" ref="act_make_done"/>
|
||||
<field name="act_to" ref="act_done"/>
|
||||
<field name="condition">action_check_finnished()</field>
|
||||
<field name="condition">action_check_finished()</field>
|
||||
<field name="trigger_model">stock.move</field>
|
||||
<field name="trigger_expr_id">[move_id.id]</field>
|
||||
</record>
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
</record>
|
||||
|
||||
<record id="process_transition_action_validate0" model="process.transition.action">
|
||||
<field eval=""""test_finnished"""" name="action"/>
|
||||
<field eval=""""test_finished"""" name="action"/>
|
||||
<field eval=""""object"""" name="state"/>
|
||||
<field eval=""""Validate"""" name="name"/>
|
||||
<field name="transition_id" ref="process_transition_deliver0"/>
|
||||
|
||||
@@ -786,7 +786,7 @@ class stock_picking(osv.osv):
|
||||
self.log_picking(cr, uid, ids, context=context)
|
||||
return True
|
||||
|
||||
def test_finnished(self, cr, uid, ids):
|
||||
def test_finished(self, cr, uid, ids):
|
||||
""" Tests whether the move is in done or cancel state or not.
|
||||
@return: True or False
|
||||
"""
|
||||
|
||||
@@ -86,12 +86,12 @@
|
||||
<record id="trans_move_done" model="workflow.transition">
|
||||
<field name="act_from" ref="act_move"/>
|
||||
<field name="act_to" ref="act_done"/>
|
||||
<field name="condition">test_finnished()</field>
|
||||
<field name="condition">test_finished()</field>
|
||||
</record>
|
||||
<record id="trans_move_confirmed" model="workflow.transition">
|
||||
<field name="act_from" ref="act_move"/>
|
||||
<field name="act_to" ref="act_confirmed"/>
|
||||
<field name="condition">not test_finnished()</field>
|
||||
<field name="condition">not test_finished()</field>
|
||||
</record>
|
||||
<record id="trans_assigned_cancel" model="workflow.transition">
|
||||
<field name="act_from" ref="act_assigned"/>
|
||||
|
||||
Reference in New Issue
Block a user