简体   繁体   English

如何在报告模板odoo 15中计算One2many字段

[英]How to count One2many field in report template odoo 15

Can some one tell me how to count One2many field in report template please?有人可以告诉我如何计算报告模板中的 One2many 字段吗?

I've a One2many field called calendar_jobs_ids我有一个名为calendar_jobs_ids的 One2many 字段
I want to count it and print to my report template, but i don't know how to do it.我想计算它并打印到我的报告模板,但我不知道该怎么做。

在此处输入图像描述

Can some one help me please.有人能帮助我吗。
Thanks.谢谢。

I've found a solution, that we call function from model to count the One2many field, then we use it in report template, that'll be good.我找到了一个解决方案,我们从 model 调用 function 来计算 One2many 字段,然后我们在报告模板中使用它,那会很好。

在此处输入图像描述

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM