Browse Source
Merge pull request #1581 from akretion/12-sql-export-required
IMP sql_export: render field as require when matching field def
pull/1573/merge
beau sebastien
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
1 deletions
-
sql_export/wizard/wizard_file.py
|
@ -36,8 +36,11 @@ class SqlFileWizard(models.TransientModel): |
|
|
toupdate_fields = [] |
|
|
toupdate_fields = [] |
|
|
for field in sql_export.field_ids: |
|
|
for field in sql_export.field_ids: |
|
|
toupdate_fields.append(field.name) |
|
|
toupdate_fields.append(field.name) |
|
|
|
|
|
attrib = {'name': field.name} |
|
|
|
|
|
if field.required: |
|
|
|
|
|
attrib['required'] = 'True' |
|
|
view_field = etree.SubElement( |
|
|
view_field = etree.SubElement( |
|
|
group, 'field', name=field.name) |
|
|
|
|
|
|
|
|
group, 'field', attrib=attrib) |
|
|
osv.orm.setup_modifiers( |
|
|
osv.orm.setup_modifiers( |
|
|
view_field, self.fields_get(field.name)) |
|
|
view_field, self.fields_get(field.name)) |
|
|
|
|
|
|
|
|