From 846f0389f181b0f5150196ca0e9cd72a0ae1bba6 Mon Sep 17 00:00:00 2001 From: David Beal Date: Wed, 16 Oct 2024 18:01:00 +0200 Subject: [PATCH] fixup --- requirements.txt | 3 +++ sheet_dataframe_process/models/file_config.py | 18 +++++++++++++----- sheet_dataframe_process/models/file_field.py | 2 +- .../wizards/sheet_dataframe.xml | 7 +------ 4 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000..a5e43536f3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +# generated from manifests external_dependencies +fastexcel +polars diff --git a/sheet_dataframe_process/models/file_config.py b/sheet_dataframe_process/models/file_config.py index 70571af130..0c6a33e769 100644 --- a/sheet_dataframe_process/models/file_config.py +++ b/sheet_dataframe_process/models/file_config.py @@ -8,15 +8,23 @@ class FileConfig(models.Model): _rec_name = "model_id" model_id = fields.Many2one( - comodel_name="ir.model", - required=True, - ondelete="cascade" + comodel_name="ir.model", required=True, ondelete="cascade" ) code = fields.Char(help="Allow to browse between several identical models") - action = fields.Selection(selection=[("display", "Display"), ("dataframe", "Dataframe"), ("import", "Import (Not yet implemented)")], default="display", help="Some other behaviors can be implemented") + action = fields.Selection( + selection=[ + ("display", "Display"), + ("dataframe", "Dataframe"), + ("import", "Import (Not yet implemented)"), + ], + default="display", + help="Some other behaviors can be implemented", + ) partner_ids = fields.Many2many(comodel_name="res.partner") field_ids = fields.One2many(comodel_name="file.field", inverse_name="config_id") - field_match_ids = fields.One2many(comodel_name="file.partner.field", inverse_name="config_id") + field_match_ids = fields.One2many( + comodel_name="file.partner.field", inverse_name="config_id" + ) def populate_match_lines(self): self.ensure_one() diff --git a/sheet_dataframe_process/models/file_field.py b/sheet_dataframe_process/models/file_field.py index fdd5bbff29..f9d09cf00d 100644 --- a/sheet_dataframe_process/models/file_field.py +++ b/sheet_dataframe_process/models/file_field.py @@ -12,7 +12,7 @@ class FileField(models.Model): comodel_name="ir.model.fields", ondelete="cascade", required=True, - domain="[('model_id', '=', model_id)]" + domain="[('model_id', '=', model_id)]", # [('model_id', '=', model_id)] ) model_id = fields.Many2one( diff --git a/sheet_dataframe_process/wizards/sheet_dataframe.xml b/sheet_dataframe_process/wizards/sheet_dataframe.xml index bc6214417b..ec180da464 100644 --- a/sheet_dataframe_process/wizards/sheet_dataframe.xml +++ b/sheet_dataframe_process/wizards/sheet_dataframe.xml @@ -22,12 +22,7 @@