[FIX]Prices for fuel and services not editable

bzr revid: dle@openerp.com-20121019082407-4c9t4hxepdihs4tx
This commit is contained in:
Denis Ledoux dle@openerp.com 2012-10-19 10:24:07 +02:00
parent 14810cc807
commit 0f4e8682e7
2 changed files with 6 additions and 7 deletions

View File

@ -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,

View File

@ -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>