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

Hi everyone,

Using field service I'd like to customize the default worksheet to add some automatic code on the creation of the worksheet.


For now i'v tried a lot of things... but there is only the way of using the interface automated action that works.


Here is that I tried : 


from odoo import models, fields, api

class WorksheetTemplate(models.Model):

_inherit = ['x_project_task_worksheet_template_1']

def create(self, vals):
print("ok")
return super().create(WorksheetTemplate, vals)

And in my manifest I've added : 

['project','industry_fsm_report','worksheet']



But of cours I have that error : 

raise TypeError("Model %r does not exist in registry." % name)
TypeError: Model 'x_project_task_worksheet_template_1' does not exist in registry.

아바타
취소
작성자 베스트 답변

This is the creation of the template but not the worksheet directly. Anyway thank you I put a comments of the solution

아바타
취소
관련 게시물 답글 화면 활동
1
10월 25
1384
4
2월 25
3510
1
8월 24
2608
2
11월 24
3952
3
10월 23
15365