Skip to content

[16.0] [IMP] base_business_document_import: set first PDF as main attachment - #1425

Open
pcastelovigo wants to merge 1 commit into
OCA:16.0from
zvERP:16.0-imp-base_business_document_import-main-attachment
Open

pcastelovigo wants to merge 1 commit into
OCA:16.0from
zvERP:16.0-imp-base_business_document_import-main-attachment

Conversation

@pcastelovigo

Copy link
Copy Markdown

add first PDF as main attachment

so you can print as original bill, its not working now

added test

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @alexis-via,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:16.0 mod:base_business_document_import Module base_business_document_import labels Oct 9, 2026
@pcastelovigo
pcastelovigo force-pushed the 16.0-imp-base_business_document_import-main-attachment branch from a7ee224 to 5686e27 Compare October 9, 2026 08:09
Attachments created by post_create_or_update() were not registered as main attachment, so the 'Original Bills' report could not find them on imported invoices (e.g. account_invoice_download_ovh). Use _message_set_main_attachment_id() so PDF is preferred over XML, as message_post() does.
@pcastelovigo
pcastelovigo force-pushed the 16.0-imp-base_business_document_import-main-attachment branch from 5686e27 to 631cee1 Compare October 9, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:base_business_document_import Module base_business_document_import series:16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants