|
@ -20,13 +20,13 @@ |
|
|
<field name="cronjob_running" invisible="1" /> |
|
|
<field name="cronjob_running" invisible="1" /> |
|
|
</header> |
|
|
</header> |
|
|
<sheet> |
|
|
<sheet> |
|
|
|
|
|
<field name="status_html" attrs="{'invisible': [('status_html', '=', False)]}" /> |
|
|
<group col="4" name="credentials"> |
|
|
<group col="4" name="credentials"> |
|
|
<field name="url" widget="url" attrs="{'readonly': [('cronjob_running', '=', True)]}" /> |
|
|
<field name="url" widget="url" attrs="{'readonly': [('cronjob_running', '=', True)]}" /> |
|
|
<field name="database" attrs="{'readonly': [('cronjob_running', '=', True)]}" /> |
|
|
<field name="database" attrs="{'readonly': [('cronjob_running', '=', True)]}" /> |
|
|
<field name="user" attrs="{'readonly': [('cronjob_running', '=', True)]}" /> |
|
|
<field name="user" attrs="{'readonly': [('cronjob_running', '=', True)]}" /> |
|
|
<field name="password" password="True" attrs="{'readonly': [('cronjob_running', '=', True)], 'required': [('cronjob_running', '=', False)]}" /> |
|
|
<field name="password" password="True" attrs="{'readonly': [('cronjob_running', '=', True)], 'required': [('cronjob_running', '=', False)]}" /> |
|
|
<field name="cronjob_id" attrs="{'invisible': [('cronjob_id', '=', False)]}" /> |
|
|
<field name="cronjob_id" attrs="{'invisible': [('cronjob_id', '=', False)]}" /> |
|
|
<field name="status_html" attrs="{'invisible': [('status_html', '=', False)]}" string="Progress" /> |
|
|
|
|
|
</group> |
|
|
</group> |
|
|
<field name="import_line_ids" attrs="{'readonly': [('cronjob_running', '=', True)]}"> |
|
|
<field name="import_line_ids" attrs="{'readonly': [('cronjob_running', '=', True)]}"> |
|
|
<tree editable="top"> |
|
|
<tree editable="top"> |
|
@ -64,17 +64,17 @@ |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
<dl> |
|
|
|
|
|
<t t-foreach="object.status_data.get('counts', [])" t-as="model_name"> |
|
|
|
|
|
<t t-set="model_display_name" t-value="request.env['ir.model'].search([('model', '=', model_name)]).name" /> |
|
|
|
|
|
<dt t-esc="model_display_name" /> |
|
|
|
|
|
<dd> |
|
|
|
|
|
<a href="#" t-att-onclick="'base_import_database_open("%s", "%s", %s)' % (model_name, model_display_name, object.id)"> |
|
|
|
|
|
<span t-esc="object.status_data.get('done', {}).get(model_name, 0)" />/<span t-esc="object.status_data['counts'][model_name]" /> done |
|
|
|
|
|
</a> |
|
|
|
|
|
</dd> |
|
|
|
|
|
</t> |
|
|
|
|
|
</dl> |
|
|
|
|
|
|
|
|
<h2>Import progress</h2> |
|
|
|
|
|
<div style="display: flex;"> |
|
|
|
|
|
<div style="margin-right: .5em" t-foreach="object.import_line_ids" t-as="import_line"> |
|
|
|
|
|
<t t-set="model_name" t-value="import_line.model_id.model" /> |
|
|
|
|
|
<t t-set="model_display_name" t-value="import_line.model_id.name" /> |
|
|
|
|
|
<h3 t-esc="model_display_name" /> |
|
|
|
|
|
<a href="#" t-att-onclick="'base_import_database_open("%s", "%s", %s)' % (model_name, model_display_name, object.id)"> |
|
|
|
|
|
<span t-esc="object.status_data.get('done', {}).get(model_name, 0)" />/<span t-esc="object.status_data.get('counts', {}).get(model_name, 0)" /> done |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
<t t-if="object.status_data.get('error')"><pre t-esc="object.status_data['error']" /></t> |
|
|
<t t-if="object.status_data.get('error')"><pre t-esc="object.status_data['error']" /></t> |
|
|
</template> |
|
|
</template> |
|
|
</data> |
|
|
</data> |
|
|