问题描述
我是openerp的世代报告。那个方法是,我创建了sxw并将其转换成rml,然后将其转换为pdf。现在工作正常我的疑虑是,当试图获得日期和时间的字段值时,它只是日期。时间不在pdf报告中。python中的字段名称:'sample_receipt_date':datetime(....)
$ b $ sxw中的b
:[[formatLang(o.sample_receipt_date,date = True)]]
转换后pdf:dd / mm / yy
但是我希望这个格式在pdf中是dd / mm / yy / min / sec。
什么是sxw文件中的python编码?
[[time.ctime()]]
否则,请查看或完整的 RML for Idiots 手动
I am generation report in openerp. that ways is, I created sxw and convet into rml then rml into pdf. It is working fine now. What my doubts is, when try to get date and time field value, it's getting only date. Time is not coming in pdf report.
Field name in python: 'sample_receipt_date':datetime(....)
in sxw: [[formatLang(o.sample_receipt_date,date=True)]]
After convert pdf: dd/mm/yy
but i want this format dd/mm/yy/min/sec in pdf.
what is python coding in sxw document?
[[ time.ctime() ]]
should work in RML, otherwise, take a look at https://doc.openerp.com/6.1/vi/developer/05_reports/ or the full RML for Idiots manual
这篇关于如何在sxw中使用python for openerp报告设定日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!