← 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:
  Angel Moya - Domatix (angelmoya)

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

Added Role Access Control to mrp_advanced_operations. Added the new kanban view, this need to be approved. Added Operation Graph. Minor bugfixes and cleaned up some code.
-- 
https://code.launchpad.net/~xclude/avanzosc/mrp-6.1/+merge/134053
Your team Avanzosc Developers is subscribed to branch lp:avanzosc/mrp-6.1.
=== modified file 'mrp_advanced_operations/__openerp__.py'
--- mrp_advanced_operations/__openerp__.py	2012-10-15 09:01:48 +0000
+++ mrp_advanced_operations/__openerp__.py	2012-11-13 09:37:33 +0000
@@ -58,7 +58,7 @@
                 'mrp_master_extension'],
     'init_xml': [],
     'update_xml': [
-#        'security/ir.model.access.csv',
+        'security/ir.model.access.csv',
         'wizard/work_wizard_view.xml',
         'mrp_operations_workflow.xml',
         'wizard/partial_produce_view.xml',

=== modified file 'mrp_advanced_operations/i18n/sv.po'
--- mrp_advanced_operations/i18n/sv.po	2012-10-15 09:01:48 +0000
+++ mrp_advanced_operations/i18n/sv.po	2012-11-13 09:37:33 +0000
@@ -237,25 +237,19 @@
 #. module: mrp_advanced_operations
 #: model:ir.actions.act_window,help:mrp_advanced_operations.mrp_production_wc_action_planning
 msgid ""
-"To manufacture or assemble products, as well as\n"
-"\t\t\t\tusing raw materials and finished product you must also handle\n"
-"\t\t\t\tmanufacturing operations. Manufacturing operations are often called\n"
-"\t\t\t\twork orders. The different operations will have different impacts "
-"on\n"
-"\t\t\t\tthe costs of manufacture and planning depending on the available\n"
-"\t\t\t\tworkload.\n"
-"\t\t\t"
+"To manufacture or assemble products, as well as "
+"using raw materials and finished product you must also handle "
+"manufacturing operations. Manufacturing operations are often called "
+"work orders. The different operations will have different impacts "
+"on the costs of manufacture and planning depending on the available "
+"workload.\n"
 msgstr ""
-"Att tillverka eller montera produkterna, samt\n"
-"[Tab] \t \t \t med råvaror och färdig produkt du måste också hantera\n"
-"[Tab] [Tab] [Tab] [Tab] tillverkning. Tillverkning kallas ofta\n"
-"[Tab] [Tab] [Tab] [Tab] arbetsorder. De olika verksamheter har olika "
-"effekter på\n"
-"[Tab] [Tab] [Tab] [Tab] kostnaderna för tillverkning och planering beroende "
-"på de tillgängliga\n"
-"[Tab] [Tab] [Tab] [Tab] arbetsbelastning.\n"
-"[Tab] [Tab] [Tab]\n"
-"\t\t\t"
+"Att tillverka eller montera produkterna, samt "
+"med råvaror och färdig produkt du måste också hantera "
+"tillverkning. Tillverkning kallas ofta "
+"arbetsorder. De olika verksamheter har olika effekter på "
+"kostnaderna för tillverkning och planering beroende "
+"på de tillgängliga arbetsbelastning.\n"
 
 #. module: mrp_advanced_operations
 #: field:mrp.production,real_operation_ids:0
@@ -528,16 +522,15 @@
 "\t\t\t"
 msgstr ""
 "Arbetsorder är listan över åtgärder som skall\n"
-"[Tab] [Tab] [Tab] [Tab] utföras för varje tillverkningsorder. När du startar "
+"\t\t\t\tutföras för varje tillverkningsorder. När du startar "
 "den första\n"
-"[Tab] [Tab] [Tab] [Tab] arbetsorder av en tillverkningsorder är "
+"\t\t\t\tarbetsorder av en tillverkningsorder är "
 "tillverkningsorder\n"
-"[Tab] [Tab] [Tab] [Tab] automatiskt markerade som började. När du är klar "
+"\t\t\t\tautomatiskt markerade som började. När du är klar "
 "med den senaste\n"
-"[Tab] [Tab] [Tab] [Tab] driften av en tillverkningsorder är MO automatiskt "
+"\t\t\t\tdriften av en tillverkningsorder är MO automatiskt "
 "gjort och\n"
-"[Tab] [Tab] [Tab] [Tab] de produkter tillverkas.\n"
-"[Tab] [Tab] [Tab]\n"
+"\t\t\t\tde produkter tillverkas.\n"
 "\t\t\t"
 
 #. module: mrp_advanced_operations

=== modified file 'mrp_advanced_operations/mrp_operations.py'
--- mrp_advanced_operations/mrp_operations.py	2012-10-15 09:01:48 +0000
+++ mrp_advanced_operations/mrp_operations.py	2012-11-13 09:37:33 +0000
@@ -68,7 +68,7 @@
             prop = 1
             for finish_move in real_operation.move_created_ids2:
                 prop = finish_move.bom_prop
-                if (finish_move.product_id.id == finish_move.operation_id.product_id.id) or (finish_move.product_id.id == real_operation.product.id):
+                if ((finish_move.product_id.id == finish_move.operation_id.product_id.id) or (finish_move.product_id.id == real_operation.product.id)):
                     qty += finish_move.product_qty
             if prop > 0 and real_operation.qty>0:
                res[real_operation.id] = round((float(qty) * 100) / (float(real_operation.qty)/prop), 2)
@@ -108,7 +108,7 @@
                                        "* When all goods are available is set in 'Ready' 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" \
-                                       "* When the user cancels the work order it will be set in 'Canceled' state.\n" \
+                                       "* When the user cancels the work order it will be set in 'Cancelled' state.\n" \
                                        "* When order is completely processed that time it is set in 'Finished' state."),
        'date_start_date': fields.function(_get_date_date, method=True, string='Start Date', type='date'),
        'date_planned': fields.datetime('Scheduled Date'),
@@ -120,7 +120,7 @@
        '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',
-            selection=[('draft','Draft'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Canceled'),('done','Done')],
+            selection=[('draft','Draft'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Cancelled'),('done','Done')],
             string='Production State', readonly=True),
        'product':fields.related('production_id','product_id',type='many2one',relation='product.product',string='Product',
             readonly=True),
@@ -194,8 +194,6 @@
                     for semi_move in op.move_lines:
                         if (semi_move.product_id == move.product_id) and (semi_move.state == 'assigned'):
                             available = True
-#        else:
-#            available = False
         return available
     
     def action_check_goods(self, cr, uid, ids, context=None):
@@ -502,7 +500,6 @@
             if po.allow_reorder:
                 continue
             todo = po.move_lines
-#            dt = datetime.strptime(po.date_start,'%Y-%m-%d %H:%M:%S')
             dt = po.date_start
             while todo:
                 l = todo.pop(0)
@@ -519,7 +516,6 @@
                                 dt, wc.hour or 0.0
                             )
                             dt = i[0][0]
-#                        if l.production_id.date_start > dt.strftime('%Y-%m-%d %H:%M:%S'):
                         if l.production_id.date_start > dt:
                             self.write(cr, uid, [l.production_id.id], {'date_start':dt.strftime('%Y-%m-%d %H:%M:%S')}, mini=True)
         return True

=== 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-11-13 09:37:33 +0000
@@ -1,36 +1,31 @@
 <?xml version="1.0"?>
 <openerp>
 	<data>
-
 		<act_window domain="[('production_id', '=', active_id)]"
 			id="act_mrp_order_2_real_operations" name="Operations"
 			res_model="mrp.production.operation.real" groups="base.group_extended"
 			src_model="mrp.production" />
 
-		<!-- 
-		Inherit Production Tree View
-		 -->
+		<!--  Inherit Production Tree View -->
 	
-		<record id="mrp_production_tree_view_inherit" model="ir.ui.view">
-            <field name="name">mrp.production.tree.inherit</field>
-            <field name="model">mrp.production</field>
-            <field name="type">tree</field>
-            <field name="inherit_id" ref="mrp_master_extension.mrp_production_tree_view_inh" />
-            <field name="arch" type="xml">
-            	<field name="company_id" position="after">
-            		<field name="progress_rate" widget="progressbar" />
-            	</field>
-            </field>
-        </record>
+		<record model="ir.ui.view" id="mrp_production_tree_view_inherit">
+			<field name="name">mrp.production.tree.inherit</field>
+			<field name="model">mrp.production</field>
+			<field name="type">tree</field>
+			<field name="inherit_id" ref="mrp_master_extension.mrp_production_tree_view_inh" />
+			<field name="arch" type="xml">
+				<field name="company_id" position="after">
+            				<field name="progress_rate" widget="progressbar" />
+            			</field>
+			</field>
+		</record>
 
 		<!-- Inherit Production View -->
-
-		<record id="mrp_production_ext_form_inherit_view" model="ir.ui.view">
+		<record model="ir.ui.view" id="mrp_production_ext_form_inherit_view">
 			<field name="name">mrp.production.form.inherit</field>
 			<field name="model">mrp.production</field>
 			<field name="type">form</field>
-			<field name="inherit_id"
-				ref="mrp_master_extension.mrp_production_inherit_form_view" />
+			<field name="inherit_id" ref="mrp_master_extension.mrp_production_inherit_form_view" />
 			<field name="arch" type="xml">
 				<data>
 					<xpath expr="/form/group[1]"
@@ -82,7 +77,7 @@
 					<button name="button_resume" string="Resume" states="pause"
 						icon="gtk-media-pause" help="Resume Work Order" />
 					<button name="button_cancel" string="Cancel"
-						states="draft,ready,startworking,deliverpick,sent," icon="gtk-stop"
+						states="draft,ready,startworking,deliverpick,sent" icon="gtk-stop"
 						help="Cancel Order" type="object" />
 					<button name="button_pause" string="Pause" states="startworking"
 						icon="gtk-media-pause" help="Pause Work Order" />
@@ -92,12 +87,6 @@
 			</field>
 		</record>
 
-		<record id="action_real_operation_tree_view" model="ir.actions.act_window.view">
-			<field name="view_mode">tree</field>
-			<field name="view_id" ref="mrp_production_operation_real_tree_view_inherit" />
-			<field name="act_window_id" ref="act_mrp_order_2_real_operations" />
-		</record>
-
 		<record model="ir.ui.view" id="mrp_production_operation_real_form_view">
 			<field name="name">mrp.production.operation.real.form</field>
 			<field name="model">mrp.production.operation.real</field>
@@ -127,7 +116,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 +129,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 +137,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,13 +146,14 @@
 											widget="selection" />
 										<field name="location_dest_id" readonly="1"
 											string="Destination Loc." widget="selection" />
+										<field name="scrapped" invisible="1" />
 										<field name="state" />
 									</tree>
 								</field>
 								<newline />
 								<field colspan="2" name="move_created_ids" nolabel="1"
 									widget="one2many_list" mode="tree,form" height="175"
-									domain="[('state','&lt;&gt;', (draft,waiting,ready,confirmed,assigned))]">
+									domain="[('state','not in', ('draft','waiting','ready','confirmed','assigned'))]">
 									<tree string="Products to Finish">
 										<field name="product_id" />
 										<field name="product_qty" string="Qty" />
@@ -179,7 +169,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 +178,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 +189,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 />
@@ -261,8 +252,148 @@
 			</field>
 		</record>
 
-		<record id="view_mrp_production_workcenter_form_view_filter"
-			model="ir.ui.view">
+		<record model="ir.ui.view" id="mrp_production_operation_real_graph_view">
+			<field name="name">mrp.production.operation.real.tree</field>
+			<field name="model">mrp.production.operation.real</field>
+			<field name="type">graph</field>
+			<field name="arch" type="xml">
+				<graph string="Production" type="bar">
+					<field name="date_start_date"/>
+					<field name="hour" operator="+"/>
+					<field name="workcenter_id" group="True"/>
+				</graph>
+			</field>
+		</record>
+
+		<!-- Workcenter line -->
+		<record model="ir.ui.view" id="workcenter_line_kanban_view">
+			<field name="name">mrp.production.operation.real.resource.kanban</field>
+			<field name="model">mrp.production.operation.real</field>
+			<field name="type">kanban</field>
+			<field name="arch" type="xml">
+				<kanban default_group_by="workcenter_id">
+					<!--Filtered By -->
+					<field name="workcenter_id"/>
+					<field name="state"/>
+					<field name="name"/>
+					<templates>
+						<t t-set="color">#fff</t>
+						<t t-name="work_operations_details">
+							<ul class="oe_kanban_tooltip">
+								<li><b>Name :</b> <field name="name"/></li>
+								<li><b>Date Planned :</b> <field name="date_planned"/></li>
+								<li><b>Date Started :</b> <Field name="date_start"/></li>
+								<li><b>Date Planned End :</b> <field name="date_planned_end" /></li>
+								<li><b>Date Finished :</b> <field name="date_finished"/></li>
+								<li><b>Delay :</b> <field name="delay"/></li>
+							</ul>
+						</t>
+						<t t-name="kanban-box">
+							<t t-set="border">oe_kanban_color_red</t>
+							<div t-attf-class="#{kanban_color(1)} #{border || ''}">
+								<div class="oe_kanban_box oe_kanban_color_border">
+								<!--kanban box header -->
+									<table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
+										<tr>
+											<!--kanban header image/ Icon -->
+											<td align="left" valign="middle" width="16">
+												<a icon="star-on" type="object" name="set_normal_priority"/>
+												<a icon="star-off" type="object" name="set_high_priority" style="opacity:0.6; filter:alpha(opacity=60);"/>
+											</td>
+											<!--kanban title -->         
+											<td align="left" valign="middle" class="oe_kanban_title" tooltip="work_operations_details">
+												<!--kanban title name -->
+												<field name="product"/>
+											</td>
+											<td valign="top" width="22"></td>
+										</tr>
+									</table>
+									<!--kanban content box -->
+									<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
+										<div><b><field name="name"/></b></div>
+									</div>
+									<!--below the kanban view button like view,e-mail,color -->
+									<div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
+										<div><t><b>Date Planned :</b></t><field name="date_planned"/></div>
+										<div><t><b>Duration :</b></t><field name="hour"/></div>
+										<div><t><b>Location :</b></t><field name="location_id"/></div>
+										<div><t><b>Progress Rate :</b></t><field name="progress_rate" widget="progressbar"/></div>
+										<!--<div <t><b>Product :</b></t><field name="product_id"/> <field name="product_qty"/> <field name="product_uom"/></div>-->
+
+										<div class="oe_kanban_left">
+											<a string="Edit" icon="gtk-edit" type="edit"/>
+											<a string="Change Color" icon="color-picker" type="color" name="colors"/>
+										</div>
+
+										<div class="oe_kanban_right">
+											<a string="Cancel" name="button_cancel" states="draft,startworking,ready2deliver,subcontracte" icon="terp-mail-message-new" type="action"/>
+											<a string="Check Goods" name="action_check_goods" states="draft" icon="gtk-ok" type="action"/>
+											<a string="Set Draft" name="button_draft" states="cancel" icon="gtk-convert" type="action"/>
+											<a string="Start" name="button_start_working" states="ready" icon="terp-gtk-jump-to-ltr" type="action"/>
+											<a string="Pause" name="button_pause" states="startworking" icon="gtk-media-pause" />
+											<a string="Produce" name="%(action_partial_produce)d" states="startworking" icon="gtk-ok" type="action"/>
+											<a string="Finished" name="button_done" states="startworking" icon="terp-dialog-close" type="action"/>
+										</div>
+										<br class="oe_kanban_clear"/>
+									</div>
+								</div>
+							</div>
+						</t>
+					</templates>
+				</kanban>
+			</field>
+		</record>
+
+		<record model="ir.ui.view" id="workcenter_line_calendar_view">
+			<field name="name">mrp.production.operation.real.calendar</field>
+			<field name="model">mrp.production.operation.real</field>
+			<field name="type">calendar</field>
+			<field name="arch" type="xml">
+				<calendar color="product" date_stop="date_finished"
+					date_start="date_start" string="Operations">
+					<field name="workcenter_id" />
+					<field name="production_id" />
+				</calendar>
+			</field>
+		</record>
+
+
+		<record model="ir.ui.view" id="workcenter_line_gantt_view">
+			<field name="name">mrp.production.operation.real.gantt</field>
+			<field name="model">mrp.production.operation.real</field>
+			<field name="type">gantt</field>
+			<field name="arch" type="xml">
+				<gantt color="workcenter_id" date_delay="hour" date_start="date_planned"
+					string="Operations">
+					<level object="mrp.workcenter" link="production_id" domain="[]">
+						<field name="product" />
+						<field name="hour" />
+						<field name="production_id" />
+					</level>
+				</gantt>
+			</field>
+		</record>
+
+		<!-- Workcenter resource -->
+
+		<record model="ir.ui.view" id="workcenter_line_resource_gantt_view">
+			<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">
+				<gantt color="production_id" date_delay="hour" date_start="date_planned">
+					<level object="mrp.workcenter" link="workcenter_id" domain="[]">
+						<field name="product" />
+						<field name="hour" />
+						<field name="production_id" />
+					</level>
+				</gantt>
+			</field>
+		</record>
+
+		<!-- Search filter-->
+
+		<record model="ir.ui.view" id="mrp_production_workcenter_form_view_filter">
 			<field name="name">mrp.production.operation.real.select</field>
 			<field name="model">mrp.production.operation.real</field>
 			<field name="type">search</field>
@@ -277,8 +408,11 @@
 							domain="[('state','=','pause')]" />
 						<separator orientation="vertical" />
 						<filter icon="terp-gnome-cpu-frequency-applet+" string="Late"
-							domain="['&amp;', ('date_planned::date','&lt;', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
-							help="Production started late" />
+							domain="[('date_planned','&lt;', current_date), ('state', 'in', ('draft', 'confirmed', 'ready'))]"
+							help="Production started late"/>
+						<filter icon="terp-gnoem-cpu-frequency-applet+" string="Late"
+							domain="[('date_planned_end','&lt;','date_finished'), ('state', 'in', ('done'))]"
+							help="Production finished late"/>
 						<separator orientation="vertical" />
 						<field name="name" />
 						<field name="workcenter_id" widget="selection" />
@@ -304,46 +438,15 @@
 			</field>
 		</record>
 
-		<record id="workcenter_line_calendar" model="ir.ui.view">
-			<field name="name">mrp.production.operation.real.calendar</field>
-			<field name="model">mrp.production.operation.real</field>
-			<field name="type">calendar</field>
-			<field name="arch" type="xml">
-				<calendar color="product" date_stop="date_finished"
-					date_start="date_start" string="Operations">
-					<field name="workcenter_id" />
-					<field name="production_id" />
-				</calendar>
-			</field>
-		</record>
-
-
-		<record id="workcenter_line_gantt" model="ir.ui.view">
-			<field name="name">mrp.production.operation.real.gantt</field>
-			<field name="model">mrp.production.operation.real</field>
-			<field name="type">gantt</field>
-			<field name="arch" type="xml">
-				<gantt color="workcenter_id" date_delay="hour" date_start="date_planned"
-					string="Operations">
-					<level object="mrp.workcenter" link="production_id" domain="[]">
-						<field name="product" />
-						<field name="hour" />
-						<field name="production_id" />
-					</level>
-				</gantt>
-			</field>
-		</record>
-
-
-		<!-- Action for All Operations -->
+		<!-- Action for Menu -->
 
 		<record model="ir.actions.act_window" id="mrp_production_wc_action_form">
 			<field name="name">Work Orders</field>
 			<field name="type">ir.actions.act_window</field>
 			<field name="res_model">mrp.production.operation.real</field>
 			<field name="view_type">form</field>
-			<field name="view_mode">tree,form,gantt,calendar,graph</field>
-			<field name="search_view_id" ref="view_mrp_production_workcenter_form_view_filter" />
+			<field name="view_mode">kanban,tree,form,calendar,gantt,graph</field>
+			<field name="search_view_id" ref="mrp_production_workcenter_form_view_filter" />
 			<field name="help">Work Orders is the list of operations to be
 				performed for each manufacturing order. Once you start the first
 				work order of a manufacturing order, the manufacturing order is
@@ -359,7 +462,7 @@
 			<field name="res_model">mrp.production.operation.real</field>
 			<field name="view_type">form</field>
 			<field name="domain">[('production_state','in',('ready','confirmed','in_production'))]</field>
-			<field name="view_mode">gantt,tree,form,graph,calendar</field>
+			<field name="view_mode">tree,form,calendar,gantt,graph</field>
 			<field name="help">To manufacture or assemble products, as well as
 				using raw materials and finished product you must also handle
 				manufacturing operations. Manufacturing operations are often called
@@ -369,31 +472,24 @@
 			</field>
 		</record>
 
-
-		<record id="workcenter_line_resource_gantt" model="ir.ui.view">
-			<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">
-				<gantt color="production_id" date_delay="hour" date_start="date_planned">
-					<level object="mrp.workcenter" link="workcenter_id" domain="[]">
-						<field name="product" />
-						<field name="hour" />
-						<field name="production_id" />
-					</level>
-				</gantt>
-			</field>
-		</record>
-
 		<record model="ir.actions.act_window" id="mrp_production_wc_resource_planning">
 			<field name="name">Work Centers</field>
 			<field name="type">ir.actions.act_window</field>
 			<field name="res_model">mrp.production.operation.real</field>
 			<field name="view_type">form</field>
 			<field name="domain">[('production_state','in',('ready','confirmed','in_production'))]</field>
-			<field name="view_mode">gantt,tree,form,calendar,graph</field>
-			<field name="view_id" ref="workcenter_line_resource_gantt" />
+			<field name="view_mode">tree,form,calendar,gantt,graph</field>
+		</record>
+
+
+
+
+		<!-- Action for -->
+
+		<record model="ir.actions.act_window.view" id="action_real_operation_tree_view">
+			<field name="view_mode">tree</field>
+			<field name="view_id" ref="mrp_production_operation_real_tree_view_inherit" />
+			<field name="act_window_id" ref="act_mrp_order_2_real_operations" />
 		</record>
 
 		<!-- Action for Confirm Operations -->
@@ -403,7 +499,7 @@
 			<field name="type">ir.actions.act_window</field>
 			<field name="res_model">mrp.production.operation.real</field>
 			<field name="view_type">form</field>
-			<field name="view_mode">tree,form,graph,gantt,calendar</field>
+			<field name="view_mode">tree,form,calendar,gantt,graph</field>
 			<field name="domain">[('production_state','=','ready')]</field>
 			<field name="filter" eval="True" />
 		</record>
@@ -415,11 +511,13 @@
 			<field name="type">ir.actions.act_window</field>
 			<field name="res_model">mrp.production.operation.real</field>
 			<field name="view_type">form</field>
-			<field name="view_mode">tree,form,graph</field>
+			<field name="view_mode">tree,form,calendar,gantt,graph</field>
 			<field name="domain">[('state','=','draft')]</field>
 			<field name="filter" eval="True" />
 		</record>
 
+		<!-- Value -->
+
 		<record model="ir.values" id="mrp_production_wc_action_open">
 			<field name="key2" eval="'tree_but_open'" />
 			<field name="model" eval="'mrp.production.operation.real'" />
@@ -430,118 +528,17 @@
 
 		</record>
 
+		<!-- Menu -->
+
 		<menuitem name="Work Orders" parent="mrp.menu_mrp_manufacturing"
 			id="menu_mrp_production_wc_order" action="mrp_production_wc_action_form"
-			groups="base.group_extended" sequence="2" />
+			sequence="2" icon="STOCK_INDENT" groups="base.group_extended" />
 		<menuitem name="Work Orders" parent="mrp.menu_mrp_planning"
 			id="menu_mrp_production_wc_action_planning" action="mrp_production_wc_action_planning"
 			sequence="2" icon="STOCK_INDENT" groups="base.group_extended" />
-		<menuitem parent="mrp.menu_mrp_planning" id="menu_mrp_production_wc_resource_planning"
-			action="mrp_production_wc_resource_planning" icon="STOCK_INDENT"
-			groups="base.group_extended" />
-
-		<!-- Operation codes -->
-
-		<!-- <record model="ir.ui.view" id="mrp_production_code_tree_view"> -->
-		<!-- <field name="name">mrp.production.code.tree</field> -->
-		<!-- <field name="model">mrp_operations.operation.code</field> -->
-		<!-- <field name="type">tree</field> -->
-		<!-- <field name="arch" type="xml"> -->
-		<!-- <tree string="Production Operation Code"> -->
-		<!-- <field name="name" select="1" /> -->
-		<!-- <field name="code" select="1" /> -->
-		<!-- <field name="start_stop" select="1" /> -->
-		<!-- </tree> -->
-		<!-- </field> -->
-		<!-- </record> -->
-<!---->
-		<!-- <record model="ir.ui.view" id="mrp_production_code_form_view"> -->
-		<!-- <field name="name">mrp.production.code.form</field> -->
-		<!-- <field name="model">mrp_operations.operation.code</field> -->
-		<!-- <field name="type">form</field> -->
-		<!-- <field name="arch" type="xml"> -->
-		<!-- <form string="Production Operation Code"> -->
-		<!-- <field name="name" select="1" /> -->
-		<!-- <field name="code" select="1" /> -->
-		<!-- <field name="start_stop" select="1" /> -->
-		<!-- </form> -->
-		<!-- </field> -->
-		<!-- </record> -->
-<!---->
-		<!-- <record model="ir.actions.act_window" id="mrp_production_code_action"> -->
-		<!-- <field name="name">Operation Codes</field> -->
-		<!-- <field name="type">ir.actions.act_window</field> -->
-		<!-- <field name="res_model">mrp_operations.operation.code</field> -->
-		<!-- <field name="view_type">form</field> -->
-		<!-- <field name="view_mode">tree,form</field> -->
-		<!-- <field name="view_id" ref="mrp_production_code_tree_view" /> -->
-		<!-- </record> -->
-<!---->
-		Operations 
-<!---->
-		<!-- <record model="ir.ui.view" id="mrp_production_operation_real_tree_view"> -->
-		<!-- <field name="name">mrp.production.operation.real.tree</field> -->
-		<!-- <field name="model">mrp_operations.operation</field> -->
-		<!-- <field name="type">tree</field> -->
-		<!-- <field name="arch" type="xml"> -->
-		<!-- <tree string="Production Operation" editable="top"> -->
-		<!-- <field name="production_id" /> -->
-		<!-- <field name="workcenter_id" /> -->
-		<!-- <field name="code_id" /> -->
-		<!-- <field name="date_start" /> -->
-		<!-- <field name="date_finished" /> -->
-		<!-- <field name="order_date" /> -->
-		<!-- </tree> -->
-		<!-- </field> -->
-		<!-- </record> -->
-<!---->
-		<!-- <record id="graph_in_hrs_workcenter" model="ir.ui.view"> -->
-		<!-- <field name="name">graph.in.hrs.workcenter</field> -->
-		<!-- <field name="model">mrp.production.operation.real</field> -->
-		<!-- <field name="type">graph</field> -->
-		<!-- <field name="arch" type="xml"> -->
-		<!-- <graph string="Hours by Work Center" type="bar"> -->
-		<!-- <field name="date_start_date" /> -->
-		<!-- <field name="hour" operator="+" /> -->
-		<!-- <field name="workcenter_id" group="True" operator="+" /> -->
-		<!-- </graph> -->
-		<!-- </field> -->
-		<!-- </record> -->
-<!---->
-		<!-- <record model="ir.actions.act_window" id="mrp_production_operation_real_action"> -->
-		<!-- <field name="name">Operations</field> -->
-		<!-- <field name="type">ir.actions.act_window</field> -->
-		<!-- <field name="res_model">mrp_operations.operation</field> -->
-		<!-- <field name="view_type">form</field> -->
-		<!-- <field name="view_mode">tree,calendar,form</field> -->
-		<!-- <field name="view_id" ref="mrp_production_operation_real_tree_view" 
-			/> -->
-		<!-- </record> -->
-		<!-- <record id="mrp_production_reorder_form_view" model="ir.ui.view"> -->
-		<!-- <field name="name">mrp.production.allow_reorder.form</field> -->
-		<!-- <field name="inherit_id" ref="mrp.mrp_production_form_view" /> -->
-		<!-- <field name="model">mrp.production</field> -->
-		<!-- <field name="type">form</field> -->
-		<!-- <field name="arch" type="xml"> -->
-		<!-- <field name="priority" position="after"> -->
-		<!-- <field name="allow_reorder" /> -->
-		<!-- </field> -->
-		<!-- </field> -->
-		<!-- </record> -->
-<!---->
-		<!-- <record model="ir.ui.view" id="operation_calendar_view"> -->
-		<!-- <field name="name">mrp.perations.calendar</field> -->
-		<!-- <field name="model">mrp_operations.operation</field> -->
-		<!-- <field name="type">calendar</field> -->
-		<!-- <field name="priority" eval="2" /> -->
-		<!-- <field name="arch" type="xml"> -->
-		<!-- <calendar string="Calendar View" date_start="order_date" -->
-		<!-- color="workcenter_id"> -->
-		<!-- <field name="date_start" /> -->
-		<!-- <field name="date_finished" /> -->
-		<!-- </calendar> -->
-		<!-- </field> -->
-		<!-- </record> -->
+		<menuitem name="Work Centers" parent="mrp.menu_mrp_planning" 
+			id="menu_mrp_production_wc_resource_planning" action="mrp_production_wc_resource_planning" 
+			sequence="3" icon="STOCK_INDENT" groups="base.group_extended" />
 
 	</data>
 </openerp>

=== modified file 'mrp_advanced_operations/mrp_operations_workflow.xml'
--- mrp_advanced_operations/mrp_operations_workflow.xml	2012-10-15 09:01:48 +0000
+++ mrp_advanced_operations/mrp_operations_workflow.xml	2012-11-13 09:37:33 +0000
@@ -91,7 +91,7 @@
 			<field name="act_from" ref="prod_act_wc_draft" />
 			<field name="act_to" ref="prod_act_wc_ready" />
 			<field name="signal">check_signal</field>
-            <field name="condition">check_components()</field>
+			<field name="condition">check_components()</field>
 		</record>
 		<record model="workflow.transition" id="prod_trans_wc_ready_start">
 			<field name="act_from" ref="prod_act_wc_ready" />
@@ -178,24 +178,23 @@
 		<delete id="mrp.prod_act_picking_exception" model="workflow.activity"/>
 		
 		<record id="mrp.prod_act_picking" model="workflow.activity">
-            <field name="wkf_id" ref="mrp.wkf_prod"/>
-            <field name="name">confirmed</field>
-            <field name="kind">function</field>
-            <field name="action">action_confirm()</field>
-        </record>
+			<field name="wkf_id" ref="mrp.wkf_prod"/>
+			<field name="name">confirmed</field>
+			<field name="kind">function</field>
+			<field name="action">action_confirm()</field>
+		</record>
 
 		<record id="mrp.prod_trans_picking_ready" model="workflow.transition">
 			<field name="act_from" ref="mrp.prod_act_picking"/>
-            <field name="act_to" ref="mrp.prod_act_ready"/>
-            <field name="signal">is_ready</field>
-            <field name="condition">True</field>
-        </record>
+			<field name="act_to" ref="mrp.prod_act_ready"/>
+			<field name="signal">is_ready</field>
+			<field name="condition">True</field>
+		</record>
         
-        <record id="mrp.prod_trans_picking_cancel" model="workflow.transition">
+		<record id="mrp.prod_trans_picking_cancel" model="workflow.transition">
 			<field name="act_from" ref="mrp.prod_act_picking"/>
-            <field name="act_to" ref="mrp.prod_act_cancel"/>
-            <field name="signal">button_cancel</field>
-        </record>
-
+			<field name="act_to" ref="mrp.prod_act_cancel"/>
+			<field name="signal">button_cancel</field>
+		</record>
 	</data>
 </openerp>

=== modified file 'mrp_advanced_operations/security/ir.model.access.csv'
--- mrp_advanced_operations/security/ir.model.access.csv	2012-10-15 09:01:48 +0000
+++ mrp_advanced_operations/security/ir.model.access.csv	2012-11-13 09:37:33 +0000
@@ -1,9 +1,8 @@
-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_mrp_operations_operation_code","operations.operation.code","model_mrp_operations_operation_code","mrp.group_mrp_user",1,1,1,1
-"access_mrp_operations_operation_code_manager","operations.operation.code.manager","model_mrp_operations_operation_code","mrp.group_mrp_manager",1,0,0,0
-"access_mrp_operations_operation","operations.operation","model_mrp_operations_operation","mrp.group_mrp_user",1,1,1,1
-"access_mrp_operations_operation_manager","operations.operation.manager","model_mrp_operations_operation","mrp.group_mrp_manager",1,0,0,0
-"access_mrp_production_user","mrp_production_user","model_mrp_production","mrp.group_mrp_user",1,1,1,1
-"access_mrp_production_manager","mrp_production_manager","model_mrp_production","mrp.group_mrp_manager",1,0,0,0
-"access_mrp_production_operation","mrp.production.operation","model_mrp_production_operation","mrp.group_mrp_user",1,1,1,1
-"access_mrp_production_operation_manager","mrp.production.operation.manager","model_mrp_production_operation","mrp.group_mrp_manager",1,0,0,0
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_mrp_production_user,mrp.production user,model_mrp_production,mrp.group_mrp_user,1,1,1,1
+access_mrp_production_manager,mrp.production manager,model_mrp_production,mrp.group_mrp_manager,1,0,0,0
+access_mrp_production_operation_user,mrp.production.operation user,mrp_master_extension.model_mrp_production_operation,mrp.group_mrp_user,1,1,1,1
+access_mrp_production_operation_manager,mrp.production.operation manager,mrp_master_extension.model_mrp_production_operation,mrp.group_mrp_manager,1,0,0,0
+access_mrp_production_operation_real_user,mrp.production.operation.real user,model_mrp_production_operation_real,mrp.group_mrp_user,1,1,1,1
+access_mrp_production_operation_real_manager,mrp.production.operation.real manager,model_mrp_production_operation_real,mrp.group_mrp_manager,1,0,0,0
+

=== 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-11-13 09:37:33 +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_manufacturing_cost/__openerp__.py'
--- mrp_manufacturing_cost/__openerp__.py	2012-10-15 09:01:48 +0000
+++ mrp_manufacturing_cost/__openerp__.py	2012-11-13 09:37:33 +0000
@@ -21,6 +21,7 @@
 {
 	"name" : "MRP Costs",
 	"version" : "0.1",
+	"category" : "Generic Modules/Production",
 	"description" : """This module adds new features to the actual OpenERP manufacturing""",
 	"author" : "AvanzOSC & Ting!",
 	"website" : "http://ting.es - http://www.avanzosc.com";,
@@ -32,10 +33,9 @@
 		'mrp_advanced_operations'
 		
 	],
-	"category" : "Custom Modules",
 	"init_xml" : [],
-	"demo_xml" : [],
 	"update_xml" : [ 
+		'security/ir.model.access.csv',
 		'wizard/final_cost_view.xml',
 		'wizard/wc_view.xml',
 		'wizard/users_view.xml',
@@ -44,6 +44,8 @@
 		
 		
 	],
+	"demo_xml" : [],
+	"test" : [],
+	"installable": True,
 	"active": False,
-	"installable": True
 }

=== 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-11-13 09:37:33 +0000
@@ -49,7 +49,6 @@
     def _calculate_time(self, cr, uid, ids, field_name, arg, context=None):
         res = {}
         operation = self.pool.get('mrp.production.operation').browse(cr, uid, ids)[0]
-#        production = self.pool.get('mrp.production').browse(cr, uid, operation.production_id.id)
         if operation:
             if operation.semi_prod_qty:
                 cycle = (operation.semi_prod_qty/operation.capacity_per_cycle)
@@ -530,7 +529,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)
@@ -585,7 +583,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)
@@ -738,7 +735,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)
@@ -772,7 +768,6 @@
                             'product_uos': False,
                             'location_id': line.product_id.product_tmpl_id.property_stock_production.id,
                             'location_dest_id': operation.location_id.id,
-#                            'move_dest_id': move_pick_id,
                             'state': 'waiting',
                             'company_id': production.company_id.id,
                             'operation_id': operation.id,
@@ -807,7 +802,6 @@
                             'product_uos': production.product_uos and production.product_uos.id or False,
                             'location_id': production.product_id.product_tmpl_id.property_stock_production.id,
                             'location_dest_id': operation.location_id.id,
-#                            'move_dest_id': move_pick_id,
                             'state': 'waiting',
                             'company_id': production.company_id.id,
                             'operation_id': operation.id,


Follow ups