Fix wrong instantiation of Attachment

Introduced with changeset 60c08c72a159

issue3481
review1621003
(transplanted from 41b73cb9e9fe927fe2e71710c83a9286f0d38f6a)

--HG--
extra : transplant_source : A%B7%3C%B9%E9%FE%92%7F%E2%E7%17%10%C8%3A%92%86%F0%D3%8Fj
Use get_eval for check_required computation

issue3473
review1561002
(transplanted from 4786286136344caf3e4bda27c23ac1ab911d9380)

--HG--
extra : transplant_source : G%86%28a64L%AF%3EK%DA%27%C2%3A%C1%AB%91%1D%93%80
Search limit must be int

Since usage of python-sql limit is enforced to only integer.

issue3484
review1691002
(transplanted from 8633dabbbabd0f36bf8f2cfa07a44e6db991b368)

--HG--
extra : transplant_source : %863%DA%BB%BA%BD%0F6%BF%8F%2C%FA%07%A4Nm%B9%91%B3h
Send None for missing parent records instead of False

issue3448
review1761002
(transplanted from 207e9ee40735a5f9a37b796807f5f56189d25dba)

--HG--
extra : transplant_source : %20%7E%9E%E4%075%A5%F9%A3%7Byh%07%F5%F5a%89%D2%5D%BA