Browse Source

add more evaluation element in globals_dict

pull/115/head
Laetitia Gangloff 10 years ago
parent
commit
e3f1ffba10
  1. 7
      base_export_email/ir_actions.py

7
base_export_email/ir_actions.py

@ -24,6 +24,8 @@ from openerp.tools.translate import _
from openerp.addons.web.controllers import main
from openerp.tools.safe_eval import safe_eval
import time
from dateutil.relativedelta import relativedelta
from datetime import datetime
import base64
@ -88,7 +90,10 @@ class actions_server(orm.Model):
def _search_data(self, cr, uid, action, context=None):
obj_pool = self.pool[action.model]
domain = action.filter_id and safe_eval(
action.filter_id.domain, {'time': time}) or []
action.filter_id.domain, {'time': time,
'datetime': datetime,
'relativedelta': relativedelta,
}) or []
ctx = action.filter_id and safe_eval(
action.filter_id.context) or context
return obj_pool.search(cr, uid, domain,

Loading…
Cancel
Save