如果我运行方法
from datetime import datetime
from timedelta import time
def action_retbook(self, cr, uid, ids, context=None):
dt = datetime.date.now()
todaydate = datetime.strptime(dt, "%y/%m/%d")
x=6
cr.execute("""update rmkbook_issue set dt_of_return ='%s' where id= %s """ %(todaydate, x))
return
我收到错误'method_descriptor' object has no attribute 'now'
。为什么呢?
答案 0 :(得分:3)
答案 1 :(得分:0)
我相信
useRef()
Works ..