Odoo Help


modify attachment for write and read

edgard pimentel rojas
on 11/17/13, 10:22 PM 1,133 views

I have a problem and is this:

I have a field attachment and I want to read for modify the text.

Any suggestions ?


class contract_type(osv.osv):
     _inherit = 'hr.contract.type'

    _columns = {
        'attachment': fields.many2one('ir.attachment', 'Adjuntar'),
        'dni': fields.char('DNI'),
        'ruc': fields.char('Nro. Ruc'),
        'name_employee': fields.char('Nombre'),
        'address': fields.char('Direccion'),
        'job_position': fields.char('Cargo'),
        'salary': fields.char('Salario'),
        'start_date': fields.date('Fecha de Inicio'),
        'end_date': fields.date('Fecha Fin'),

    _defaults = {
       'start_date': lambda *a: time.strftime('%Y-%m-%d'),


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 11/17/13, 10:22 PM
Seen: 1133 times
Last updated: 3/16/15, 8:10 AM