CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I'm trying to define a new automated action in odoo through the odoo interface, but I can't get the python expression to work.
I want to update a datetime field in my crm.claim module, that I have defined in my code as
date': fields.datetime('Claim Date', select = True)
So I create an automated action, and in server actions to run, I create a new action like this
Base Model: claim
Action to do: Write on record
Update the Current Record
|Value Mapping||Field||Evaluation Type||Value|
|Claim Date||Python Expression||time.today()|
However, I get
ValueError: "'module' object has no attribute 'today'" while evaluating u'time.today()'
I've tried importing the time module too, but I get the same error. Even a print "test" doesn't work.
What's the correct way of writing a Python Expression using odoo's interface?
About This Community
Odoo Training Center
|Asked: 5/20/16, 7:18 AM|
|Seen: 1457 times|
|Last updated: 5/20/16, 8:28 AM|