Skip to content

Commit 23dfc11

Browse files
author
Callum Dickinson
committed
Fix attachment model refs
Fix resolving model refs for the `message_main_attachment_name` and `message_main_attachment` fields.
1 parent bb523c4 commit 23dfc11

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/managers/custom.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,13 +964,13 @@ class CustomRecord(
964964
#
965965
# message_main_attachment_name: Annotated[
966966
# str | None,
967-
# ModelRef("message_main_attachment_name", Attachment),
967+
# ModelRef("message_main_attachment_id", Attachment),
968968
# ]
969969
# """The name of the main attachment on the record, if there is one."""
970970
#
971971
# message_main_attachment: Annotated[
972972
# Attachment | None,
973-
# ModelRef("message_main_attachment", Attachment),
973+
# ModelRef("message_main_attachment_id", Attachment),
974974
# ]
975975
# """The main attachment on the record, if there is one.
976976
#

openstack_odooclient/mixins/record_with_attachment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ class RecordWithAttachmentMixin(RecordProtocol[RM], Generic[RM]):
3939

4040
message_main_attachment_name: Annotated[
4141
str | None,
42-
ModelRef("message_main_attachment_name", Attachment),
42+
ModelRef("message_main_attachment_id", Attachment),
4343
]
4444
"""The name of the main attachment on the record, if there is one."""
4545

4646
message_main_attachment: Annotated[
4747
Attachment | None,
48-
ModelRef("message_main_attachment", Attachment),
48+
ModelRef("message_main_attachment_id", Attachment),
4949
]
5050
"""The main attachment on the record, if there is one.
5151

0 commit comments

Comments
 (0)