[IMP] improved code
bzr revid: tpa@tinyerp.com-20130325062507-6gjq4pjyfllqydbs
This commit is contained in:
@@ -77,7 +77,7 @@ class fleet_vehicle_cost(osv.Model):
|
||||
'name': fields.function(_cost_name_get_fnc, type="char", string='Name', store=True),
|
||||
'vehicle_id': fields.many2one('fleet.vehicle', 'Vehicle', required=True, help='Vehicle concerned by this log'),
|
||||
'cost_subtype_id': fields.many2one('fleet.service.type', 'Type', help='Cost type purchased with this cost'),
|
||||
'amount': fields.float('Total Price', help="Cost that is paid only once at the creation of the contract"),
|
||||
'amount': fields.float('Total Price'),
|
||||
'cost_type': fields.selection([('contract', 'Contract'), ('services','Services'), ('fuel','Fuel'), ('other','Other')], 'Category of the cost', help='For internal purpose only', required=True),
|
||||
'parent_id': fields.many2one('fleet.vehicle.cost', 'Parent', help='Parent cost to this current cost'),
|
||||
'cost_ids': fields.one2many('fleet.vehicle.cost', 'parent_id', 'Included Services'),
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
<field name="fuel_type" />
|
||||
<label for="co2"/>
|
||||
<div>
|
||||
<field name="co2" class="oe_inline"/> Unit
|
||||
<field name="co2" class="oe_inline"/> g/km
|
||||
</div>
|
||||
<field name="horsepower" />
|
||||
<field name="horsepower_tax" />
|
||||
@@ -410,7 +410,7 @@
|
||||
<group string="Contract details">
|
||||
<field name="vehicle_id" on_change="on_change_vehicle(vehicle_id)"/>
|
||||
<field name="cost_subtype_id" required="1" domain="['|',('category','=','contract'),('category','=','both')]"/>
|
||||
<field name="amount" string="Activation Cost"/>
|
||||
<field name="amount" string="Activation Cost" help="Cost that is paid only once at the creation of the contract"/>
|
||||
<label for="cost_generated"/>
|
||||
<div>
|
||||
<field name="cost_generated" class="oe_inline" attrs="{'invisible': [('cost_frequency','=','no')]}" />
|
||||
|
||||
Reference in New Issue
Block a user