title: limiting the size and type of data in ir.attachment field odoo 12
body: <p>I need to create a ir.attachment field to upload datas by the user side,but i have to restrict the data type and size,how can i achieve it</p>
  <p>my python field is :-</p>
  <p>test = fields.Many2many('ir.attachment',string='Test')</p>