Add action_test_connection — a read-only connectivity/schema check that reports source row counts and imports nothing, the safe first step before a dry-run. Wire a "Test Connection" button on the wizard. Document the end-to-end run in the README: least-privilege read-only DB role SQL, the fusion_billing.nexacloud_dsn system parameter (libpq DSN = NexaCloud's URL minus +asyncpg), and the Test → dry-run → real-run flow. Refresh the stale SCAFFOLD status. 53/53 green on odoo-trial.
46 lines
2.3 KiB
XML
46 lines
2.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="view_fusion_billing_import_wizard_form" model="ir.ui.view">
|
|
<field name="name">fusion.billing.import.wizard.form</field>
|
|
<field name="model">fusion.billing.import.wizard</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Import from NexaCloud">
|
|
<div class="alert alert-danger" role="alert" invisible="failed_count == 0">
|
|
<strong>Import completed with errors: </strong>
|
|
<field name="failed_count" class="oe_inline" readonly="1"/> row(s) failed — see Result below.
|
|
</div>
|
|
<div class="alert alert-warning" role="alert" invisible="skipped_count == 0">
|
|
<field name="skipped_count" class="oe_inline" readonly="1"/> row(s) skipped (unresolved customer/plan) — see Result below.
|
|
</div>
|
|
<group>
|
|
<field name="dry_run"/>
|
|
</group>
|
|
<group string="Result" invisible="not result_summary">
|
|
<field name="result_summary" nolabel="1" widget="text"/>
|
|
</group>
|
|
<footer>
|
|
<button name="action_test_connection" type="object"
|
|
string="Test Connection" class="btn-secondary"/>
|
|
<button name="action_run_import" type="object" string="Run Import"
|
|
class="btn-primary"/>
|
|
<button string="Close" class="btn-secondary" special="cancel"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_fusion_billing_import_wizard" model="ir.actions.act_window">
|
|
<field name="name">Import from NexaCloud</field>
|
|
<field name="res_model">fusion.billing.import.wizard</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="target">new</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_fusion_billing_root" name="Fusion Billing"
|
|
parent="account.menu_finance" sequence="90"/>
|
|
<menuitem id="menu_fusion_billing_import" name="Import from NexaCloud"
|
|
parent="menu_fusion_billing_root"
|
|
action="action_fusion_billing_import_wizard" sequence="10"
|
|
groups="base.group_system"/>
|
|
</odoo>
|