[MIG] account_ebics_batch: Migration to 15.0

This commit is contained in:
Luc De Meyer 2022-11-26 16:57:01 +01:00
parent fcf1a56072
commit 7e524bb4a0
3 changed files with 4 additions and 7 deletions

View File

@ -3,7 +3,7 @@
{ {
"name": "EBICS Files batch import", "name": "EBICS Files batch import",
"version": "14.0.1.0.0", "version": "15.0.1.0.0",
"license": "AGPL-3", "license": "AGPL-3",
"author": "Noviat", "author": "Noviat",
"website": "https://www.noviat.com", "website": "https://www.noviat.com",

View File

@ -35,7 +35,6 @@ class EbicsBatchLog(models.Model):
has_draft_files = fields.Boolean(compute="_compute_ebics_files_fields") has_draft_files = fields.Boolean(compute="_compute_ebics_files_fields")
state = fields.Selection( state = fields.Selection(
selection=[("draft", "Draft"), ("error", "Error"), ("done", "Done")], selection=[("draft", "Draft"), ("error", "Error"), ("done", "Done")],
string="State",
required=True, required=True,
readonly=True, readonly=True,
default="draft", default="draft",
@ -147,10 +146,9 @@ class EbicsBatchLog(models.Model):
self.state = state self.state = state
def _ebics_import(self, config, date_from, date_to, import_dict): def _ebics_import(self, config, date_from, date_to, import_dict):
ctx = dict(self.env.context, ebics_download=True)
xfer_wiz = ( xfer_wiz = (
self.env["ebics.xfer"] self.env["ebics.xfer"]
.with_context(ctx) .with_context(ebics_download=True)
.create( .create(
{ {
"ebics_config_id": config.id, "ebics_config_id": config.id,
@ -185,7 +183,6 @@ class EbicsBatchLogItem(models.Model):
) )
state = fields.Selection( state = fields.Selection(
selection=[("draft", "Draft"), ("error", "Error"), ("done", "Done")], selection=[("draft", "Draft"), ("error", "Error"), ("done", "Done")],
string="State",
required=True, required=True,
readonly=True, readonly=True,
) )

View File

@ -22,7 +22,7 @@
<field name="name">ebics.batch.log.tree</field> <field name="name">ebics.batch.log.tree</field>
<field name="model">ebics.batch.log</field> <field name="model">ebics.batch.log</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="EBICS Batch Import Logs" create="false"> <tree create="false">
<field name="create_date" /> <field name="create_date" />
<field name="file_count" /> <field name="file_count" />
<field name="state" /> <field name="state" />
@ -83,7 +83,7 @@
<notebook colspan="4"> <notebook colspan="4">
<page string="Batch Import Logs"> <page string="Batch Import Logs">
<field name="log_ids" nolabel="1"> <field name="log_ids" nolabel="1">
<tree string="Log entries"> <tree>
<field name="create_date" /> <field name="create_date" />
<field name="state" /> <field name="state" />
<field name="error_count" /> <field name="error_count" />