Skip to content

Commit

Permalink
Merge PR #616 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Aug 22, 2023
2 parents f6cec26 + 9c662d5 commit e50c567
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base_export_manager/models/ir_exports_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ def _inverse_name(self):
one.with_context(skip_check=True)[one.field_n(num, True)] = False
continue
field_name = parts[num - 1]
# Odoo make difference between bank_ids/.id and bank_ids/id, the
# former refer to xml id the second the postgresql id column
# here we want to find the id field is user request for `.id`
field_name = field_name.replace(".id", "id")
model = one.model_n(num)
# You could get to failing constraint while populating the
# fields, so we skip the uniqueness check and manually check
Expand Down
2 changes: 2 additions & 0 deletions base_export_manager/tests/test_ir_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ def test_create_with_basic_data(self):
"name": "Test éxport",
"resource": "ir.exports",
"export_fields": [
[0, 0, {"name": ".id"}],
[0, 0, {"name": "export_fields"}],
[0, 0, {"name": "export_fields/create_uid"}],
[0, 0, {"name": "export_fields/create_date"}],
[0, 0, {"name": "export_fields/field1_id"}],
[0, 0, {"name": "export_fields/field1_id/.id"}],
],
}
virt_record = self.env["ir.exports"].new(data)
Expand Down

0 comments on commit e50c567

Please sign in to comment.