[FIX] mrp: create mrp.document through mrp.eco
[FIX] mrp: create mrp.document through mrp.eco

How to reproduce:
  - Open PLM app, open an Engineering Change Order;
  - Click on "Update Documents";
  - Try to upload a document -> Traceback.

As we did not cast res_id as integer, the check method of ir.attachment
crashes when accessing company_id on a malformed recordset of ECO
because the domain generated by _filter_access_rules_python is:

  `['|', ('company_id', '=', False), ('company_id', 'in', [2, 1])]`

This route is also used when adding attachment to a `product.product`.
In this case the check didn't work either but somehow passed because no
domain is generated by `_filter_access_rules_python`.
The following snippet shows that if there was one, it would also crash:

```
In [16]: records
Out[16]: product.product('25',)

In [17]: records.stock_move_ids
Out[17]: stock.move()

In [18]: self.env['product.product'].browse(25)
Out[18]: product.product(25,)

In [19]: self.env['product.product'].browse(25).stock_move_ids
Out[19]: stock.move(41, 13)
```

task-2223153

closes odoo/odoo#48515

Signed-off-by: Simon Lejeune (sle) <1969d8dff896674c2d819e813f5e88ca826229ab@openerp.com>

ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo