summaryrefslogtreecommitdiff
path: root/addons/fleet/fleet.py
diff options
context:
space:
mode:
authorCedric Snauwaert <csn@openerp.com>2013-01-18 15:39:02 +0100
committerCedric Snauwaert <csn@openerp.com>2013-01-18 15:39:02 +0100
commit70cabfc65e91149ba6badbcc4dd975c8370bbfb8 (patch)
tree2beb716a94afb12d9414635fc1ee4ca7430ae493 /addons/fleet/fleet.py
parentd9316345963ce701e52162b9078dd61314d36d7e (diff)
[FIX]fleet: add m2o fields in inherited object to remove info warning upon installation
bzr revid: csn@openerp.com-20130118143902-vacsd5ltkug3ochx
Diffstat (limited to 'addons/fleet/fleet.py')
-rw-r--r--addons/fleet/fleet.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/fleet/fleet.py b/addons/fleet/fleet.py
index 7c5e01415e1..dc2aabb54fc 100644
--- a/addons/fleet/fleet.py
+++ b/addons/fleet/fleet.py
@@ -556,6 +556,7 @@ class fleet_vehicle_log_fuel(osv.Model):
'inv_ref': fields.char('Invoice Reference', size=64),
'vendor_id': fields.many2one('res.partner', 'Supplier', domain="[('supplier','=',True)]"),
'notes': fields.text('Notes'),
+ 'cost_id': fields.many2one('fleet.vehicle.cost', 'Cost'),
'cost_amount': fields.related('cost_id', 'amount', string='Amount', type='float', store=True), #we need to keep this field as a related with store=True because the graph view doesn't support (1) to address fields from inherited table and (2) fields that aren't stored in database
}
_defaults = {
@@ -596,6 +597,7 @@ class fleet_vehicle_log_services(osv.Model):
'vendor_id': fields.many2one('res.partner', 'Supplier', domain="[('supplier','=',True)]"),
'cost_amount': fields.related('cost_id', 'amount', string='Amount', type='float', store=True), #we need to keep this field as a related with store=True because the graph view doesn't support (1) to address fields from inherited table and (2) fields that aren't stored in database
'notes': fields.text('Notes'),
+ 'cost_id': fields.many2one('fleet.vehicle.cost', 'Cost'),
}
_defaults = {
'date': fields.date.context_today,
@@ -794,6 +796,7 @@ class fleet_vehicle_log_contract(osv.Model):
'cost_frequency': fields.selection([('no','No'), ('daily', 'Daily'), ('weekly','Weekly'), ('monthly','Monthly'), ('yearly','Yearly')], 'Recurring Cost Frequency', help='Frequency of the recuring cost', required=True),
'generated_cost_ids': fields.one2many('fleet.vehicle.cost', 'contract_id', 'Generated Costs', ondelete='cascade'),
'sum_cost': fields.function(_get_sum_cost, type='float', string='Indicative Costs Total'),
+ 'cost_id': fields.many2one('fleet.vehicle.cost', 'Cost'),
'cost_amount': fields.related('cost_id', 'amount', string='Amount', type='float', store=True), #we need to keep this field as a related with store=True because the graph view doesn't support (1) to address fields from inherited table and (2) fields that aren't stored in database
}
_defaults = {