Hi,
I have two models:
/
class MyModel(models.TransientModel):
_name = 'my.model'
name = fields.Char(string='Name')
line_ids = fields.One2many(string='Lines',
comodel_name='my.model.line',
inverse_name='my_model_id')
class MyModelLine(models.TransientModel):
_name = 'my.model.line'
name = fields.Char(string='Name')
my_model_id = fields.many2one(string='My Model',
comodel_name='my.model')
In the form of 'my.model', th lines of 'my.model.line' are fielled automatically.
The user can delete lines and can't create lines. This is working fine.
However I would like to prevent the user to open or edit a line (model 'my.model.line').
Boris