Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2782 Lượt xem

want to change before template email, to format for thousand separator 

(but this also not working) 

after changing email template, now showing error Failed to render template : 'goal' is undefined

already revert html code and also the translation, but it none helps


https://drive.google.com/file/d/1Rm1pzWIMkD4_1dPbkllpEu2tbkC06Dzw/view?usp=sharing 

https://drive.google.com/file/d/1RjqzvmRLFlfmtPHvdvE0zobRWL1gC2_p/view?usp=sharing 


file templates: 

https://drive.google.com/file/d/1RmRAkbQX2ivmNx_Pp-a3n5YBJwm8vLUl/view?usp=sharing


it works a day before, don't know what happened, as this should change email template only, 

creating new email template, dont help either, how to check for the problem cause?


in the log showing this error:

odoo journal[45279]: Odoo Server 14.0+e-20210930:Final6:INFO:odoo.addons.mail.models.mail_render_mixin:Failed to render template : 'goal' is undefined#012Traceback (most recent call last):#012 File "/opt/odoo/odoo14/odoo/addons/mail/models/mail_render_mixin.py", line 352, in _render_template_jinja#012 render_result = template.render(variables)#012 File "/opt/odoo/odoo14-venv-python3.8.6/lib64/python3.8/site-packages/jinja2/environment.py", line 1090, in render#012 self.environment.handle_exception()#012 File "/opt/odoo/odoo14-venv-python3.8.6/lib64/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception#012 reraise(*rewrite_traceback_stack(source=source))#012 File "/opt/odoo/odoo14-venv-python3.8.6/lib64/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise#012 raise value.with_traceback(tb)#012 File "", line 173, in top-level template code#012 File "/opt/odoo/odoo14-venv-python3.8.6/lib64/python3.8/site-packages/jinja2/sandbox.py", line 384, in getitem#012 return obj[argument]#012jinja2.exceptions.UndefinedError: 'goal' is undefined

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

odoo seems reformat for the html that put loop for in the wrong line:

% for goal in line[''goals'']:
% set tdBgColor = ''#fff''
% set tdColor = ''gray''
% set mutedColor = ''#AAAAAA''
% set tdPercentageColor = ''#9A6C8E''
table html div and stuff
% endfor


it should format like this in the sql, manually update in database:

https://drive.google.com/file/d/1Rvj73Tk6IPb_RN_3FxZC1NOFWzUywQQ2/view?usp=sharing 


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 5 22
5625
0
thg 1 25
1030
1
thg 11 23
2110
0
thg 9 21
1926
1
thg 3 15
4489