[FIX]Prices for fuel and services not editable
bzr revid: dle@openerp.com-20121019082407-4c9t4hxepdihs4tx
This commit is contained in:
parent
14810cc807
commit
0f4e8682e7
|
@ -646,7 +646,7 @@ class fleet_vehicle_log_fuel(osv.Model):
|
|||
'odometer_id' : fields.many2one('fleet.vehicle.odometer', 'Odometer', required=False, help='Odometer measure of the vehicle at the moment of this log'),
|
||||
'odometer' : fields.function(_get_odometer,fnct_inv=_set_odometer,type='char',string='Odometer',store=False),
|
||||
'odometer_unit': fields.related('vehicle_id','odometer_unit',type="char",string="Unit",store=False, readonly=True),
|
||||
'amount': fields.related('cost_id','amount',type="float",string="Amount",store=True, readonly=True),
|
||||
'cost_amount': fields.related('cost_id','amount',type="float",string="Amount",store=True, readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'purchaser_id': lambda self, cr, uid, ctx: uid,
|
||||
|
@ -717,7 +717,7 @@ class fleet_vehicle_log_services(osv.Model):
|
|||
'odometer_id' : fields.many2one('fleet.vehicle.odometer', 'Odometer', required=False, help='Odometer measure of the vehicle at the moment of this log'),
|
||||
'odometer' : fields.function(_get_odometer,fnct_inv=_set_odometer,type='char',string='Odometer Value',store=False),
|
||||
'odometer_unit': fields.related('vehicle_id','odometer_unit',type="char",string="Unit",store=False, readonly=True),
|
||||
'amount': fields.related('cost_id','amount',type="float",string="Amount",store=True, readonly=True),
|
||||
'cost_amount': fields.related('cost_id','amount',type="float",string="Amount",store=True, readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'purchaser_id': lambda self, cr, uid, ctx: uid,
|
||||
|
@ -868,6 +868,7 @@ class fleet_vehicle_log_contract(osv.Model):
|
|||
'odometer_id' : fields.many2one('fleet.vehicle.odometer', 'Odometer', required=False, help='Odometer measure of the vehicle at the moment of this log'),
|
||||
'odometer' : fields.function(_get_odometer,fnct_inv=_set_odometer,type='char',string='Odometer Value',store=False,help='Odometer measure of the vehicle at the moment of this log'),
|
||||
'odometer_unit': fields.related('vehicle_id','odometer_unit',type="char",string="Unit",store=False, readonly=True),
|
||||
'cost_amount': fields.related('cost_id','amount',type="float",string="Amount",store=True, readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'purchaser_id': lambda self, cr, uid, ctx: uid,
|
||||
|
|
|
@ -239,7 +239,7 @@
|
|||
<field name="state"/>
|
||||
<field name="odometer" />
|
||||
<field name="contract_renewal_due_soon" invisible="1"/>
|
||||
<field name="contract_renewal_overdue" invisible="1"/>
|
||||
<field name="contract_renewal_overdue" invisible="1" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -314,9 +314,7 @@
|
|||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
@ -615,7 +613,7 @@
|
|||
<graph string="Total Fuel amount per month">
|
||||
<field name="date"/>
|
||||
<field name="vehicle_id" group="True" />
|
||||
<field name="amount" operator="+"/>
|
||||
<field name="cost_amount" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -710,7 +708,7 @@
|
|||
<graph string="Services total amount per month">
|
||||
<field name="date" />
|
||||
<field name="vehicle_id" group="True" />
|
||||
<field name="amount" operator="+"/>
|
||||
<field name="cost_amount" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue