콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1525 화면

my code:

class hr_custom(models.Model):
    _inherit = 'hr.employee'
    attachment_ids = fields.Many2many('attachment.to.employee', 'attachment_id', string="Attachments")


class attachment(models.Model):    

_name = "attachment.to.employee"        

attachment_id = fields.Many2one('ir.attachment')    

attachment = fields.Binary(string="Attachments")  

---------------------------------------------------------------

file.xml:

  <page string="Job description attachment">          

              <field name="attachment_ids">                         

                       <tree editable="bottom">                    

            <field name="attachment"/>                  

            <field name="create_date"/>                

        </tree>                  

</field>                    

 </page>


아바타
취소