[REM]: unuse variable name and method
[odoo/odoo.git] / addons / mrp_repair / mrp_repair_view.xml
index bc776ea..69782e0 100644 (file)
@@ -2,25 +2,24 @@
 <openerp>
     <data>
 
-       <record id="view_repair_order_tree" model="ir.ui.view">
-            <field name="name">mrp.repair.tree</field>
-            <field name="model">mrp.repair</field>
-            <field name="type">tree</field>
-            <field name="arch" type="xml">
-                <tree string="Repairs order">
-                    <field name="name" select="1" />
-                     <field name="product_id" select="1" />
-                     <field name="prodlot_id"/>
-                     <field name="partner_id"/>
-                     <field name="address_id"/>
-                     <field name="location_id"/>
-                     <field name="move_id"/>
-                     <field name="location_dest_id"/>
-                     <field name="guarantee_limit"/>
-                     <field name="state"/>
-                </tree>
-            </field>
-        </record>
+    <record id="view_repair_order_tree" model="ir.ui.view">
+        <field name="name">mrp.repair.tree</field>
+        <field name="model">mrp.repair</field>
+        <field name="type">tree</field>
+        <field name="arch" type="xml">
+            <tree string="Repairs order" colors="gray:state in ('done','cancel');black:state not in ('done','cancel');blue:state=='draft'">
+                <field name="name" select="1" />
+                <field name="product_id" select="1" />
+                <field name="move_id"/>
+                <field name="partner_id"/>
+                <field name="address_id"/>
+                <field name="location_id"/>
+                <field name="location_dest_id"/>
+                <field name="guarantee_limit"/>
+                <field name="state"/>
+            </tree>
+        </field>
+    </record>
 
     <record id="view_repair_order_form" model="ir.ui.view">
         <field name="name">mrp.repair.form</field>
@@ -50,7 +49,8 @@
                                 <notebook>
                                     <page string="Repair Line">
                                         <field name="name" colspan="4"/>
-                                        <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)" colspan="4"/>
+                                        <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
+                                        <field name='prodlot_id'/>
                                         <field name="product_uom_qty" string="Qty" />
                                         <field name="product_uom" string="UoM"/>
                                         <field name="price_unit"/>
@@ -79,6 +79,7 @@
                                 <field name="type" on_change="onchange_operation_type(type,parent.guarantee_limit)"/>
                                 <field name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_uom,product_uom_qty, parent.partner_id)"/>
                                 <field name='name'/>
+                                <field name="prodlot_id" />
                                 <field name="location_id"/>
                                 <field name="location_dest_id"/>
                                 <field name="product_uom_qty" string="Qty"/>
                             <field name="amount_untaxed" sum="Untaxed amount"/>
                             <field name="amount_tax"/>
                             <field name="amount_total" sum="Total amount"/>
-                            <button name="button_dummy" states="draft" string="Compute" type="object"/>
+                            <button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
                         </group>
-                        <newline/>
+                        <separator string="" colspan="4"/>
                         <group col="13" colspan="4">
                             <field name="state"/>
-                            <button name="repair_confirm" states="draft" string="Confirm Repair" icon="gtk-apply"/>
-                            <button name="repair_ready" states="confirmed" string="Start Repair" icon="gtk-go-forward"/>
-                            <button name="action_repair_start" states="ready" string="Start Repair" icon="gtk-go-forward"/>
-                            <button name="action_repair_end" states="under_repair" string="End Repair" icon="gtk-ok"/>
-                            <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-convert"/>
-                            <button name="invoice_corrected" states="invoice_except" string="Invoice Corrected" icon="gtk-apply"/>
-                            <button name="action_invoice_create" states="2binvoiced" string="Make Invoice" icon="gtk-ok"/>
-                            <button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action" icon="gtk-cancel"/>
+                            <button name="cancel" states="draft" string="Cancel Repair" icon="gtk-stop"/>
+                            <button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action" icon="gtk-stop"/>
+                            <button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action" icon="gtk-stop"/>
                             <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
-                            <button name="cancel" states="draft" string="Cancel Repair" icon="gtk-cancel"/>
-                            <button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action" icon="gtk-cancel"/>
+                            <button name="repair_confirm" states="draft" string="Confirm Repair" icon="terp-camera_test"/>
+                            <button name="repair_ready" states="confirmed" string="Start Repair" icon="terp-gtk-jump-to-ltr"/>
+                            <button name="action_repair_start" states="ready" string="Start Repair" icon="terp-gtk-jump-to-ltr"/>
+                            <button name="action_repair_end" states="under_repair" string="End Repair" icon="terp-dialog-close"/>
+                            <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="terp-dolar"/>
+                            <button name="invoice_corrected" states="invoice_except" string="Invoice Corrected" icon="terp-emblem-important"/>
+                            <button name="action_invoice_create" states="2binvoiced" string="Make Invoice" icon="terp-dolar"/>
                         </group>
                     </page>
                     <page string="Invoicing">
                         <field name="invoice_method" colspan="4"/>
                         <field
-                            name="pricelist_id" context="product_id=product_id"
+                            name="pricelist_id" context="{'product_id':product_id}"
                             attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
                         <field name="partner_invoice_id" attrs="{'readonly':[('invoice_method','=', 'none')]}"/>
                         <!-- <field name="invoice_id"/> -->
                             </tree>
                         </field>
                     </page>
-                    <page string="Quality">
-                        <separator colspan="4" string="Internal Notes"/>
-                        <field colspan="4" name="internal_notes" nolabel="1"/>
-                        <separator colspan="4" string="Quotation Notes"/>
-                        <field colspan="4" name="quotation_notes" nolabel="1"/>
-                    </page>
                     <page string="Extra Info" groups="base.group_extended">
                         <field name="invoice_id"/>
                         <field name="picking_id"/>
                         <field name="location_id"/>
                         <field name="location_dest_id" attrs="{'readonly':[('deliver_bool','=', False)], 'required':[('deliver_bool','=', True)]}"/>
                     </page>
+                    <page string="Notes">
+                        <separator colspan="4" string="Internal Notes"/>
+                        <field colspan="4" name="internal_notes" nolabel="1"/>
+                        <separator colspan="4" string="Quotation Notes"/>
+                        <field colspan="4" name="quotation_notes" nolabel="1"/>
+                    </page>
                 </notebook>
             </form>
         </field>
           <field name="type">search</field>
           <field name="arch" type="xml">
               <search string="Search Reair Orders">
-               <group col='4' colspan='4'>
-                      <filter icon="terp-document-new" string="Quotations" domain="[('state','=','draft')]"/>   
+                  <group>
+                       <filter icon="terp-document-new" string="Quotations" domain="[('state','=','draft')]"/>
                        <filter icon="terp-check" string="Confirmed" domain="[('state','=','confirmed')]" name="current" />
                        <filter icon="terp-emblem-important" string="Ready To Repair" domain="[('state','=','ready')]"/>
                        <separator orientation="vertical"/>
-                       <filter icon="terp-dolar" string="invoiced" domain="[('state','=','2binvoiced')]"/>
+                       <filter icon="terp-dolar" string="invoiced" domain="[('invoiced','=',True)]"/>
                        <separator orientation="vertical"/>
-                               <field name="name"/>
-                           <field name="product_id"/>
-                           <field name="partner_id"/>
-                           <field name="state" />
-               </group>
-               <newline/>
-                  <group expand="0" string="Group By..." colspan="10" col="8" groups="base.group_extended">
+                       <field name="name"/>
+                       <field name="product_id"/>
+                       <field name="partner_id"/>
+                       <field name="state" />
+                  </group>
+                  <newline/>
+                  <group expand="0" string="Group By...">
+                      <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
+                      <separator orientation="vertical"/>
                       <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
                       <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
                       <separator orientation="vertical"/>
-                      <filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
-                      <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'guarantee_limit'}"/>
+                      <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'guarantee_limit'}" help="Guarantee limit"/>
                   </group>
              </search>
           </field>
-       </record>
+    </record>
+
 
-        
 
          <record id="action_repair_order_tree" model="ir.actions.act_window">
             <field name="name">Repair Orders</field>
             <field name="view_type">form</field>
             <field name="view_mode">tree,form</field>
             <field name="search_view_id" ref="view_repair_order_form_filter"/>
-        </record>    
+            <field name="help">Repair orders allow you to organize your product repairs. In a repair order, you can detail the components you remove, add or replace and record the time you spent on the different operations. The repair order uses the warranty date on the production lot in order to know if whether the repair should be invoiced to the customer or not.</field>
+        </record>
 
         <menuitem action="action_repair_order_tree" id="menu_repair_order" parent="mrp.menu_mrp_manufacturing" groups="mrp.group_mrp_user" name="Repair Orders" sequence="50"/>