[IMP] mrp_operations: Small Improvements in views.

bzr revid: uco@tinyerp.com-20100907063316-jlfdutl8yb2ym3id
This commit is contained in:
uco (Open ERP)
2010-09-07 12:03:16 +05:30
parent 386aee4aeb
commit 615e10cc4a
2 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -75,7 +75,7 @@ class mrp_production_workcenter_line(osv.osv):
_order = "sequence, date_planned"
_columns = {
'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Canceled'),('done','Finished')],'State', readonly=True,
'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Cancelled'),('done','Finished')],'State', readonly=True,
help="* When a work order is created it is set in 'Draft' state.\n" \
"* When user sets work order in start mode that time it will be set in 'In Progress' state.\n" \
"* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pause' state.\n" \
@@ -93,7 +93,7 @@ class mrp_production_workcenter_line(osv.osv):
string='Production State', readonly=True),
'product':fields.related('production_id','product_id',type='many2one',relation='product.product',string='Product',
readonly=True),
'qty':fields.related('production_id','product_qty',type='float',string='Qty',readonly=True),
'qty':fields.related('production_id','product_qty',type='float',string='Qty',readonly=True, store=True),
'uom':fields.related('production_id','product_uom',type='many2one',relation='product.uom',string='UOM',readonly=True),
}
@@ -263,7 +263,7 @@ class mrp_production(osv.osv):
dt = dt_end
if context.get('__last_update'):
del context['__last_update']
if (wc.date_planned<dt.strftime('%Y-%m-%d %H:%M:%S')) or mini:
if (wc.date_planned < dt.strftime('%Y-%m-%d %H:%M:%S')) or mini:
self.pool.get('mrp.production.workcenter.line').write(cr, uid, [wc.id], {
'date_planned':dt.strftime('%Y-%m-%d %H:%M:%S')
}, context=context, update=False)
@@ -60,12 +60,12 @@
<field name="cycle"/>
<field name="hour"/>
<field name="state" />
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/>
<button name="button_start_working" string="Start" states="draft" icon="gtk-go-forward"/>
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel"/>
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause"/>
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok"/>
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert" help="Set to Draft"/>
<button name="button_start_working" string="Start" states="draft" icon="gtk-go-forward" help="Start Working"/>
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause" help="Resume Work Order"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel" help="Cancel Order"/>
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause" help="Pause Work Order"/>
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok" help="Finish Order"/>
</tree>
</field>
</record>