hi all,
i want to make one2many list contain another many2one field with domain in the same form
the problem is "Uncaught Error: NameError: name 'model_id' is not defined"
and i noticed the the model_id stored in a record and the rest in other record
i don't understand what is happening
thanks
<form >
<br/>
<sheet>
<group col="4">
<field name="name" placeholder="Enter the report name..."/>
<field name="model_id"/>
</group>
<group>
<field name="record_ids">
<tree editable="bottom">
<field name="model_object_field"/>
<field name="user_field"/>
<field name="sequence"/>
<field name="operation"/>
</tree>
</field>
</group>
</sheet>
</form>
and .pymodel_id = fields.Many2one('ir.model', 'Apply to',on_change="onchange_sub_model_object_value_field('model_id')",delegate=True)
model_object_field=fields.Many2one('ir.model.fields', string="choose Field",
domain="[('model_id','=',model_id),('ttype','!=','one2many'),('ttype','!=','many2many')]")
field_operation = fields.Selection([('plus', '+'), ('mi', '-'), ('div', '/'), ('mul', '*')],)
record_ids=fields.One2many('xsl.report.file', 'model_id')
user_field=fields.Char()
sequence=fields.Char()