[IMP] survey_record_generation : allow readonly fields for record creation #13

Merged
mondot merged 1 commits from survey_record_generation-allow-readonly-fields-for-creation into 16.0 2025-12-02 15:02:05 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 79bd35c563 - Show all commits

View File

@@ -22,7 +22,7 @@ class SurveyRecordCreation(models.Model):
) )
field_to_retrieve_existing_records = fields.Many2one( field_to_retrieve_existing_records = fields.Many2one(
"ir.model.fields", "ir.model.fields",
domain="[('id', 'in', allowed_field_ids), ('readonly', '=', False)]", domain="[('id', 'in', allowed_field_ids)]",
ondelete="cascade", ondelete="cascade",
help="Choose the field you want to use to retrieve the existing record. " help="Choose the field you want to use to retrieve the existing record. "
"WARNING: We update only the first record found.", "WARNING: We update only the first record found.",

View File

@@ -33,7 +33,7 @@ class SurveyRecordCreationFieldValues(models.Model):
field_id = fields.Many2one( field_id = fields.Many2one(
'ir.model.fields', 'ir.model.fields',
domain="[('model_id','=',model_id),('readonly','=',False),('ttype','in',['char','selection','text','html','integer','float','date','datetime','many2one','many2many', 'boolean'])]", domain="[('model_id','=',model_id),('ttype','in',['char','selection','text','html','integer','float','date','datetime','many2one','many2many', 'boolean'])]",
ondelete="cascade") ondelete="cascade")
field_relation = fields.Char(related='field_id.relation') field_relation = fields.Char(related='field_id.relation')
field_type = fields.Selection(related="field_id.ttype") field_type = fields.Selection(related="field_id.ttype")