Skip to content

Conversation

@Callum027
Copy link
Collaborator

@Callum027 Callum027 commented Oct 15, 2025

Add a new manager for attachment records (ir.attachment) in Odoo.

These are intended to be used for uploading/downloading attachments to/from invoices. Invoice attachments will then be attached to invoice emails sent out to customers.

The contents of the attachments won't be fetched when querying them from Odoo by default; instead it is intended that the separate download method be used to download the attachment contents separately. An upload method is also available, to provide an easier to use interface for uploading attachments.

@Callum027 Callum027 self-assigned this Oct 15, 2025
@Callum027 Callum027 force-pushed the callum/add-attachment-support branch 5 times, most recently from 000bab3 to f244d13 Compare October 16, 2025 03:58
Base automatically changed from callum/update-type-hints to main October 16, 2025 04:01
@Callum027 Callum027 force-pushed the callum/add-attachment-support branch 2 times, most recently from cca47cd to b7cfe9e Compare October 16, 2025 04:15
@Callum027 Callum027 changed the base branch from main to callum/add-update-method October 16, 2025 04:15
@Callum027 Callum027 force-pushed the callum/add-update-method branch from 542f3b7 to a9d224b Compare October 16, 2025 04:19
@Callum027 Callum027 force-pushed the callum/add-attachment-support branch 2 times, most recently from 0a55a89 to 49c5b88 Compare October 16, 2025 04:39
@Callum027 Callum027 force-pushed the callum/add-update-method branch from a9d224b to 24c7ad7 Compare October 16, 2025 19:02
@Callum027 Callum027 force-pushed the callum/add-attachment-support branch 3 times, most recently from 10e56b7 to bbb9adb Compare October 17, 2025 01:48
@Callum027 Callum027 force-pushed the callum/add-update-method branch from 24c7ad7 to 763759f Compare October 17, 2025 01:50
@Callum027 Callum027 force-pushed the callum/add-attachment-support branch 2 times, most recently from 72cbf6d to bbbe041 Compare October 17, 2025 03:08


class Product(RecordBase["ProductManager"]):
active: bool
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to a separate PR.

@Callum027 Callum027 force-pushed the callum/add-attachment-support branch from bbbe041 to 2f9cd30 Compare October 21, 2025 02:28
Comment on lines +395 to +396
attr_type_origin = get_type_origin(attr_type)
if attr_type_origin is Union or attr_type_origin is UnionType:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to a separate PR.

@Callum027 Callum027 force-pushed the callum/add-attachment-support branch 2 times, most recently from 134c44b to 43aa7c6 Compare November 3, 2025 03:07
Add a new manager for attachment records (`ir.attachment`) in Odoo.

These are intended to be used for uploading/downloading attachments to/from invoices.
Invoice attachments will then be attached to invoice emails sent out to customers.

The contents of the attachments won't be fetched when querying them from Odoo by default;
instead it is intended that the separate `download` method be used to download the attachment
contents separately. An `upload` method is also available, to provide an easier to use interface
for uploading attachments.
@Callum027 Callum027 force-pushed the callum/add-attachment-support branch from 43aa7c6 to 025f474 Compare November 3, 2025 03:17
@adrianjarvis
Copy link
Contributor

Looks good - the docs are especially good.

@adrianjarvis adrianjarvis merged commit 5aaee01 into callum/add-update-method Nov 4, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants