Below code doesn't Work:
py:
is_other_attachment = fields.Boolean(string='Other Attachment',default=False)
other_attachment = fields.Many2many(comodel_name="ir.attachment",
relation="m2m_ir_attachment_rel",
column1="m2m_id",
column2="attachment_id",
string="Other Attachment")
xml:
<field name="is_other_attachment"/>
<field name="other_attachment" widget="many2many_binary" attrs="{'required':[('is_other_attachment', '=', True)]}"/>
Hope this will helps: https://github.com/sehrishnaz/learnopenerp/wiki