[ADD]correction to contract and service view following the pad
[odoo/odoo.git] / addons / fleet / fleet_view.xml
index 36ab332..e91dfa3 100644 (file)
                             <group string="Contract details">
                                 <field name="vehicle_id" on_change="on_change_vehicle(vehicle_id)"/>
                                 <field name="cost_type" required="1" domain="[('category','=','contract')]"/>
+                                <field name="amount" string="Price"/>
                             </group>
                             <group string="Odometer details">
                                 <label for="odometer"/>
                         </group>
                         <group>
                             <field name="costs" context="{'vehicle_id': vehicle_id}">
-                                <tree string="Costs" version="7.0">
-                                    <field name="cost_type" />
-                                    <field name="amount" />
+                                <tree string="Costs" version="7.0" editable="bottom">
+                                    <field name="cost_type"/>
+                                    <field name="amount" string="Cost" />
                                 </tree>
-                                <form string="Costs" version="7.0">
+                                <!--<form string="Costs" version="7.0">
                                     <sheet>
                                         <group>
                                             <field name="cost_type" />
                                             <field name="amount" />
                                         </group>
                                     </sheet>
-                                </form>
+                                </form>-->
                             </field>
 
-                            <field name="amount" />
+                            
                         </group>
                         <group string="Terms and Conditions">
                             <field name="notes" nolabel="1" placeholder="Write here all other information relative to this contract" />
                     <field name="expiration_date" />
                     <field name="warning_date" invisible="1"/>
                     <field name="insurer_id" />
-                    <field name="amount" />
+                    <field name="amount"/>
 
                     <field name="notes" />
                 </tree>
                 <form string="Services Logs" version="7.0">
                     <sheet>
                         <group col="2">
-                            <group string="Vehicle Details">
+                            <group string="Services Details">
                                 <field name="vehicle_id" on_change="on_change_vehicle(vehicle_id)"/>
-                                <field name="cost_type" domain="[('category','=','contract')]"/>
+                                <field name="cost_type" domain="[('category','=','contract')]" required="1"/>
+                                <field name="amount" string="Price"/>
                             </group>
                             <group string="Odometer Details">
                                 <label for="odometer"/>
                                 <div>
-                                    <field name="odometer" class="oe_inline"/>
+                                    <field name="odometer" string="value" class="oe_inline"/>
                                     <field name="odometer_unit" class="oe_inline"/>
                                 </div>
                             </group>
                         </group>
-                        <group string="Service Details">
-                            <field name="service_ids">
-                                <tree string="Services" version="7.0">
-                                    <field name="cost_type" />
-                                    <field name="amount" />
-                                </tree>
-                                <form string="Services" version="7.0">
-                                    <sheet>
-                                        <group>
-                                            <field name="cost_type" />
-                                            <field name="amount" />
-                                        </group>
-                                    </sheet>
-                                </form>
-                            </field>
-                            <field name="amount" />
-                        </group>
                         <group col="2">
                             <group string="Additional Details">
                                 <field name="date" />
                                 <field name="inv_ref" />
                             </group>
                         </group>
+                        <group string="Service Details">
+                            <field name="service_ids">
+                                <tree string="Services" version="7.0" editable="bottom">
+                                    <field name="cost_type" />
+                                    <field name="amount" string="Cost"/>
+                                </tree>
+                                
+                            </field>
+                            
+                        </group>
+                        
                         <group string="Notes">
                             <field nolabel="1" name="notes" />
                         </group>