← Back to team overview

avanzosc team mailing list archive

[Merge] lp:~xclude/avanzosc/mrp-6.1 into lp:avanzosc/mrp-6.1

 

Daniel Stenlöv (XCLUDE) has proposed merging lp:~xclude/avanzosc/mrp-6.1 into lp:avanzosc/mrp-6.1.

Requested reviews:
  Avanzosc Manufacturing team (avanzosc-manufactuaring-team)

For more details, see:
https://code.launchpad.net/~xclude/avanzosc/mrp-6.1/+merge/130088

Corrected the merge file for better history.
-- 
https://code.launchpad.net/~xclude/avanzosc/mrp-6.1/+merge/130088
Your team Avanzosc Manufacturing team is requested to review the proposed merge of lp:~xclude/avanzosc/mrp-6.1 into lp:avanzosc/mrp-6.1.
=== modified file 'mrp_advanced_operations/mrp_operations_view.xml'
--- mrp_advanced_operations/mrp_operations_view.xml	2012-10-15 09:01:48 +0000
+++ mrp_advanced_operations/mrp_operations_view.xml	2012-10-17 11:08:20 +0000
@@ -127,7 +127,7 @@
 								attrs="{'invisible': [('state', 'in', 'deliverpick,sent,received,aborted')]}">
 								<field colspan="2" name="move_lines" nolabel="1"
 									widget="one2many_list" mode="tree,form" height="175"
-									domain="[('state','not in', ['draft','waiting','ready','confirmed','assigned'])]">
+									domain="[('state','not in', ('draft','waiting','ready','confirmed','assigned'))]">
 									<tree
 										colors="blue:state in ('draft');black:state in ('picking_except','confirmed','ready','in_production');gray:state in ('cancel','done') "
 										string="Products to Consume">
@@ -140,7 +140,7 @@
 											string="Destination Loc." widget="selection" />
 										<field name="state" />
 										<button type="action" name="%(stock.move_scrap)d"
-											string="Scrap Products" icon="gtk-convert" context="{'scrap': True}"
+											string="Scrap Products" icon="gtk-convert" context="{'scrapped': True}"
 											states="assigned" />
 									</tree>
 								</field>
@@ -148,7 +148,7 @@
 									domain="[('state','in', ('done', 'cancel'))]" widget="one2many_list"
 									mode="tree,form" height="175">
 									<tree
-										colors="blue:state in('draft');black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel') "
+										colors="red:scrapped==True;blue:state in('draft');black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel') "
 										string="Consumed Products" editable="bottom">
 										<field name="product_id" readonly="1" />
 										<field name="product_qty" readonly="1" string="Qty" />
@@ -157,6 +157,7 @@
 											widget="selection" />
 										<field name="location_dest_id" readonly="1"
 											string="Destination Loc." widget="selection" />
+										<field name="scrapped" invisible="1" />
 										<field name="state" />
 									</tree>
 								</field>
@@ -179,7 +180,7 @@
 									domain="[('state','in', ('done', 'cancel'))]" widget="one2many_list"
 									mode="tree,form" height="175">
 									<tree
-										colors="blue:state in('draft');black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') "
+										colors="red:scrapped==True;blue:state in('draft');black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') "
 										string="Finished Products">
 										<field name="product_id" readonly="1" />
 										<field name="product_qty" readonly="1" string="Qty" />
@@ -188,6 +189,7 @@
 											widget="selection" />
 										<field name="location_dest_id" readonly="1"
 											string="Destination Loc." widget="selection" />
+										<field name="scrapped" invisible="1" />
 										<field name="state" />
 										<button type="action" name="%(stock.track_line)d"
 											string="Split in production lots" icon="gtk-justify-fill"
@@ -198,7 +200,7 @@
 								</field>
 							</group>
 							<group colspan="4" col="2" rowspan="6"
-								 attrs="{'invisible': [('state', 'in',('draft','ready','startworking','done','pause','resume','cancel'))]}">
+								attrs="{'invisible': [('state', 'in', ('draft','ready','startworking','done','pause','resume','cancel'))]}">
 								<separator string="Output Picking" colspan="4" />
 								<field name="send_picking_ids" nolabel="1" height="140" />
 								<newline />
@@ -371,8 +373,7 @@
 
 
 		<record id="workcenter_line_resource_gantt" model="ir.ui.view">
-			<field name="name">mrp.production.operation.real.resource.gantt
-			</field>
+			<field name="name">mrp.production.operation.real.resource.gantt</field>
 			<field name="model">mrp.production.operation.real</field>
 			<field name="type">gantt</field>
 			<field name="arch" type="xml">

=== modified file 'mrp_advanced_operations/wizard/partial_produce.py'
--- mrp_advanced_operations/wizard/partial_produce.py	2012-10-15 09:01:48 +0000
+++ mrp_advanced_operations/wizard/partial_produce.py	2012-10-17 11:08:20 +0000
@@ -22,9 +22,6 @@
 from tools.translate import _
 import time
 
-    
-
-
 class partial_produce(osv.osv_memory):
     _name = "partial.produce"
     _description = "Partial Production"
@@ -36,7 +33,6 @@
         'partial_semi_prod_loc': fields.many2one('stock.location', 'Location'),
         'partial_consumed_ids': fields.one2many('parcial.consumed.aux', 'wizard_id', 'Consumed Moves'),
         'partial_finished_ids': fields.one2many('parcial.finished.aux', 'wizard_id', 'Finished Moves'),
-        #'line_ids': fields.one2many('stock.move.split.lines', 'wizard_id', 'Production Lots'),
     }  
     
     def default_get(self, cr, uid, fields, context=None):
@@ -186,7 +182,7 @@
         return {'type': 'ir.actions.act_window', 'res_model': 'partial.produce', 'view_type': 'form', 'view_mode': 'form', 'target': 'new', 'context':context}
     
 partial_produce()
-    
+
 class parcial_finished_aux(osv.osv_memory):
     _name = "parcial.finished.aux"
     
@@ -198,9 +194,10 @@
             'product_uom': fields.many2one('product.uom', 'UOM', required=True),
             'location_id': fields.many2one('stock.location', 'Location', required=True),
             'wizard_id': fields.many2one('partial.produce', 'wizard'),
-        #'wizard_id': fields.many2one('stock.move.split', 'Parent Wizard'),
             }
     
+parcial_finished_aux()
+
 class parcial_consumed_aux(osv.osv_memory):
     _name = "parcial.consumed.aux"
     
@@ -212,4 +209,8 @@
             'product_uom': fields.many2one('product.uom', 'UOM', required=True),
             'location_id': fields.many2one('stock.location', 'Location', required=True),
             'wizard_id': fields.many2one('partial.produce', 'wizard'),
-            }
\ No newline at end of file
+            }
+    
+parcial_consumed_aux()
+
+

=== modified file 'mrp_master_extension/mrp_production.py'
--- mrp_master_extension/mrp_production.py	2012-10-15 09:01:48 +0000
+++ mrp_master_extension/mrp_production.py	2012-10-17 11:08:20 +0000
@@ -273,12 +273,12 @@
 class mrp_production(osv.osv):
     _inherit = "mrp.production"    
     _columns = {
-            'bom_id': fields.many2one('mrp.bom', 'Bill of Material', readonly=True, states={'draft': [('readonly', False)]}, domain=[('bom_id','=',False)]),
+            'bom_id': fields.many2one('mrp.bom', 'Bill of Material', readonly=True, states={'draft': [('readonly', False)]}, domain=[('bom_id', '=', False)]),
             'routing_id': fields.many2one('mrp.routing', 'Routing', on_delete='set null', readonly=True, help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production plannification."),
-            'production_operation_ids': fields.one2many('mrp.production.operation', 'production_id', 'Production Operations', readonly=True, states={'draft':[('readonly',False)]}),
-            'product_lines': fields.one2many('mrp.production.product.line', 'production_id', 'Scheduled goods', readonly=True, states={'draft':[('readonly',False)]}),
-            'production_final_product_ids': fields.one2many('mrp.production.final.product', 'production_id', 'Production Final Products', readonly=True, states={'draft':[('readonly',False)]}),
-            'user_ops': fields.one2many('mrp.production.users', 'prod', 'Users asignments', readonly=True, states={'draft':[('readonly',False)]}),
+            'production_operation_ids': fields.one2many('mrp.production.operation', 'production_id', 'Production Operations', readonly=True, states={'draft':[('readonly', False)]}),
+            'product_lines': fields.one2many('mrp.production.product.line', 'production_id', 'Scheduled goods', readonly=True, states={'draft':[('readonly', False)]}),
+            'production_final_product_ids': fields.one2many('mrp.production.final.product', 'production_id', 'Production Final Products', readonly=True, states={'draft':[('readonly', False)]}),
+            'user_ops': fields.one2many('mrp.production.users', 'prod', 'Users asignments', readonly=True, states={'draft':[('readonly', False)]}),
             'product_def_loc': fields.many2one('stock.location', 'Default Location', required=True, readonly=True, states={'draft':[('readonly',False)]}, help='Default real location of the product'),
             'location_src_id': fields.many2one('stock.location', 'Raw Materials Location', required=False,),
             'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', required=False,),
@@ -530,7 +530,6 @@
                             'product_uos': line.product_uos and production.product_uos.id or False,
                             'location_id': line.product_id.default_location.id,
                             'procure_method': line.product_id.procure_method,
-#                            'move_id': move_id,
                             'company_id': production.company_id.id,
                         })
                         wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_confirm', cr)


Follow ups