Skip to Content
Menu
This question has been flagged

i want to change "vin" field. 

------------------------------------

first model:

class SWVehicle(models.Model):

 _name = 'sw.vehicle' 

vin= fields.Char(string = "vin")


----------

second model

-------------

class SwMain(models.Model): 

_name = 'sw.main' 

_inherit = ['sw.vehicle']

vehicles = fields.One2many(string='name', comodel_name='sw.vehicle', inverse_name='task_id', copy=True)

requested = fields.Char(string="requested")


last model:
class SwMainVehicle(models.Model):

 _name = 'sw.main.vehicle' 

task_id = fields.Many2one(comodel_name='sw.main')

vehicle_id = fields.Many2one(string='estate', comodel_name='sw.vehicle', required=True)

vin = fields.Char(string='VIN ', related="vehicle_id.vin")


vehicle form

 sw.vehicle 

 

  

 

 

 
 


 



this form: 

 

   

          ? how to access vehicle form ??????

    


I tried:---------
 

sw.main.inherit.vehicle 

sw.main

 

"{'required':[('requested','not in',('lease1','lease2'))]}" ---how to find

 

 


Thanks 


 

 

Avatar
Discard
Related Posts Replies Views Activity
1
Jun 23
1823
1
Jan 22
10552
1
Jun 19
2345
1
Dec 16
6662
2
Mar 23
1326