Skip to content

Conversation

@P-H-Phuc
Copy link
Owner

@P-H-Phuc P-H-Phuc commented Jul 2, 2025

  1. Install the module in your Odoo instance.

  2. Add field in your model to include the attachment_ids field.

attachment_ids = fields.Many2Many('ir.attachment', string='Attachments')
  1. In your xml file, include the many2many_binary widget:
<field name="attachment_ids" widget="many2many_binary"/>
  1. The PDF preview will be displayed in the form view of the model where you added the attachment_ids field.

@P-H-Phuc P-H-Phuc self-assigned this Jul 2, 2025
t-inherit-mode="extension"
owl="1"
>
<xpath expr="//div[hasclass('o_image_box')]" position="replace">
Copy link

@dzungtran89 dzungtran89 Jul 2, 2025

Choose a reason for hiding this comment

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

@P-H-Phuc 3 added modules seeems to replace this expr. Better to have another approach
that users can use all of them.

Choose a reason for hiding this comment

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

Mybad, the review comment is invalid.

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