Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
bealdav committed Oct 16, 2024
1 parent dc9b4cb commit b2afefe
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 16 deletions.
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# generated from manifests external_dependencies
fastexcel
polars
12 changes: 9 additions & 3 deletions sheet_dataframe_process/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Spreadsheet Import Configurable",
"name": "Sheet Dataframe Process",
"version": "18.0.1.0.0",
"author": "Akretion",
"license": "GPL-3",
"category": "Reporting",
"license": "AGPL-3",
"summary": "Allow to create a Polars dataframe from a sheet file and "
"process it according rules",
"website": "https://github.com/OCA/reporting-engine",
"maintainers": ["bealdav"],
"depends": [
"contacts",
],
Expand Down
18 changes: 13 additions & 5 deletions sheet_dataframe_process/models/file_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion sheet_dataframe_process/models/file_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion sheet_dataframe_process/views/file_partner_field.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</field>
</record>

<record id="action_file_field" model="ir.actions.act_window">
<record id="action_file_partner_field" model="ir.actions.act_window">
<field name="name">File Partner Field</field>
<field name="res_model">file.partner.field</field>
<field name="view_mode">list</field>
Expand Down
7 changes: 1 addition & 6 deletions sheet_dataframe_process/wizards/sheet_dataframe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@
<field name="sample" nolabel="1" />
</group>
<footer>
<button
name="apply"
string="Apply"
type="object"
class="btn-primary"
/>
<button name="apply" string="Apply" type="object" class="btn-primary" />
<button string="Cancel" class="btn-default" special="cancel" />
</footer>
</form>
Expand Down

0 comments on commit b2afefe

Please sign in to comment.