Odoo中文网|Odoo实施培训

标题: odoo xml中获取本周 本月 第一天的写法 [打印本页]

作者: 店小2    时间: 2016-10-8 22:29
标题: odoo xml中获取本周 本月 第一天的写法
在odoo的xml 中对时间的 处理方法还是比较少的
(context_today() + datetime.timedelta(-context_today().weekday())).strftime('%%Y-%%m-%%d'))
  取得本月第一天  (context_today() ).strftime('%%Y-%%m-01'))






欢迎光临 Odoo中文网|Odoo实施培训 (http://www.chinaodoo.net/) Powered by Discuz! X3.2