diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index ab53cba9ce3..6099d577f77 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -229,11 +229,6 @@ POSTGRES_CONFDELTYPES = { 'SET DEFAULT': 'd', } -def last_day_of_current_month(): - today = datetime.date.today() - last_day = str(calendar.monthrange(today.year, today.month)[1]) - return time.strftime('%Y-%m-' + last_day) - def intersect(la, lb): return filter(lambda x: x in lb, la) diff --git a/openerp/tools/yaml_import.py b/openerp/tools/yaml_import.py index 79a049f9618..bf95ff193be 100644 --- a/openerp/tools/yaml_import.py +++ b/openerp/tools/yaml_import.py @@ -341,6 +341,9 @@ class YamlInterpreter(object): self.logger.debug("RECORD_DICT %s" % record_dict) id = self.pool.get('ir.model.data')._update(self.cr, 1, record.model, \ self.module, record_dict, record.id, noupdate=self.isnoupdate(record), mode=self.mode, context=context) + if record.test: + model.read(cr, 1, [id], context=self.context) + model.name_search(cr, 1, [('id','=',id)], context=self.context) self.id_map[record.id] = int(id) if config.get('import_partial'): self.cr.commit()