diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index dd7552dec86..fa97b5d0d73 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -484,7 +484,23 @@
-
+
+
+
+
+
+
+
+
+
+
+
@@ -561,35 +577,6 @@
-
- mrp.production.workcenter.line.form
- mrp.production.workcenter.line
- form
-
-
-
-
-
- mrp.production.workcenter.line.tree
- mrp.production.workcenter.line
- tree
-
-
-
-
-
-
-
-
-
-
-
mrp.production.lot.line.form
mrp.production.lot.line
diff --git a/addons/mrp_operations/__init__.py b/addons/mrp_operations/__init__.py
old mode 100755
new mode 100644
diff --git a/addons/mrp_operations/__terp__.py b/addons/mrp_operations/__terp__.py
old mode 100755
new mode 100644
diff --git a/addons/mrp_operations/mrp_operation_data.xml b/addons/mrp_operations/mrp_operation_data.xml
old mode 100755
new mode 100644
diff --git a/addons/mrp_operations/mrp_operations.py b/addons/mrp_operations/mrp_operations.py
old mode 100755
new mode 100644
index d8014b19f17..93ce9ec56fe
--- a/addons/mrp_operations/mrp_operations.py
+++ b/addons/mrp_operations/mrp_operations.py
@@ -40,14 +40,13 @@ from mx import DateTime
class mrp_production_workcenter_line(osv.osv):
_inherit = 'mrp.production.workcenter.line'
- _name = 'mrp.production.workcenter.line'
- _description = 'Production workcenters used'
_columns = {
'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Canceled'),('done','Finished')],'Status', readonly=True),
'date_planned': fields.related('production_id', 'date_planned', type='datetime', string='Date Planned'),
'date_start': fields.datetime('Start Date'),
'date_finnished': fields.datetime('End Date'),
'delay': fields.char('Delay',size=128,help="This is delay between operation start and stop in this workcenter",readonly=True),
+ 'production_state':fields.related('production_id','state',type='char',string='Prod.State'),
'product':fields.related('production_id','product_id',type='many2one',relation='product.product',string='Product'),
'qty':fields.related('production_id','product_qty',type='float',string='Qty'),
'uom':fields.related('production_id','product_uom',type='many2one',relation='product.uom',string='UOM'),
@@ -60,9 +59,12 @@ class mrp_production_workcenter_line(osv.osv):
def modify_production_order_state(self,cr,uid,ids,action):
wf_service = netsvc.LocalService("workflow")
oper_obj=self.browse(cr,uid,ids)[0]
- prod_obj=self.pool.get('mrp.production').browse(cr,uid,[oper_obj.production_id.id])[0]
+ prod_obj=oper_obj.production_id
if action=='start':
- if prod_obj.state =='ready':
+ if prod_obj.state =='confirmed':
+ self.pool.get('mrp.production').force_production(cr, uid, [prod_obj.id])
+ wf_service.trg_validate(uid, 'mrp.production', prod_obj.id, 'button_produce', cr)
+ elif prod_obj.state =='ready':
wf_service.trg_validate(uid, 'mrp.production', prod_obj.id, 'button_produce', cr)
elif prod_obj.state =='in_production':
return
diff --git a/addons/mrp_operations/mrp_operations_report.xml b/addons/mrp_operations/mrp_operations_report.xml
old mode 100755
new mode 100644
diff --git a/addons/mrp_operations/mrp_operations_view.xml b/addons/mrp_operations/mrp_operations_view.xml
old mode 100755
new mode 100644
index 1a84e3cfcf8..6d0ac9bcee3
--- a/addons/mrp_operations/mrp_operations_view.xml
+++ b/addons/mrp_operations/mrp_operations_view.xml
@@ -3,30 +3,39 @@
- mrp.production.workcenter.line.inherit.tree
+ mrp.production.workcenter.line.tree
mrp.production.workcenter.line
-
tree
+
-
-
+
+
+
+
+
+
-
+
- mrp.production.workcenter.line.form.inherit
+ mrp.production.workcenter.line.form
mrp.production.workcenter.line
form
-
+
-
+
+
@@ -72,7 +81,7 @@
- Work Order
+ Work Orders
ir.actions.act_window
mrp.production.workcenter.line
form
@@ -83,7 +92,7 @@
- All Work Order
+ All Work Orders
ir.actions.act_window
mrp.production.workcenter.line
form
@@ -93,18 +102,18 @@
- Confirm Work Order
+ Confirmed Work Orders
ir.actions.act_window
mrp.production.workcenter.line
form
tree,form,graph,gantt,calendar
- [('state','=','confirm')]
+ [('production_state','=','ready')]
- Draft Work Order
+ Future Work Orders
ir.actions.act_window
mrp.production.workcenter.line
form
@@ -115,15 +124,15 @@
- Work Order
+ Work Orders
-
+
-
+
diff --git a/addons/mrp_operations/mrp_operations_workflow.xml b/addons/mrp_operations/mrp_operations_workflow.xml
old mode 100755
new mode 100644