def _dia_vencidos(self, cr, uid, ids, field_name, arg, context): result = {} for move_line in self.browse(cr, uid, ids): if move_line.date: result[move_line.id] = (datetime.today() - util.a_fecha(move_line.date)).days else: result[move_line.id] = 0 return result
def _dia(self, cr, uid, ids, field_name, arg, context): result = {} for move_line in self.browse(cr, uid, ids): result[move_line.id] = util.a_fecha(move_line.date).day return result